__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7627954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean decodeValueLength(int startIndex) { if ((wspData[startIndex] & 0xff) > WAP_PDU_LENGTH_QUOTE) { return false; } if (wspData[startIndex] < WAP_PDU_LENGTH_QUOTE) { unsigned32bit = wspData[startIndex]; dataLength = 1; } else { decodeUintvarInteger(startIndex+1); dataLength ++; } return true; } COM: <s> decode the value length type for wsp pdu </s>
funcom_train/3079436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackgroundImage(String fileName) { java.awt.Image image = ImageLoader.getImage(this, fileName); if (image != null) { setBackgroundImage(image); } else { printError("The background image named \"" + fileName + "\" could not be found. Using default."); setDefaultBackground(); } } COM: <s> sets the background image of the sim box </s>
funcom_train/2369137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showNetworkMonitor(final String actionCommand) { final String player = extractPlayer(actionCommand); if (player != null && GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice().getFullScreenWindow() == null) { this.wizCtrl.server.debugStartNetworkMon(player); } } COM: <s> starts a network monitor and a gui for the given player </s>
funcom_train/38725789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlatformConfig createConfig() throws PlatformConfigException { try { //return createConfigFromDocument(parseDocument(getDefinitions(getFile()))); return PlatformConfigFileParser.parse(getFile()); } catch (Exception e) { throw new PlatformConfigException("could not create the platform", e); } } COM: <s> reads the os definition file and creates the platform config </s>
funcom_train/9643574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(List<String> ids) { getOverviewZoomTreeModel().remove(ids); // re-get attribute objects from this list and delete them from the // AttributeGroupManager List<Attribute> atts = new ArrayList<Attribute>(); for (String id : ids) { atts.add(DMManager.getInstance().getOntology().getAttribute(id)); } AttributeGroupManager.getInstance().removeFromGroup( AttributeGroupManager.ZOOMTABLE, atts); } COM: <s> removes the ids </s>
funcom_train/4260695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuffer sb = new StringBuffer(); sb.append("Slots used: "); sb.append(slotsUsed()); sb.append(" MaxStack: "); sb.append(maxStack); sb.append(".\n"); for (int i=0; i<size(); i++){ sb.append(peek(i)); sb.append(" (Size: "); sb.append(String.valueOf(peek(i).getSize())); sb.append(")\n"); } return sb.toString(); } COM: <s> returns a string representation of this operand stack instance </s>
funcom_train/18712512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeMarkerDRI(OutputStream os, int restart_interval) throws IOException { if (restart_interval > 0) { os.write(M_PRX); os.write(M_DRI); os.write(0); os.write(4); os.write(restart_interval >> 8); os.write(restart_interval & 255); writecounter += 6; } } COM: <s> internal method to write restart marker </s>
funcom_train/43268529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getVifName() throws IOException { final String vif = url.toExternalForm(); final int idx = vif.lastIndexOf("/") + 1; final String vifName = vif.substring(idx); if (!vifName.endsWith(".vif")) { throw new IOException(vif + " must end have the format of YYYYDDDSPn.vif"); } return vifName; } COM: <s> the input file name is expected to be of the format yyyydddspx </s>
funcom_train/24634936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHorizontalLine(float linewidth, float percentage, Color color, int align) { if (attributes == null) attributes = new HashMap(); attributes.put(HORIZONTAL_LINE, new Object[]{new Float(linewidth), new Float(percentage), color, new Integer(align)}); } COM: <s> orders this graphic to draw a horizontal centered line </s>
funcom_train/3113713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { //// 1. Create the Interaction Handler. InteractionHandler ihandler = createNewInteractionHandler(); ihandler.setGestureInterpreter(getClassPropertyGestureInterpreter()); ihandler.setInkInterpreter(getClassPropertyInkInterpreter()); setInteractionHandler(ihandler); //// 2. Create the View Handler. ViewHandler vhandler = createNewViewHandler(); vhandler.setView(new DefaultView()); setViewHandler(vhandler); } // of initialize COM: <s> initialize class specific things like the interaction handler and view </s>
funcom_train/1041683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int n) { Throwable t = new Throwable(); t.printStackTrace(); int newValue = Math.max(n, min); if (newValue + getExtent() > max) { newValue = max - getExtent(); } setRangeProperties(newValue, getExtent(), min, max, isAdjusting); } COM: <s> sets the current value of the model </s>
funcom_train/7600292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getIndividualsWithObjectProperty(ATermAppl r, ATermAppl o) { ensureConsistency(); if(!isIndividual(o)) { if( PelletOptions.SILENT_UNDEFINED_ENTITY_HANDLING ) return Collections.EMPTY_LIST; else throw new UnsupportedFeatureException(o + " is not an individual!"); } Role role = rbox.getRole(r); ATermAppl invR = role.getInverse().getName(); return getObjectPropertyValues( invR, o ); } COM: <s> list all subjects with the given value for the specified object </s>
funcom_train/1444295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private char convertIntToCharacter(int value, int minValue, int maxValue) { value = Math.max(value, minValue); value = Math.min(value, maxValue); double range = maxValue - minValue; double v = value; v = v / range; this.data_1[0] = v; return (NumberConverter.convertToChars(data_1, 1))[0]; } COM: <s> this method converts an integer to a character of the given char alphabet </s>
funcom_train/1447995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String delete() throws Exception{ if (logger.isDebugEnabled()) { logger.debug("delete() - start"); //$NON-NLS-1$ } Banneddomain blockDomain = BanneddomainsDelegator.getBannedDomainbyId(id); deleteBlockDomainName = blockDomain.getDomainName(); domainid = blockDomain.getId(); deleteBlockedDomain(); BanneddomainsDelegator.deleteBannedDomain(banneddomain); banneddomainlist = BanneddomainsDelegator.getBannedDomain(); if (logger.isDebugEnabled()) { logger.debug("delete() - end"); //$NON-NLS-1$ } return SUCCESS; } COM: <s> delete a banned domain </s>
funcom_train/25870805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDestination(final String destination) { if(destination == null) throw new IllegalArgumentException("The " + "destination must not be null."); if(destination.length() == 0) throw new IllegalArgumentException("The" + " destination length must not be 0."); this.destination = destination; } COM: <s> set the destination of this bus </s>
funcom_train/9408774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToMillis() { for (long t = 0; t < 88888; ++t) { assertEquals(1000L*t, TimeUnit.SECONDS.toMillis(t)); assertEquals(t, TimeUnit.MILLISECONDS.toMillis(t)); assertEquals(t, TimeUnit.MICROSECONDS.toMillis(t*1000L)); assertEquals(t, TimeUnit.NANOSECONDS.toMillis(t*1000000L)); } } COM: <s> to millis correctly converts sample values in different units to </s>
funcom_train/45775229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractHost(String ftpUrl) { if (ftpUrl == null || ftpUrl.length() < 6) return ""; String url = ftpUrl.substring(6); int i = url.indexOf("/"); if (i == -1) return url; else return url.substring(0, i); } COM: <s> extract the hostname out of the url used by the </s>
funcom_train/31689954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOperator(int index) throws DataStoreException { if (m_wheres.get(index) instanceof WhereCondition) { return (((WhereCondition) m_wheres.get(index)).getOperator()); } else { throw new DataStoreException("Invalid Class: " + m_wheres.get(index).getClass() .getName()); } } COM: <s> returns the comparison operator of the condition at the specified </s>
funcom_train/4136759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillMenuBar(IMenuManager menuBar) { menuBar.add(createFileMenu()); // menuBar.add(createEditMenu()); // menuBar.add(createNavigateMenu()); // menuBar.add(createProjectMenu()); menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); // menuBar.add(createWindowMenu()); // menuBar.add(createHelpMenu()); } COM: <s> fills the menu bar with the workbench actions </s>
funcom_train/47731424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAll(String key) throws StorageException { StorageObject object = get(key); delete(key); log.debug("shards? "+object.getShards()); if(object.getShards()!=null && object.getShards().size()>0) { for(String shardKey : object.getShards()) { log.debug("deleting shard "+shardKey); delete(shardKey); } } } COM: <s> deletes an object from backend with its shards </s>
funcom_train/15567801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setDataModel(int _row,int _column, DataModel _value) { if (dataModelRowList[_row]==null) return false; if (dataModelV[_row].length>=_column) return false; dataModelV[_row][_column]=_value; return true; } COM: <s> code set data model code sets a data model at a specified position </s>
funcom_train/20841602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeNode getChilds(String controlId, String[] parentId) { TreeState state = states.get(controlId); TreeNode childs=null; try { state.openNode(parentId); childs=getChilds(state, parentId); } catch(TreeSelectorException tse) { states.remove(controlId); throw new RuntimeException(tse.getMessage()); } return childs; } COM: <s> retrieves the childs of the given node </s>
funcom_train/22368968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkDisconnection() { if (!deviceHandler.isDeviceConnected()) { return false; } File deviceLocationFile = new File(deviceHandler.getDeviceLocation()); if (!deviceLocationFile.exists()) { Logger.info("Device disconnected"); deviceListeners.deviceDisconnected(deviceLocationFile.getAbsolutePath()); return true; } return false; } COM: <s> checks if device has been disconnected returning true if so false otherwise </s>
funcom_train/9237655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaximumArgument() { if (this.op == OPERATION.NOOP) { return 0; } else if (this.op == OPERATION.VAR) { return argument; } else if (this.op == OPERATION.NOT) { return leftArg.getMaximumArgument(); } else { return Math.max(leftArg.getMaximumArgument(), rightArg.getMaximumArgument()); } } COM: <s> retrieves the highest argument number that is used in this condition tree </s>
funcom_train/41504841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getReactorTargetDir(MavenProject prj) { if (prj.getParent() != null) { if (prj.getParent().getBasedir() != null && prj.getParent().getBasedir().exists()) { return getReactorTargetDir(prj.getParent()); } } return new File(prj.getBuild().getDirectory()); } COM: <s> find the reactor target dir </s>
funcom_train/10300931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAsList(Object key) { if (containsKey(key)) { Object o = get(key); if (o instanceof List) { return (List)o; } else { return Arrays.asList(new Object[] { o }); } // end of else } else { return Collections.EMPTY_LIST; } // end of else } COM: <s> convenience method for retrieving the value for </s>
funcom_train/27905814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double satCount(int bdd) { // if the number of variables has changed since the last time, the cache is invalid! if(last_sat_vars != -1 && last_sat_vars != num_vars) sat_cache.invalidate_cache(); last_sat_vars = num_vars; return Math.pow(2, getVar(bdd)) * satCount_rec(bdd); } COM: <s> returns the number of satisfying assignments for this bdd </s>
funcom_train/14093402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearProperties() { m_xmlTestSuite.addProperty("TEST", "ABC"); m_xmlTestSuite.clearProperties(); Object o = m_xmlTestSuite.getProperty("TEST"); assertNull("Property should not be found", o); } COM: <s> test clear properties </s>
funcom_train/24000789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTypeExpression() { VariableDeclarationTEAst instance = new VariableDeclarationTEAst(-1, TokenFactory.createToken(-1), "test","String"); OclExpressionAst exp = new TestOclExpressionAst("exp", OclObjectFactory.FALSE); instance.addChild(exp); assertEquals(OclTypeRegistry.OclStringType,instance.getTypeExpression()); } COM: <s> test of get type expression method of class variable declaration teast </s>
funcom_train/47020448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getEnableDisable() { if (EnableDisable == null) {//GEN-END:|88-getter|0|88-preInit // write pre-init user code here EnableDisable = new Command(getLocalizedString("ED"), Command.ITEM, 9);//GEN-LINE:|88-getter|1|88-postInit // write post-init user code here }//GEN-BEGIN:|88-getter|2| return EnableDisable; } COM: <s> returns an initiliazed instance of enable disable component </s>
funcom_train/41164589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AgStatusQuestion update(AgStatusQuestion entity) { EntityManagerHelper.log("updating AgStatusQuestion instance", Level.INFO, null); try { AgStatusQuestion 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 ag status question entity and return it or a </s>
funcom_train/51699817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransitionDefinition addGlobalTransition(String transitionId, String toStateId, String toOwner) { TransitionMap globalTransitions = getInitialTransitionsMap(); TransitionDefinition globalTrans = new TransitionDefinition(globalTransitions); return addTransition(globalTransitions, globalTrans, transitionId, toStateId, toOwner, false); } COM: <s> add an global transition to the workflow </s>
funcom_train/42067261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent evt) { progressMonitor = new ProgressMonitor(ProgressMonitorDemo.this, "Running a Long Task", "", 0, task.getLengthOfTask()); progressMonitor.setProgress(0); progressMonitor.setMillisToDecideToPopup(2 * ONE_SECOND); startButton.setEnabled(false); task.go(); timer.start(); } COM: <s> called when the user presses the start button </s>
funcom_train/20980595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTGLRect union(JTGLRect r) { int x1 = Math.min(x, r.x); int x2 = Math.max(x + width, r.x + r.width); int y1 = Math.min(y, r.y); int y2 = Math.max(y + height, r.y + r.height); return new JTGLRect(x1, y1, x2 - x1, y2 - y1); } COM: <s> computes the union of this code jtglrect code with the </s>
funcom_train/19625075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseMoved(int oldx, int oldy, int newx, int newy) { mouseX = newx; mouseY = newy; if (disconnect.mouseHover(mouseX, mouseY)) { focused = Multitris.CHAT_HOST_LEAVE; } else if (mode == HOST && start.mouseHover(mouseX, mouseY)) { focused = Multitris.CHAT_HOST_START; } else if (focused != Multitris.CHAT_HOST_CHATBOX) { focused = -1; } } COM: <s> informs the lobby state that the mouse has been moved </s>
funcom_train/8884288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VerticalPanel createTaskItems() { // Create the list of tasks VerticalPanel contactsPanel = new VerticalPanel(); contactsPanel.setSpacing(4); String[] contactNames = { "ab", "cd" }; for (int i = 0; i < contactNames.length; i++) { final String contactName = contactNames[i]; final HTML contactLink = new HTML( "<a href=\"javascript:undefined;\">" + contactName + "</a>"); contactsPanel.add(contactLink); } return contactsPanel; } COM: <s> create the list of tasks to the left </s>
funcom_train/31480620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(byte ba[]) { if ((this.string.length - this.length) < ba.length) this.grow(ba.length - (this.string.length - this.length) + 1); for (int _l = 0; _l < ba.length; _l++) this.string[this.length++] = ba[_l]; } COM: <s> append a byte array to this object </s>
funcom_train/3340226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doLayout() { if (_isValid) return; if (_layoutMgr != null) { _layoutMgr.doLayout(this); /* Don't set the _isValid flag if the layout manager flag * is an instance of LayoutManager2; the doLayout method must * be called every time because the parent window may have been * resized. * Instances of LayoutManager, on the other hand, are not affected * be resizing of the parent window. */ if (_layoutMgr instanceof LayoutManager2 == false) _isValid = true; } } COM: <s> do layout is intended to be used by subclasses of container such </s>
funcom_train/50633507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void marshal(String elementName, XMLMarshalContext context, boolean isRoot) { context.startElement(elementName, this, isRoot); marshalAttributes(context); marshalChildren(context); marshalReferences(context); context.endElement(elementName, this, isRoot); } COM: <s> xml serialization of the elements and all children </s>
funcom_train/12274207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int watch(OutputStream out, OutputStream err) throws InterruptedException { stdout = new IOStreamConnector(); stdout.connect(process.getInputStream(), out); stderr = new IOStreamConnector(); stderr.connect(process.getErrorStream(), err); return process.waitFor(); } COM: <s> watch and wait until the process has completed </s>
funcom_train/37036683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHeader(String name, String value) { if (isCommitted()) return; if (included) return; // Ignore any call from an included servlet synchronized (headers) { ArrayList values = (ArrayList) headers.get(name); if ((values != null) && (!values.isEmpty())) { values.remove(value); if (values.isEmpty()) headers.remove(name); } } } COM: <s> removes the specified header </s>
funcom_train/17351196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhotoSetBO getPhotoSetBO(){ PhotoSetBO psBO = null; try{ if(this.getPhotoId()!=null){ psBO = PhotoSetDAO.getInstance().read(this.getPhotoId()); } }catch(DataException ex){ ex.printStackTrace(); } return psBO; } COM: <s> returns a the photo set bo associated with the print order line </s>
funcom_train/7494319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPageCount(int hash){ Cursor c = db.query(PDF_FILE_TABLE, new String[] { PAGE_COUNT }, HASH_ID + "='" + hash+ "'" , null, null, null, null); int count =0; if( c.getCount() != 0){ c.moveToFirst(); count = c.getInt(0); c.close(); } return count; } COM: <s> returns the number of pages that was reported by pddocument </s>
funcom_train/50575457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private void useSQL(boolean b) { driverField.setEnabled(b); dbLabel.setEnabled(b); libraryBox.setEnabled(b); urlLabel.setEnabled(b); urlField.setEnabled(b); userLabel.setEnabled(b); userField.setEnabled(b); passwdLabel.setEnabled(b); passwdField.setEnabled(b); tablesButton.setEnabled(b); delTabButton.setEnabled(b); logSwitch.setEnabled(b); importButton.setEnabled(b); exportButton.setEnabled(b); } COM: <s> enables or disables the sql controls in the user interface </s>
funcom_train/26573282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setValue(JLabel l, Object value, int lineNumber) { if (value != null && value instanceof Icon) { l.setIcon((Icon) value); } else { l.setText(value == null ? "" : value.toString()); } l.setHorizontalAlignment(horizontalAlignment); l.setAlignmentX(alignmentX); l.setOpaque(false); l.setForeground(foreground); l.setFont(font); } COM: <s> method set value </s>
funcom_train/32319495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTo(Writer writer) throws IOException { int length = length(); int stopChunk = length / chunkSize; int stopColumn = length % chunkSize; for (int i = 0; i < stopChunk; i++) { writer.write(chunks[i], 0, chunkSize); } if (stopColumn > 0) { writer.write(chunks[stopChunk], 0, stopColumn); } } COM: <s> write the contents of the buffer to the writer </s>
funcom_train/6359890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JmeSceneBranchBean toSceneBranchBean(Node target) { if(target == null) return null; // ignore WeakReference<ObjectBean> beanRef = _beans.get(target); if(beanRef == null || beanRef.get() == null) { JmeSceneBranchBean bean = new JmeSceneBranchBean(target); beanRef = new WeakReference<ObjectBean>(bean); _beans.put(target, beanRef); } return (JmeSceneBranchBean)beanRef.get(); } COM: <s> adapts a model scene branch to a bean </s>
funcom_train/3723939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object other) { if (other == this) return 0; ATLASType type = (ATLASType) other; int result = getATLASClass().compareTo(type.getATLASClass()); return ((result != 0) ? result : name.compareTo(type.getName())); } COM: <s> not consistent with equals </s>
funcom_train/4853228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getHelpCommandPoisson() { if (helpCommandPoisson == null) {//GEN-END:|126-getter|0|126-preInit // write pre-init user code here helpCommandPoisson = new Command("Ajuda", Command.HELP, 0);//GEN-LINE:|126-getter|1|126-postInit // write post-init user code here }//GEN-BEGIN:|126-getter|2| return helpCommandPoisson; } COM: <s> returns an initiliazed instance of help command poisson component </s>
funcom_train/5342603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void downloadFinished(GUID guid) throws IllegalArgumentException { if (guid == null) throw new IllegalArgumentException("Input GUID is null!"); synchronized (_bypassedResults) { if (!_callback.isQueryAlive(guid) && !RouterService.getDownloadManager().isGuidForQueryDownloading(guid)) _bypassedResults.remove(guid); } } COM: <s> call this to inform us that a download is finished or whatever </s>
funcom_train/17592451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrial(TrialInfo i) { if (FindBestDomainOrder.TRACE > 2) FindBestDomainOrder.out.println(this+": Adding trial "+i); trials.put(i.order, i); if (best == null || best.cost > i.cost) { best = i; } sorted = null; } COM: <s> add the information about a trial to this collection </s>
funcom_train/43095146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateListeners(Object newOwner) { Object oldOwner = getOwner(); if (oldOwner != null) { Model.getPump().removeModelEventListener(this, oldOwner); } if (newOwner != null) { Model.getPump().addModelEventListener(this, newOwner); } } COM: <s> implementations of this method should register unregister the fig for all </s>
funcom_train/3595187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List removeQuantified(List vars) { List retlist = new Vector(); for (Iterator vit=vars.iterator(); vit.hasNext(); ) { String var = (String)vit.next(); if (!((Boolean)existvars.get(var)).booleanValue() && !((Boolean)forallvars.get(var)).booleanValue()) { retlist.add(var); } } return retlist; } COM: <s> remove quantified vars so they dont appear in result lists </s>
funcom_train/31346016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser(int id) throws DatabaseException { User user = (User)users.get(new Integer(id)); if (user != null) return user; user = engine.loadUser(id); if (user != null) { users.put(new Integer(user.getID()), user); users.put(user.getUserName(), user); } return user; } COM: <s> gets a user based on the given id returns code null code </s>
funcom_train/34564685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatString(final boolean drawX, final int focused) { final PlotAxis axis = drawX ? plotData.xAxis : plotData.yAxis; final byte[] val = axis.getValue(focused); if(val.length == 0) return ""; return axis.type == Kind.TEXT || axis.type == Kind.CAT ? string(val) : formatString(toDouble(val), drawX); } COM: <s> formats an axis caption </s>
funcom_train/13960865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public D2WPage d2wPage() { // Can't just use context().page(), because the d2wPage isn't necessarily the top-level // component. WOComponent component = this; do { component = component.parent(); } while( component != null && !(component instanceof D2WPage) ); return (D2WPage)component; } COM: <s> finds the containing d2 wpage if possible </s>
funcom_train/40853596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem2() { if (stringItem2 == null) {//GEN-END:|57-getter|0|57-preInit // write pre-init user code here stringItem2 = new StringItem("", "a usar el sistema.");//GEN-LINE:|57-getter|1|57-postInit // write post-init user code here }//GEN-BEGIN:|57-getter|2| return stringItem2; } COM: <s> returns an initiliazed instance of string item2 component </s>
funcom_train/26276729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _removeSystemButton_actionPerformed(ActionEvent e) { ftraq.settings.LgSystemID selectedId = (ftraq.settings.LgSystemID) this.knownSystemsList.getSelectedValue(); if (selectedId != null) { this._lgSettings.removeSystemID(selectedId); this.idStringAliasesList.setListData(new Object[0]); } this._updateValuesFromLgSettings(); } COM: <s> called when the remove system button is clicked </s>
funcom_train/22031018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return new String(paramName + " "+paramUnit+" "+rows+" "+ columns+" "+ levelValue+" "+levelUnit+" "+ referenceTime.toGMTString()+ " "+ (int) validHour + " or "+validTime.toGMTString() ); } COM: <s> return a string representation of the mc idasgrid directory </s>
funcom_train/47212288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustSize(int windowWidth, int windowHeight) { int scrollWidth = windowWidth - scroller.getAbsoluteLeft() - 5; if (scrollWidth < 1) { scrollWidth = 1; } int scrollHeight = windowHeight - scroller.getAbsoluteTop() - 39; if (scrollHeight < 1) { scrollHeight = 1; } scroller.setPixelSize(scrollWidth, scrollHeight); } COM: <s> adjusts the widgets size such that it fits within the windows client </s>
funcom_train/11390229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkScheme(URI uri, String supportedScheme) { String scheme = uri.getScheme(); if (scheme == null) { throw new HadoopIllegalArgumentException("Uri without scheme: " + uri); } if (!scheme.equals(supportedScheme)) { throw new HadoopIllegalArgumentException("Uri scheme " + uri + " does not match the scheme " + supportedScheme); } } COM: <s> check that the uris scheme matches </s>
funcom_train/21436974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubMenu(String submenuName) { this.subMenu = submenuName; IMenuItem subMenuItem = EMenu.forName(submenuName); if(subMenuItem != null) { this.setCurrentSubMenuItem(subMenuItem); this.setCurrentMainMenuItem(subMenuItem.getParent()); } } COM: <s> set the sub menu field </s>
funcom_train/49670672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLabelAppName() { labelAppName = new Label(shell, SWT.NONE); labelAppName.setText(Version.APP_NAME); labelAppName.setLayoutData(SharedStyle.relativeTo(null, logo)); labelAppName.setFont(SharedStyle.FONT_BOLD); } COM: <s> creates label with application name </s>
funcom_train/28363545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void populateForms() { removePropListeners(); text = myProbe.getComment(); textField.setText(text); s = myProbe.getPosition(); sField.setTextFromDouble(s); W = myProbe.getKineticEnergy() / 1.e6; wField.setTextFromDouble(W); // q = myProbe.getSpeciesCharge() / 1.602e-19; q = myProbe.getSpeciesCharge(); qField.setTextFromDouble(q); Er = myProbe.getSpeciesRestEnergy() / 1.e6; erField.setTextFromDouble(Er); addPropListeners(); } COM: <s> populate the probe independent forms s w q er </s>
funcom_train/15623442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllBaseAttributes() throws M4Exception { Collection c = this.getAllBaseAttributes(); Iterator it = (new Vector(c)).iterator(); while (it.hasNext()) { edu.udo.cs.miningmart.m4.core.Feature ba = (edu.udo.cs.miningmart.m4.core.Feature) it.next(); this.removeBaseAttribute(ba.getName()); } this.clearEstimations(); } COM: <s> removes all base attributes from this concept </s>
funcom_train/14468350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameter(String name) { try { Vector values = (Vector)parameters.get(name); if (values == null || values.size() == 0) { return null; } String value = (String)values.elementAt(values.size() - 1); if ("undefined".equals(value)) { return null; } return value; } catch (Exception e) { return null; } } COM: <s> returns the value of the named parameter as a string or null if </s>
funcom_train/12565907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nextTo(final int x, final int y, final double step) { final Rectangle2D thisArea = getArea(); thisArea.setRect(thisArea.getX() - step, thisArea.getY() - step, thisArea.getWidth() + 2 * step, thisArea.getHeight() + 2 * step); return thisArea.contains(x, y); } COM: <s> checks whether a certain point is near this entity </s>
funcom_train/45256348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Category desc) { /* fix for 1877 */ if (internalFindCategory(desc.getId()) == null) { dirtyViewCategoryMappings = true; // Mark categories list as dirty categories.add(desc); IConfigurationElement element = (IConfigurationElement) Util.getAdapter(desc, IConfigurationElement.class); if (element == null) { return; } PlatformUI.getWorkbench().getExtensionTracker() .registerObject( element.getDeclaringExtension(), desc, IExtensionTracker.REF_WEAK); } } COM: <s> add a category to the registry </s>
funcom_train/49458219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unGzipJava() throws Exception { StringBuffer sb = new StringBuffer(); ZipMeta meta = ZipHelper.unGzipJava("data/test.txt.gz"); try { // now checks contents InputStreamReader r = new InputStreamReader(meta.getInputStream()); try { BufferedReader in = new BufferedReader(r); try { String s; while ((s = in.readLine()) != null) { sb.append(s); sb.append("\n"); } } finally { in.close(); } } finally { r.close(); } } finally { meta.close(); } assertTrue("this is\na test\nfile\n".equals(sb.toString())); } COM: <s> ensure the unzip works with gz </s>
funcom_train/24919077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateElement(XMLSimpleElement el, List existingErrors, boolean fullCheck) { if (!isElementLengthOK(el)) { XMLValidationError verr = new XMLValidationError(XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, XPDLValidationErrorIds.ERROR_UNALLOWED_LENGTH, el.toName(), el); existingErrors.add(verr); } } COM: <s> validates xmlsimple element elements </s>
funcom_train/42474702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String applyDecapitalisationRule(String text) { Pattern pattern = Pattern.compile("^\\[(\\p{Upper})(\\p{Lower})"); Matcher matcher = pattern.matcher(text); if (matcher.find()) { text = matcher.replaceAll("[" + matcher.group(1).toLowerCase() + matcher.group(2)); } return text; } COM: <s> decapitalises words which follow a square bracket </s>
funcom_train/9663932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display() { setStyleName("advanced-masterDetailPanel"); for (int i = 0; i < getRowCount(); i++) { for (int j = 0; j < getCellCount(i); j++) { getCellFormatter().setStyleName(i, j, "gridPanel-cell"); } } } COM: <s> use this method just to apply css </s>
funcom_train/34340188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodigo4() { if (codigo4 == null) {//GEN-END:|40-getter|0|40-preInit // write pre-init user code here codigo4 = new TextField("COD4", null, 6, TextField.ANY);//GEN-LINE:|40-getter|1|40-postInit // write post-init user code here }//GEN-BEGIN:|40-getter|2| return codigo4; } COM: <s> returns an initiliazed instance of codigo4 component </s>
funcom_train/48614414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItem(InstitutionalItem institutionalItem, File institutionalItemIndex, boolean create) throws NoIndexFoundException { if (institutionalItemIndex == null) { throw new NoIndexFoundException("Institutional item index folder not found "); } writeDocument(institutionalItemIndex, getDocument(institutionalItem, true), create); } COM: <s> add an institutional item to the index </s>
funcom_train/4761362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecutableChannels1() { String[] servers = null; ec = new ExecutableChannels(servers); assertEquals("numServers<0", -1, ec.numServers() ); assertEquals("numChannels<0", -1, ec.numChannels() ); String ts = "" + ec; assertEquals("toString", "ExecutableChannels()", ts ); } COM: <s> tests if the executable channels could be initialized with null </s>
funcom_train/12086436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isModuleTargettedToAllServers(DomainRuntimeServiceMBeanConnection conn, ObjectName wldfResource) throws WebLogicMBeanException { ObjectName[] servers = conn.getChildren(conn.getDomainConfiguration(), SERVERS); ObjectName[] targets = conn.getChildren(wldfResource, TARGETS); if ((targets !=null) && (targets.length == servers.length)) { return true; } else { return false; } } COM: <s> determine if the current domain health harvester module is targetted to </s>
funcom_train/25198338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int logBanner(String tag, Object... args) { logBanner(); Object[] a = new Object[args.length + 1]; a[0] = getProgramName(); System.arraycopy(args, 0, a, 1, args.length); return log(tag, a); } COM: <s> write a message to the logger </s>
funcom_train/23216762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOntologyReferencePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DomainOntology_ontologyReference_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DomainOntology_ontologyReference_feature", "_UI_DomainOntology_type"), ContractPackage.Literals.DOMAIN_ONTOLOGY__ONTOLOGY_REFERENCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ontology reference feature </s>
funcom_train/18749435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String trim(String expr, char open, char close) { expr = expr.trim(); if (matches(expr, open, close)) { return expr.substring(expr.indexOf(open)+1, expr.lastIndexOf(close)); } else { return expr; } } COM: <s> removes a given outermost bracket pair from a given expression </s>
funcom_train/48052717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OPCEVENTSERVERSTATUS getStatus() throws JIException { JICallBuilder callObject = new JICallBuilder(true); callObject.setOpnum(0); callObject.addOutParamAsObject(new JIPointer(OPCEVENTSERVERSTATUS.getStruct()), JIFlags.FLAG_NULL); Object[] result = getCOMObject().call(callObject); return OPCEVENTSERVERSTATUS.fromStruct((JIStruct) ((JIPointer) result[0]).getReferent()); } COM: <s> retrieve the current server status </s>
funcom_train/14028075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectThreadWithId(long id) { for (final IThreadInfo ti:_threadEntries) { if (ti.getThreadID()==id) { SwingUtilities.invokeLater(new Runnable() { public void run() { _listView.setSelectedValue(ti,true); _textPane.setText(ti.toStringVerbose()); } }); break; } } } COM: <s> selects the thread with the specified unique id </s>
funcom_train/50169208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreValue() { dateTime = null; hadException = false; try { String value = editFieldModel.getValue(); dateTime = DateTimeValidator.xmlDateTimeFormat.parse(value); } catch (ParseException e) { hadException = true; } if (dateTime == null) { dateTime = new Date(); } } COM: <s> restores the value shown from the underlying model component </s>
funcom_train/8583199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BoundingBox intersectWith(BoundingBox bb) { latMin = Math.max(latMin, bb.latMin); lonMin = Math.max(lonMin, bb.lonMin); latMax = Math.min(latMax, bb.latMax); lonMax = Math.min(lonMax, bb.lonMax); return this; } COM: <s> adjusts the box so that the result is the intersection of both boxes </s>
funcom_train/10602373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Credential getCredential(Accreditable accreditable, Role role) { Credential credential = null; for (Iterator i = this.credentials.iterator(); i.hasNext();) { Credential cred = (Credential) i.next(); if (cred.getAccreditable().equals(accreditable) && cred.getRole().equals(role)) { credential = cred; } } return credential; } COM: <s> returns the credentials for a certain accreditable </s>
funcom_train/2584910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKeysOfDifferentClasses() { PaintMap m = new PaintMap(); m.put("ABC", Color.red); m.put(new Integer(99), Color.blue); assertEquals(Color.blue, m.getPaint(new Integer(99))); } COM: <s> this test covers a bug reported in the forum </s>
funcom_train/21105879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MJCheckBox getchBS_ACCOUNTED() { if (chBS_ACCOUNTED == null) { chBS_ACCOUNTED = new MJCheckBox(); chBS_ACCOUNTED.setText("Accounted"); chBS_ACCOUNTED.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING); chBS_ACCOUNTED.setThreeStates(true); } return chBS_ACCOUNTED; } COM: <s> this method initializes ch bs accounted </s>
funcom_train/37390702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void analyse(CSwitchGroupContext context) throws PositionedError { this.context = context; for (int i = 0; i < labels.length; i++) { labels[i].analyse(context); } context.setReachable(true); for (int i = 0; i < statements.length; i++) { try { if (!context.isReachable()) { throw new CLineError(statements[i].getTokenReference(), TkcMessages.STATEMENT_UNREACHABLE); } statements[i].analyse(context); } catch (CLineError e) { context.reportTrouble(e); } } } COM: <s> analyses the node semantically </s>
funcom_train/26031569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsomorphismFile() throws IOException { testIsomorphismXMLFile(1, true); testIsomorphismXMLFile(2, true); testIsomorphismXMLFile(3, true); testIsomorphismXMLFile(4, true); testIsomorphismXMLFile(5, false); testIsomorphismXMLFile(6, false); testIsomorphismNTripleFile(7, true); testIsomorphismNTripleFile(8, false); } COM: <s> test isomorphism from file data </s>
funcom_train/49630573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSummaryRow(final String directory) { StringBuilder builder = new StringBuilder(); Counts counts = getSummary(); builder.append("<tr bgcolor=\""); builder.append(color(counts)); builder.append("\"><th style=\"text-align: left\">"); builder.append(directory); builder.append("</th><th style=\"text-align: left\">"); builder.append(counts.toString()); builder.append("</th></tr>"); return builder.toString(); } COM: <s> returns a summary row for a whole test run </s>
funcom_train/38465659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getCellEditorValue() { String txt = _component.getText(); if (txt == null || txt.trim().length() == 0) { return _defaultValue; } try { Object val = _parser.fn(txt); return val; } catch (EvaluationException x) { return _defaultValue; } } COM: <s> retrieves the value in the component </s>
funcom_train/44011582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTitle() { System.out.println("setTitle"); String title = ""; PositionBO instance = new PositionBO(); instance.setTitle(title); // 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 title method of class edu </s>
funcom_train/7661164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenericITL() { final int threadCount = 10; final int x[] = new int[threadCount]; Thread progenitor = new ITLThread(x); try { progenitor.start(); progenitor.join(); for(int i = 0; i < threadCount; i++) { assertEquals(i, x[i]); } } catch(InterruptedException e) { unexpectedException(); } } COM: <s> inheritable thread local propagates generic values </s>
funcom_train/48934167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int delete() { int result = Adapter_I.CONST_FAIL; Term[] args = new Term[2]; args[0] = new Atom(getClassName()); args[1] = new Atom(getInstanceID()); // asseble query Compound argRel = new Compound("concept", args); Query query = new Query("retractall", argRel); // elements carrying given class/Id combination exists within the KB // already if (query.hasSolution()) { result = Adapter_I.CONST_OK; // no such combination is known yet } return result; } COM: <s> returns true if the instance class relation stored within the class has </s>
funcom_train/2552236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Experiment findByTitle(String title) { String query = "from Experiment as experiment where lower(experiment.title) = ?"; Experiment experiment = null; Object[] parameters = { title.toLowerCase() }; List list = this.getHibernateTemplate().find(query, parameters); if (list.size() > 0) { experiment = (Experiment) list.get(0); } return experiment; } COM: <s> finds an instance of experiment in the database by the experiment name </s>
funcom_train/14428439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCount() { SampleLine line = new TaskSampleLine(cpu, 1); line.setTimeCreate(0); line.addSample(Sample.SampleType.START, 100000); assertEquals(1, line.getCount()); line.addSample(Sample.SampleType.STOP, 200000); assertEquals(2, line.getCount()); } COM: <s> make sure the count increments as samples are added </s>
funcom_train/51112689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getAppMenuBar() { if (appMenuBar == null) { try { appMenuBar = new JMenuBar(); // Generated appMenuBar.add(getFileMenu()); appMenuBar.add(getEditMenu()); // Generated appMenuBar.add(getHelpMenu()); // Generated } catch (java.lang.Throwable e) { // Do Something } } return appMenuBar; } COM: <s> this method initializes app menu bar </s>
funcom_train/44870351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getDeleteButton() { if (deleteButton == null) { deleteButton = new JButton(); deleteButton.setText("Delete"); deleteButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); deleteButton.setCursor(new java.awt.Cursor( java.awt.Cursor.DEFAULT_CURSOR)); deleteButton.setMinimumSize(new java.awt.Dimension(46, 20)); deleteButton.setToolTipText("Delete the Drawable"); deleteButton.setPreferredSize(new java.awt.Dimension(46, 20)); } return deleteButton; } COM: <s> this method initializes delete button </s>
funcom_train/19176554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resumePlayback() { if (m_line != null) { if (m_status == PAUSED) { m_line.start(); m_status = PLAYING; log.info("resumePlayback() completed"); notifyEvent(BasicPlayerEvent.RESUMED,getEncodedStreamPosition(),-1,null); } } } COM: <s> resumes the playback </s>
funcom_train/48406779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultViewPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MethodConfiguration_defaultView_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MethodConfiguration_defaultView_feature", "_UI_MethodConfiguration_type"), SpemxtcompletePackage.eINSTANCE.getMethodConfiguration_DefaultView(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the default view feature </s>
funcom_train/32753221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { if (columnIndex == 0) { String strBpmId = this.getDataSource().getBpmId(rowIndex); return strBpmId; } else if ( columnIndex == 1) { boolean bolSelect = this.getDataSource().isSelected(rowIndex); return bolSelect; } return null; } COM: <s> requirement of the code table model code interface </s>