__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/16174911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mergeWiki (Wiki w) throws WikiException { WikiService wis= new WikiService(); try { WootSession ws = front.edit(back.getWootPage(w.getId())); ws.setContent(w.getValue()); Patch p = ws.save(); back.deliverPatch(p); wis.deleteWiki(w.getId()); wis.putWiki(w); } catch (Exception e) { e.printStackTrace(); } } COM: <s> method to merge wiki in the easypastry node </s>
funcom_train/40701760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dataGetCookies(String name, AsyncCallback<List<Cookie>> callback) { Json j = new Json ().put ( "name", name ); callMethodRetList ( "data.getCookies", j.getJavaScriptObject (), Cookie.class, callback ); } COM: <s> this method returns all cookies for a given user and application </s>
funcom_train/3925048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMode( int newMode ) { // mode could be null, e.g., the client's transform if ( modeEvent != null ) { mode = newMode; modeEvent.setValue( newMode ); } if ( mode >= 0 ) { listen(); } else { //abort listen ? } } COM: <s> this is called from scene manager when some observer requests routes from scene </s>
funcom_train/36108575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Holder findNodeWith(Object object, Holder parent){ if(object==getObject(parent))return parent;//parent=null can't be interesting NodeHolder<Holder> holder = getInterface(parent); int n = holder.getChildCount(); for (int i = 0; i < n; i++) { Holder node = holder.getChildAt(i); node = findNodeWith(object, node); if(node!=null)return node; } return null; } COM: <s> finds node with the given object </s>
funcom_train/41164105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(StoredOpenResponse3 entity) { EntityManagerHelper.log("saving StoredOpenResponse3 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 stored open response3 </s>
funcom_train/44168022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getTotalDefencePower() { CombatModel cm = getGame().getCombatModel(); float defence = 0.0f; for (Unit unit : getTile().getUnitList()) { if (unit.isDefensiveUnit()) { defence += cm.getDefencePower(null, unit); } } return defence; } COM: <s> gets the total defence power </s>
funcom_train/41425136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recover(TimerTaskData taskData) { TimerTask task = timerTaskFactory.newTimerTask(taskData); if(task != null) { if (logger.isDebugEnabled()) { logger.debug("Recovering task with id "+taskData.getTaskID()); } task.beforeRecover(); // on recovery the task will already be in the cache so we don't check for it // or an IllegalStateException will be thrown schedule(task, false); } } COM: <s> recovers a timer task that was running in another node </s>
funcom_train/12174924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCausesFragmentation(Styles styles) { StyleValue breakAfter = styles.getPropertyValues(). getSpecifiedValue(StylePropertyDetails.MCS_BREAK_AFTER); // Only fragment if mcs-break-after == always. if (breakAfter == MCSBreakAfterKeywords.ALWAYS) { causesFragmentation = true; } } COM: <s> determine whether or not this group causes fragmentation </s>
funcom_train/18569467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTab5Panel() { if (tab5Panel == null) { tab5Panel = new JPanel(); tab5Panel.setLayout(new BorderLayout()); tab5Panel.add(getHeading5Panel(), java.awt.BorderLayout.NORTH); tab5Panel.add(getDetail5Panel(), java.awt.BorderLayout.WEST); } return tab5Panel; } COM: <s> this method initializes tab5 panel </s>
funcom_train/23354182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initConnectionBean() throws LoadResourceException { org.springframework.web.context.WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext( this.rheasResource.getContext()); this.connectionBean = (ConnectionBean) ctx.getBean("connectionBean"); if (this.connectionBean == null) { throw new LoadResourceException("connectionBean"); } } COM: <s> this method fetches a database connection from the pool which is used </s>
funcom_train/1339831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BrainInfo_ID lookup(int value) { if (atlas.getAtlas().size() != id2atlas.size()) { setupAtlasIds(); // set everything up again. } AtlasElement ae = atlas.lookup(value); if (ae == null) { return null; } else { return ids.getArea(Identifiers.guess(ae.getUniqueId())); } } COM: <s> lookup the given value and return the structure id </s>
funcom_train/14093053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculatePercent4() { MyTestClass myClass = new MyTestClass(); myClass.setPosition(PERCENT); myClass.setReferencePoint(new Point(100, 0)); Point l = myClass.calculatePoint(new Rectangle(0, 0, 7, 7)); Point v = new Point(7, 0); assertEquals("Percent4:", v, l); } COM: <s> test calculation of northeast position with percent </s>
funcom_train/50835979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() { if (audioJoined) { Network.deregister(this,audio); } if (vidJoined) { Network.deregister(this,vid); } if (picJoined) { Network.deregister(this,pic); } if (miscJoined) { Network.deregister(this,misc); } // deregister plugin at client Network.deregister(this, FilesharingState.peergroup); } COM: <s> disconnect from network </s>
funcom_train/44679721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BoundaryFeature getBoundaryFeature(int datasetRole, Feature f) { BoundaryFeature bf = (BoundaryFeature) bfMap[datasetRole].get(f); if (bf == null) { bf = new BoundaryFeature(datasetRole, f); bfMap[datasetRole].put(f, bf); } return bf; } COM: <s> gets the boundary feature corresponding to the feature f </s>
funcom_train/37520969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String str = super.toString(); StringBuffer buff = new StringBuffer(str); buff.append("table " + table).append("\n") .append("tableColumn " + tableColumn).append("\n") .append("keyColumn " + keyColumn).append("\n") .append("nextColumn " + nextColumn).append("\n") .append("high " + high).append("\n") .append("low " + low).append("\n") .append("]"); return buff.toString(); } COM: <s> return a stirng representation of this object </s>
funcom_train/27900245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isImage(String mimeType) { if ( mimeType == null ) return false; if ( mimeType.startsWith("image/x-mrsid") ) return false; if ( mimeType.startsWith("image/x-djvu") ) return false; if ( mimeType.startsWith("image/") ) return true; return false; } COM: <s> checks whether this is some sort of image </s>
funcom_train/25665037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStringPref(final String key, final String value) { this.writing.lock(); final String prevValue = this.properties.getProperty(key); try { if (value == null) { this.properties.remove(key.toLowerCase()); } else { this.properties.setProperty(key.toLowerCase(), value); } } finally { this.writing.unlock(); } this.fireChangeEvent(key, value, prevValue); } COM: <s> sets a new value for a textural configuration option </s>
funcom_train/50723934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replaceBuffer(String s) { try { int len = 0; if (startLineIndex == endLineIndex) { len = startLine.getLength(); } else { len = endLine.getOffset() + endLine.getLength() - startLine.getOffset(); } document.replace(startLine.getOffset(), len, s); } catch (BadLocationException e) { e.printStackTrace(); } } COM: <s> replace the document text check if single or multiline </s>
funcom_train/26464659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersect(final Rectangle rectangle) { x -= rectangle.x; y -= rectangle.y; if (x < 0) { width += x; x = 0; } if (y < 0) { height += y; y = 0; } if (x + width > rectangle.width) { width = rectangle.width - x; } if (y + height > rectangle.height) { height = rectangle.height - y; } if (width <= 0 || height <= 0) { height = 0; width = 0; x += rectangle.x; y += rectangle.y; return false; } x += rectangle.x; y += rectangle.y; return true; } COM: <s> this functinion checks if another rectangle intersects with the rectangle </s>
funcom_train/39468721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @NotNull private JPanel createCommandPanel() { final JPanel commandPanel = new JPanel(); commandPanel.setBorder(BorderFactory.createTitledBorder(ACTION_BUILDER.getString("border.commands.title"))); commandPanel.add(new JButton(ACTION_BUILDER.getAction("convert"))); return commandPanel; } COM: <s> creates the command panel which holds the button to perform the conversion </s>
funcom_train/17784964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStrictScope() { boolean ret=true; // Default is to be strict scope. Only change if // explicitly set to false by single or multiple path // behaviour if (m_source instanceof SinglePathBehaviour) { ret = ((SinglePathBehaviour)m_source).isStrictScope(); } else if (m_source instanceof MultiPathBehaviour) { ret = ((MultiPathBehaviour)m_source).isStrictScope(); } return(ret); } COM: <s> this method determines if the underlying grouping construct </s>
funcom_train/16683492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getModificationTime() throws FxApplicationException { FxContentVersionInfo pageVersionInfo = getPageVersionInfo(); if (pageVersionInfo == null) { return null; } return this.mapBean.getDateTime().get(pageVersionInfo.getVersionData(pageVersionInfo.getMaxVersion()).getLifeCycleInfo().getModificationTime()); } COM: <s> returns modification time of content instance </s>
funcom_train/11013450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnHide() { wbH.setSheetHidden(0, false); assertFalse(wbH.isSheetHidden(0)); assertFalse(wbH.isSheetHidden(1)); Workbook wb2 = _testDataProvider.writeOutAndReadBack(wbH); assertFalse(wb2.isSheetHidden(0)); assertFalse(wb2.isSheetHidden(1)); } COM: <s> turn the sheet with one hidden into the one with </s>
funcom_train/40791882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { gui = new ContactListGUI(); delegate = new ContactServiceDelegate(); gui.contactService = delegate; delegate.gui = gui; gui.init(); delegate.gui.status.setText("Retrieving Domains ...."); delegate.listDomains(true); wireGUIEvents(); } COM: <s> this is the entry point method </s>
funcom_train/46429789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildInterface() { this.mainFrame = new MainFrame(); this.mainFrame.setLayout(new GridLayout(2, 0)); this.sensorPanel = new SensorPanel(); this.mainFrame.add(this.sensorPanel); this.appPanel = new ApplicationControlPanel(); this.mainFrame.add(this.appPanel); this.mainFrame.validate(); LogOperation.writeAppLog(UILanguage.getRunningOn() + System.getProperty("os.name")); } COM: <s> build the interface of this application </s>
funcom_train/45133849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getValueDouble() throws NullPointerException, XMLInvalidTypeException { double value; try { value = Double.parseDouble(getValueString()); return value; } catch (NullPointerException npE) { throw npE; } catch (Exception e) { throw new XMLInvalidTypeException("Object is not a double"); } } COM: <s> returns the double value of the root tag </s>
funcom_train/36667578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(){ for(Map.Entry<String, ConnectionAnchor> entry : conns.entrySet()){ ConnectionAnchor out = new ConnectionAnchor(this, entry.getKey()); ConnectionAnchor in = entry.getValue(); try{ eventQueue.put(new SynchroEvent(out, in)); }catch(InterruptedException ie){ log.error("Event parser is dead, can't trigger event from TRIGGER.", ie); } } } COM: <s> send signals to start program new synchro events are created </s>
funcom_train/17432143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if (null == server) { LOG.info("Starting new hsqldb server; database=" + DATABASE_NAME); server = new Server(); server.putPropertiesFromString("database.0=mem:" + DATABASE_NAME + ";no_system_exit=true"); server.start(); } } COM: <s> start the server </s>
funcom_train/8368674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getLastSMS() { if (LastSMS == null) {//GEN-END:|347-getter|0|347-preInit // write pre-init user code here LastSMS = new Command("Letzte SMS", Command.CANCEL, 5);//GEN-LINE:|347-getter|1|347-postInit // write post-init user code here }//GEN-BEGIN:|347-getter|2| return LastSMS; } COM: <s> returns an initiliazed instance of last sms component </s>
funcom_train/13503177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRepositoryHash() throws JournalException { if (!server.hasInitialized()) { throw new IllegalStateException("The repository hash is not available until " + "the server is fully initialized."); } try { return server.getRepositoryHash(); } catch (ServerException e) { throw new JournalException(e); } } COM: <s> this method must not be called before the server has completed </s>
funcom_train/25915277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gameTick() { // very basic state machine, makes a good foundation for a more complex // game. switch (mCurState) { case GAME_INIT: // prepare a new game for the user. initNewGame(); switchGameState(GAME_RUNNING); case GAME_RUNNING: // update our marble. if (!mWarning) updateMarble(); break; } // redraw the screen once our tick function is complete. invalidate(); } COM: <s> called every cycle used to process current game state </s>
funcom_train/5373801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRectangles (Rectangle [] rectangles) { checkWidget (); if (rectangles == null) error (SWT.ERROR_NULL_ARGUMENT); int length = rectangles.length; this.rectangles = new Rectangle [length]; for (int i = 0; i < length; i++) { Rectangle current = rectangles [i]; if (current == null) error (SWT.ERROR_NULL_ARGUMENT); this.rectangles [i] = new Rectangle (current.x, current.y, current.width, current.height); } proportions = computeProportions (rectangles); } COM: <s> specifies the rectangles that should be drawn expressed relative to the parent </s>
funcom_train/32056148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComboBox getToolBarComponent() { JComboBox combo = new JComboBox(); combo.setPreferredSize(new Dimension(66 - 15, 26)); combo.setMaximumSize(combo.getPreferredSize()); combo.setEditable(true); return combo; /* FAULT:: return null; */ } COM: <s> creates a combo box that contains the list of possible </s>
funcom_train/39353445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkCacheFile(URL url, boolean isDecoration) throws IOException { File file = getCacheFile(url, isDecoration); synchronized(getLock(file)) { if(file.exists()) { file.setLastModified(System.currentTimeMillis()); return true; } return false; } } COM: <s> touches the cache file corresponding to </s>
funcom_train/35001725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject put(String key, Object value) throws NullPointerException { if (key == null) { throw new NullPointerException("Null key."); } if (value != null) { // 转码处理 // if(value instanceof String) // value = Tools.decodeUnicodeHtm((String)value); myHashMap.put(key, value); } else { remove(key); } return this; } COM: <s> put a key value pair in the jsonobject </s>
funcom_train/48408074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamespacePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NamedElement_namespace_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_namespace_feature", "_UI_NamedElement_type"), SpemxtmethodPackage.Literals.NAMED_ELEMENT__NAMESPACE, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the namespace feature </s>
funcom_train/21643982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getEditRedoMenuItem() { if (editRedoMenuItem == null) { editRedoMenuItem = new JMenuItem(); editRedoMenuItem.setText("Redo"); editRedoMenuItem.setMnemonic('R'); editRedoMenuItem.setDisplayedMnemonicIndex(0); editRedoMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, InputEvent.CTRL_MASK)); editRedoMenuItem.addActionListener(eventHandler); } return editRedoMenuItem; } COM: <s> return the edit redo menu item </s>
funcom_train/2889687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SystemSession endLookupSystem(Transmission tx) { MessageDocument response = tx.blockForResult(getTimeout()); extractResponse(tx, QNAME_LOOKUP_SYSTEM_RESPONSE); Element payload = response.getPayload(); //get the WSA address back AlpineEPR epr=new AlpineEPR(payload,CddlmConstants.WS_ADDRESSING_NAMESPACE); return new SystemSession(this, epr); } COM: <s> wait for something to finish </s>
funcom_train/19318153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean readBoolean() throws JMSException { prepareRead(); try { return Conversions.getBoolean(readNext()); } catch(MessageFormatException e) { try { dis.reset(); } catch(IOException ex) { throw new JMSException(ex.getMessage()); } throw new MessageFormatException(e.getMessage()); } } COM: <s> reads a code boolean code from the stream message </s>
funcom_train/27849748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focusLost(final FocusEvent fe) { final JComponent source = (JComponent) fe.getSource(); if (source.equals(commentsArea) && commentsArea.getText().length() > 0) { bugProfile.setProperty(Ticket.USER_COMMENT, commentsArea.getText()); } } COM: <s> saves the user comments area text on every focus lost event </s>
funcom_train/45118325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeVals(PresentationDefinitions sort) { this.sortSection = sort.getSortSection(); this.sortHeader = sort.getSortHeader(); this.parametersOrder = sort.getParamOrder(); this.activeTab = sort.getActiveTab(); this.headerRatio = sort.getHeadersRatio(); this.headerRatio = new double[sort.getHeadersRatio().length]; System.arraycopy(sort.getHeadersRatio(), 0, this.headerRatio, 0, sort.getHeadersRatio().length); } COM: <s> updating the panelss values of sorting parameters from a given </s>
funcom_train/33428778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createEngine(String loadingScreen, int width, int height, final boolean landscape) { if(loadingScreen == null) rokon = Rokon.createEngine(this, width, height); else rokon = Rokon.createEngine(this, loadingScreen, width, height); _hasLoadingScreen = (loadingScreen != null); rokon.setFullscreen(); if(landscape) rokon.fixLandscape(); else rokon.fixPortrait(); rokon.init(); if(!_hasLoadingScreen) doLoading(); } COM: <s> starts the engine with a loading screen </s>
funcom_train/12239392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toMetaInfoString() { StringBuffer sb = new StringBuffer(); sb.append(this.funcName); sb.append("("); Iterator<ResultRow> iter = this.args.iterator(); ResultRow row = null; if(iter.hasNext()) {row = iter.next();} while(row != null) { sb.append(row.get("argType")); sb.append(" "); sb.append(row.get("argName")); if(iter.hasNext()) { row = iter.next(); sb.append(", "); } else {break;} } sb.append(");"); return sb.toString(); } COM: <s> returns the same as ddfrepresentation </s>
funcom_train/32740930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getQueryLanguage(TransactionProvider instance) { switch (instance.getLastConnectionType()) { case makumba: return providerInstances.get(DataSourceType.makumba.toString()).getQueryLanguageInternal(); case hibernate: return providerInstances.get(DataSourceType.hibernate.toString()).getQueryLanguageInternal(); } return null; } COM: <s> returns the query language according to the last connection </s>
funcom_train/40226624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCached(ModelDataType type, Object obj) { if(obj == null) return false; switch(type) { case ENTITY: return entityMap == null ? false : entityMap.containsKey(obj); case ENTITY_PROTOTYPE: { if(entityPrototypes != null) { final String et = (String) obj; for(final Model p : entityPrototypes) { if(et.equals(p.getEntityType())) return true; } } return false; } default: return false; } } COM: <s> is a particular item of the given aux data type currently cached </s>
funcom_train/40944337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionHandler(Action.Handler actionHandler) { if (actionHandler != null) { if (actionHandlers == null) { actionHandlers = new LinkedList(); actionMapper = new KeyMapper(); } if (!actionHandlers.contains(actionHandler)) { actionHandlers.add(actionHandler); requestRepaint(); } } } COM: <s> adds an action handler </s>
funcom_train/51813479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int findLastIndexOf(Object[] array, String jobId, Comparator comparator) { int i = dec( putIndex ); int k = 0; for (;;) { if (k++ >= count) return -1; Object val = array[i]; if ( val == null ) continue; if ( comparator.compare( val, jobId ) == 0 ) { return i; } i = dec(i); } } COM: <s> find position of the object </s>
funcom_train/802634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContactInfoPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PersonType_contactInfo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PersonType_contactInfo_feature", "_UI_PersonType_type"), MzdataPackage.Literals.PERSON_TYPE__CONTACT_INFO, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the contact info feature </s>
funcom_train/19865747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MusicPlayerView showMusicPlayer() { IWorkbenchWindow window = LockerPlugin.getDefault().getWorkbench() .getActiveWorkbenchWindow(); IWorkbenchPage page = window.getActivePage(); try { IViewPart musicPlayer = page.showView( ILockerConstants.ID_MUSIC_PLAYER_VIEW, null, IWorkbenchPage.VIEW_VISIBLE); return (MusicPlayerView) musicPlayer; } catch (PartInitException e) { return null; } } COM: <s> forces the music player view to be shown within the eclipse workbench </s>
funcom_train/47868645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean go(ServerContext context) throws G8RException { // Send initial response asking for food mood context.sendResponse(G8RResponse.OK, FOOD_FUNCTION, // If a repeat visit, show client's first name context.getFirstName() != null ? (context.getFirstName() + "'s " + MESSAGE) : MESSAGE); // Get the food mood context.setState(GetFoodMood); return true; } COM: <s> sends a g8 rresponse that asks for the food mood </s>
funcom_train/18957975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void AddType(String typeName) throws SQLException, Exception { Statement stmt = dbConn.createStatement(); // insert the new type into the Types table. String update = "INSERT INTO Type (TypeName) VALUES" + "('" + typeName + "');"; System.out.println(update); stmt.executeUpdate(update); stmt.close(); } COM: <s> adds the new type to the project </s>
funcom_train/40451604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getProperty(SensorData data, String propertyName) { List<Property> propertyList = data.getProperties().getProperty(); for (Property property : propertyList) { if (propertyName.equals(property.getKey())) { return property.getValue(); } } return null; } COM: <s> returns the string value associated with property key </s>
funcom_train/45116839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPrivateTags(Document doc, Element jsystem) { Element p = doc.createElement("sysproperty"); p.setAttribute("key", RunningProperties.SCRIPT_TAG); p.setAttribute("value", executor.getTagName()); jsystem.appendChild(p); Element p1 = doc.createElement("sysproperty"); p1.setAttribute("key", RunningProperties.SCRIPT_PATH); p1.setAttribute("value", executor.getFilePath()); jsystem.appendChild(p1); } COM: <s> add the script tag and the script path </s>
funcom_train/25217593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String join(List<String> commandLine) { StringBuilder buffer = new StringBuilder(); boolean first = true; for (String s : commandLine) { if (first) { first = false; } else { buffer.append(' '); } buffer.append(s); } return buffer.toString(); } COM: <s> join the elements of a string list and separate them by a space </s>
funcom_train/40450444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTrailingWhitespace() throws Exception { List<Integer> integers = gson.fromJson("[1,2,3] \n\n ", new TypeToken<List<Integer>>() {}.getType()); assertEquals(Arrays.asList(1, 2, 3), integers); } COM: <s> test that trailing whitespace is ignored </s>
funcom_train/6205047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getQualifiedSelection() { ISelection selection = getSelectionProvider().getSelection(); if (!(selection instanceof IStructuredSelection)) { return Collections.EMPTY_LIST; } List qualified = new ArrayList(); List selected = ((IStructuredSelection) selection).toList(); Iterator it = selected.iterator(); while (it.hasNext()) { Object current = it.next(); if (current instanceof IGaijinElement) { qualified.add(current); } } return qualified; } COM: <s> get the items in the selection that are instances of igaijin element </s>
funcom_train/21620001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmpLoginDate() { System.out.println("setEmpLoginDate"); Date d = null; Session instance = Session.getInstance(); instance.setEmpLoginDate(d); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set emp login date method of class edu </s>
funcom_train/7745812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { Connection connection = makeNewConnection(); synchronized(this) { availableConnections.addElement(connection); connectionPending = false; notifyAll(); } } catch(Exception e) { throw new ApplicationException("The pool can't make new connections", e); } } COM: <s> run method for a connection </s>
funcom_train/46939957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnexpectedMethodCall() { try { mockControl.expect(new Dependency1() { public void op2(TransferObject1 obj) { } }); componentClass.op2(null); mockControl.verify(); fail("Expecting a test failure (UnexpectedOperationError), but didn't detect one"); } catch (UnexpectedOperationError e) { // Failure expected - remove the try/catch to see how the failure would normally look } } COM: <s> test the handling of a completely unexpected call </s>
funcom_train/36459369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleRTPPacket(DatagramPacket packet, long time) { try { if (firstTime == -1) { firstTime = time; } RTPHeader header = new RTPHeader(packet); sequenceTimeMap.put(new Long(header.getTimestamp()), new Long(time - firstTime)); rtpStream.handlePacket(packet, time); } catch (IOException e) { e.printStackTrace(); } } COM: <s> handles an rtp packet </s>
funcom_train/36429661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArPath(long id) throws ArUnvalidIndexException { if (ArkDirConstants.isIdUniqueKO(id)) { this.clear(); throw new ArUnvalidIndexException("ID is invalid"); } this.idUnique = id; this.sPaths = ArkAbstractDirFunction.getDirFunction(this) .idUniqueToStrings(id); } COM: <s> create a ark path from an id </s>
funcom_train/48150842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getVariance() { double sum = 0, mu = getMean(), m; for (int i = 0; i < n; i++) { m = distributions[i].getMean(); sum += probabilities[i] * (distributions[i].getVariance() + m * m); } return (sum - (mu * mu)); } COM: <s> this method computes the variance of the mixture distributions in terms </s>
funcom_train/41838502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startScript(PrintWriter writer) throws IOException { if (isWindows()) { writer.println("@ECHO OFF"); } else { File sh = new File("/bin/sh"); if (!sh.exists()) { sh = new File("/usr/bin/sh"); } writer.println("#!" + sh.getAbsolutePath()); } } COM: <s> writes the script header which for unix is code bin sh code or </s>
funcom_train/47750908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nbServerFromServersInfoTable(String netbios) { String query2 = "SELECT COUNT(*) AS rowcount FROM SERVER_INFO WHERE NETBIOS='" + netbios + "'"; try { ResultSet rs2 = dataBaseManager.JDBCexecuteQuerySelect(query2); rs2.next(); return rs2.getInt("rowcount"); } catch (Exception e) { System.err.println("Error when count nb server from server table"); System.err.println(e); e.printStackTrace(); return -1; } } COM: <s> return the number of servers of with the given parameters inside the </s>
funcom_train/23389335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(String expr) { this.expression = expr; this.expressionLength = expr.length(); for (int i = 0; i < this.matchers.length; i++) if (this.matchers[i] != null) this.matchers[i].reset(expr); this.position = 0; } COM: <s> reset the parser and set it up for the new expression </s>
funcom_train/14588722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int runAfterKickoff(Play[] play) { int blockRun = (int)(Math.atan(50 * Math.random()) * getOffense().sumRunAfterKickoff(play)); int run = (int)(Math.atan(50 * Math.random()) * getDefense().sumRunAfterKickoff(play)); // higher multiplir b/c running start // TODO: may adjust for consistency w/ other running plays return (int)(.05 * (run - blockRun) + 5); } COM: <s> handles kick returns </s>
funcom_train/3562579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CorasComboBox getDomainBox() { if (domainBox == null) { domainBox = new CorasComboBox(); domainBox.setEditable(editable); domainBox.setModel(new DefaultComboBoxModel(new String[] {"General", "eCommerce", "Telemedicine"} )); domainBox.addPropertyChangeListener(CorasComboBox.SELECTED_ITEM, propListener); } return domainBox; } COM: <s> this method initializes coras choice box </s>
funcom_train/1443355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initBaseConfig() { String tmp = null; tmp = (String) this.config.get(TEAM_NAME); if (tmp != null) this.teamName = tmp; tmp = (String) this.config.get(HOST_NAME); if (tmp != null) this.serverHost = tmp; tmp = (String) this.config.get(HOST_PORT); if (tmp != null) this.serverPort = Integer.parseInt(tmp); tmp = (String) this.config.get(MODE); if (tmp != null) this.mode = Integer.parseInt(tmp); // call to the subclass initialization initConfig(); } COM: <s> this method initializes all basic configuration attributes i </s>
funcom_train/25656522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void waitForEvents(Event e) { String eventSource = e.getClass().getName(); // wait for the page processing pipeline to empty boolean done = false; while (!done) { if (planner.getJobCount(eventSource) == 0) { done = true; } else { // sleep for a bit and loop try { Thread.sleep(1000); } catch (InterruptedException ie) { } } } } COM: <s> wait for all jobs operating on the the given event type </s>
funcom_train/42536213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof MsgHead))return false; if(o == this)return true; MsgHead oo = (MsgHead)o; return (((Object)key).equals(oo.key))&&(((Object)value).equals(oo.value)); } COM: <s> is the given object equal to this msg head </s>
funcom_train/37476353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List createDatasets() { List sets = new ArrayList(); for (Iterator it = datasetTemplates.keySet().iterator(); it.hasNext();) { DatasetTemplate temp = (DatasetTemplate) datasetTemplates.get(it.next()); sets.add(temp.createDataset()); } return sets; } COM: <s> will create the datasets from their templates </s>
funcom_train/32056736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHandleConnection() { System.out.println("testHandleConnection"); DefaultGraphModel dgm = new DefaultGraphModel(); ConnectionSet.Connection c = new ConnectionSet.Connection( new DefaultEdge(), new DefaultEdge(), true ); dgm.handleConnection(c); } COM: <s> this function tests handle connection function of default graph model class </s>
funcom_train/36003188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLsfileacGenerate() throws Exception { /* Build the model */ CixsJbossEsbService cixsJbossEsbService = Samples.getLsfileacService(); initCixsJbossEsbService(cixsJbossEsbService); mAntModel.setSampleConfigurationTransport(JBossESBTransport.JBM); mAntModel.getJbmTransportParameters().initialize(cixsJbossEsbService.getName()); processAnt(); } COM: <s> adapter case for an lsfileac </s>
funcom_train/20883320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpBinary(ByteBuffer bb) throws IOException { char[] nameArray = (name + " ").toCharArray(); bb.putInt(MAGIC); for (int i = 0; i < NAME_LENGTH; i++) { bb.putChar(nameArray[i]); } bb.putInt(midPoint); bb.putInt(samples.length); for (int i = 0; i < samples.length; i++) { samples[i].dumpBinary(bb); } } COM: <s> dumps the diphone to the given channel </s>
funcom_train/3366614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize(JComponent c) { long width = 0; Enumeration enumeration = table.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { TableColumn aColumn = (TableColumn)enumeration.nextElement(); width = width + aColumn.getPreferredWidth(); } return createTableSize(width); } COM: <s> return the preferred size of the table </s>
funcom_train/28763234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(java.lang.Integer value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_State, jj_State,kk_State, com.intersys.objects.Database.RET_PRIM, "State", dh); return; } COM: <s> sets new value for code state code </s>
funcom_train/12081459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getRecordExpenditure() { if (RecordExpenditure == null) {//GEN-END:|50-getter|0|50-preInit // write pre-init user code here RecordExpenditure = new Command("Expenditure", Command.ITEM, 0);//GEN-LINE:|50-getter|1|50-postInit // write post-init user code here }//GEN-BEGIN:|50-getter|2| return RecordExpenditure; } COM: <s> returns an initiliazed instance of record expenditure component </s>
funcom_train/34339793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand2() { if (exitCommand2 == null) {//GEN-END:|61-getter|0|61-preInit // write pre-init user code here exitCommand2 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|61-getter|1|61-postInit // write post-init user code here }//GEN-BEGIN:|61-getter|2| return exitCommand2; } COM: <s> returns an initiliazed instance of exit command2 component </s>
funcom_train/44706167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String label, String url) { if(size() > 0) { add(new Label(" | ")); } if(label != null && label.equalsIgnoreCase(currentLabel)) { Label boldLabel = new Label(label); boldLabel.setFontWeight(Label.BOLD); add(boldLabel); } else { add(new com.arsdigita.bebop.Link(label, url)); } } COM: <s> add a label to the navbar </s>
funcom_train/36110924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instances performLsa(Instances data, int rank) { LatentSemanticAnalysis lsa = new LatentSemanticAnalysis(); lsa.setRank(rank); try { lsa.buildEvaluator(data); data = lsa.transformedData(data); } catch (Exception e) { throw new RuntimeException("Failed to perform LSA", e); } return data; } COM: <s> performs latent semantic analysis on the given instances using the specified rank </s>
funcom_train/18903072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ConstraintElement blankToVariable(Node blankNode) { Node_Blank bnode = (Node_Blank) blankNode; if (nodesToVariables.containsKey(bnode)) { return (ConstraintElement) nodesToVariables.get(bnode); } else { Variable newVar = varFactory.newVariable(); nodesToVariables.put(bnode, newVar); return newVar; } } COM: <s> converts a jena blank node into a variable </s>
funcom_train/45192245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh() { StringBuilder buf = new StringBuilder(); if (options != null) { WIterator it = options.iterator(); for (int i = 0; it.next(); i++) { buf.append(it.column(2)).append('\035'); } } buf.append(String.valueOf(selectedIndex)); sendSetOptions(buf.toString()); } COM: <s> reread the contents of the options wdata update </s>
funcom_train/19142433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllClasses() { List all = new ArrayList(); for (Iterator iter = scripts.iterator(); iter.hasNext();) { Script script = (Script) iter.next(); all.addAll(script.getAllClasses()); } Collections.sort(all, BaseEntity.COMPARATOR); return all; } COM: <s> returns all classes on this project </s>
funcom_train/5392186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XPathQueryService getXPathQueryServiceFromCollection(Collection collection) throws XMLDBException { XPathQueryService service = XMLServiceUtils.getXPathQueryServiceFromCollection(collection); //add the namespaces to this service if (getNameSpaces() != null) { Iterator keys = getNameSpaces().keySet().iterator(); while (keys.hasNext()) { String key = (String) keys.next(); service.setNamespace(key, (String) getNameSpaces().get(key)); } } return service; } COM: <s> returns a configured xpath query service from a given collection </s>
funcom_train/1722394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onMenuOpened(Menu menu) { int ix = 0; for (MenuAction action : mMenuActions) { MenuItem item = menu.getItem(ix); String label = action.getLabel(); if (!item.getTitle().equals(label)) item.setTitle(label); item.setEnabled(action.isEnabled()); ix++; } return true; } COM: <s> give the menu items a chance to update the text </s>
funcom_train/48631436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long taskIDForLastClockEntry() { long lastClockID = lastClockEntry(); Cursor mCursor = mDb.query(true, CLOCK_DATABASE_TABLE, new String[] { KEY_CHARGENO }, KEY_ROWID + " = " + lastClockID, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } if (mCursor.isAfterLast()) return -1; long response = mCursor.getLong(0); mCursor.close(); return response; } COM: <s> retrieve the last entry in the table </s>
funcom_train/43188122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void syncStart(Time tbt) { if (getState() == STARTED) { throwError(new ClockStartedError("syncStart() cannot be used on an already started clock.")); } // If the given start time is already later than now. We'll reset // the clock start time to now. if (master.getNanoseconds() > tbt.getNanoseconds()) startTime = master.getNanoseconds(); else startTime = tbt.getNanoseconds(); } COM: <s> start the clock with the given time base time </s>
funcom_train/4137239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSeparatorOrGroupMarker(MenuManager menu, String groupId) { String prefId = "useSeparator." + menu.getId() + "." + groupId; //$NON-NLS-1$ //$NON-NLS-2$ boolean addExtraSeparators = IDEWorkbenchPlugin.getDefault() .getPreferenceStore().getBoolean(prefId); if (addExtraSeparators) { menu.add(new Separator(groupId)); } else { menu.add(new GroupMarker(groupId)); } } COM: <s> adds a code group marker code or code separator code to a menu </s>
funcom_train/4519256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RButton getRButton31116() { if (RButton31116 == null) { RButton31116 = new RButton(3); RButton31116.setText("C"); RButton31116.setBounds(new Rectangle(550, 370, 50, 120)); RButton31116.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { (new TestCellEachEditor()).setVisible(true); } }); } return RButton31116; } COM: <s> this method initializes rbutton31116 </s>
funcom_train/13895604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPermitDesc(String sPermitID) { String sResult = null; try { ResultSet set = this.pds.getPermitDesc(sPermitID); if (PooledGeneralDAO.getInstance().getRowCount(set) > 0) { sResult = set.getString(PermitDataSource.cPermit); } } catch (Exception e) { log .info("An exception has occurred when trying to get the permit desc."); } finally { this.cleanUp(); } return sResult; } COM: <s> i added this method because i believe getting the entire permit is </s>
funcom_train/34982728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPayed(Integer newVal) { if ((newVal != null && this.payed != null && (newVal.compareTo(this.payed) == 0)) || (newVal == null && this.payed == null && payed_is_initialized)) { return; } this.payed = newVal; payed_is_modified = true; payed_is_initialized = true; } COM: <s> setter method for payed </s>
funcom_train/20888412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeOldOneTimeConsumptionInformation() { LinkedList<OneTimeConsumptionInformation> outdated = new LinkedList<OneTimeConsumptionInformation>(); double currentTime = config.getKernel().getCurrentTime(); for (OneTimeConsumptionInformation information : activeOneTimeConsumptionInformation) { if (information.endtime <= currentTime) { outdated.add(information); } } for (OneTimeConsumptionInformation information : outdated) { activeOneTimeConsumptionInformation.remove(information); } } COM: <s> removes one time consumption information whos enddate is now or already passed </s>
funcom_train/24514564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(Document doc, int insertPos) throws BadLocationException, IOException { int i; int contentSize = size(); String text; for(i=0;i<contentSize;i++) { text = getCharactersAt(i); doc.insertString(insertPos, text, getCharacterAttributes(i)); insertPos += text.length(); } } COM: <s> insert this code styled text code into a code document code </s>
funcom_train/22607382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumn(int i, double size) { // Make sure size is valid if (size < 0.0 && size != TableLayoutConstraints.FILL && size != TableLayoutConstraints.PREFERRED && size != TableLayoutConstraints.MINIMUM) { size = 0.0; } // Copy new size columnSpec[i] = size; // Indicate that the cell sizes are not known dirty = true; } COM: <s> adjusts the width of a single column in this layout </s>
funcom_train/3043496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String generateDeleteString() { StringBuffer buf = new StringBuffer("delete from ") .append( getTableName() ) .append(" where ") .append( StringHelper.join( " = ? and ", getIdentifierColumnNames() ) ) .append(" = ?"); if ( isVersioned() ) { buf.append(" and ") .append( getVersionColumnName() ) .append(" = ?") ; } return buf.toString(); } COM: <s> generate the sql that deletes a row by id and version </s>
funcom_train/44099857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void test(final java.io.PrintStream out, final long check, final String label) { if (check > 0) test(out, new Natural(check), label); else if (check == 0) testZero(out, label); else ((MutableNumber) minus()).test(out, -check, label + " (negated for testing)"); } COM: <s> convenience method for auditing checking a mutable number against a long </s>
funcom_train/47731439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StorageManagerInterface get(Constants.STORAGEIMPL storageImpl) { StorageManagerInterface manager = null; switch (storageImpl) { case RIAK: { manager = new RiakManager(args); break; } case CASSANDRA: { //TODO add cassandra implementation log.error("Cassandra implementation is not yet available!"); System.exit(0); break; } case MONGODB: { manager = new MongoDBManager(args); break; } case MOCK: { log.warn("Using MOCK implementation, this is a backend simulation only"); manager = new MockStorageManager(args); break; } default: { log.warn("Using default storage implentation RIAK"); manager = new RiakManager(args); break; } } return manager; } COM: <s> get a storage handler based on selected implementation </s>
funcom_train/37017881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSelected(boolean b){ String info = ""; if(b){ getMAppearance().BORDERCOLOR= Color.yellow; info = "Selection : " + " Container " + getName(); }else{ getMAppearance().BORDERCOLOR= Color.cyan; } setBorder(new LineBorder(getMAppearance().BORDERCOLOR,border)); (theParentMap.getParentMgt()).writeInfoPane(info); } COM: <s> set the container as selected </s>
funcom_train/44136000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStatusIdEqual(TimeStamp timeStamp) { if (isStatusIdValid() && timeStamp.getStatus() != null && timeStamp.getStatus().getId().equals(statusId)) return true; if (timeStamp.getStatus() == null && !isStatusIdValid()) return true; return false; } COM: <s> check if the current status is euqal to the status of a timestamp </s>
funcom_train/51100925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getPrefetches() { if (getPrefetchTree() != null) { Collection nodes = getPrefetchTree().nonPhantomNodes(); Collection paths = new ArrayList(nodes.size()); Iterator it = nodes.iterator(); while (it.hasNext()) { paths.add(((PrefetchTreeNode) it.next()).getPath()); } return paths; } return Collections.EMPTY_LIST; } COM: <s> returns a collection of string paths indicating relationships to objects that are </s>