__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/47314655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getResetDefaultPropMenuItem() { if (resetDefaultPropMenuItem == null) { resetDefaultPropMenuItem = new JMenuItem(); resetDefaultPropMenuItem.setText(localization .getProperty("loc-Gui2007-resetDefaultPropMenuItem")); resetDefaultPropMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { loadDefaultPropertyFile(); } }); } return resetDefaultPropMenuItem; } COM: <s> this method initializes reset default prop menu item </s>
funcom_train/33776067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdSend () { if (cmdSend == null) {//GEN-END:|168-getter|0|168-preInit // write pre-init user code here cmdSend = new Command ("Envoyer", Command.HELP, 0);//GEN-LINE:|168-getter|1|168-postInit // write post-init user code here }//GEN-BEGIN:|168-getter|2| return cmdSend; } COM: <s> returns an initiliazed instance of cmd send component </s>
funcom_train/12602909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendThinkGearEvent(AbstractThinkGearEvent event) { List<HostPort> list = null; readLock.lock(); try { List<HostPort> tmp = subscriptions.get(event.getEventType()); if (tmp != null) list = new FastList<HostPort>(tmp); } finally { readLock.unlock(); } if (list == null) return; for (HostPort hp : list) { sendThinkGearEvent(hp, event); } } COM: <s> sends the specified </s>
funcom_train/42643549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void go() { final SwingWorker worker = new SwingWorker() { // reset all instance variables public Object construct() { current = 0; done = false; canceled = false; dialogMessage = null; return new ActualTask(); } }; worker.setThreadPriority(Thread.MIN_PRIORITY); worker.start(); } COM: <s> start the task created a new swing worker for the text extraction </s>
funcom_train/35924202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addServlet(HttpServlet servlet, String context) { //System.out.println("servlet is " + servlet + " context is "+ context + " contexts are " + contexts); Context addedContext = new Context(contexts, context, Context.SESSIONS); addedContext.addServlet(new ServletHolder(servlet), "/*"); } COM: <s> adds a servlet to this server </s>
funcom_train/17044755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ProcessController getProcessController() { // // build a new process controller for each request because it collects // and maintains responses for the task. the processController instance // will be stored in a ProcessHandle and should be closed when the // processHandle is released. // return new ClusterProcessController(serviceID, consoles); } COM: <s> get the process controller for this connector </s>
funcom_train/19081511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHidden(Ability ability, ContextEventListener context) { if (!ability.isHidden()) { Log.error("This ability has not the hidden tag as normal, " + "resolve will be forced"); } if (ability.optimizer .addTo(ability, context, ability.priority.getAbstractZone( abstractLowestZone, abstractZone, abstractHighestZone))) { Log.debug("added to TBZ : " + ability + MToolKit.getLogCardInfo(ability.getCard())); } } COM: <s> add the given ability to the special zone abstract triggered </s>
funcom_train/29583220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getRelations() { varTypeLinks = new Hashtable(); for(int y = 1; ; y++) { try { String tmpString = "type" + y; Vector tmpContents = getOperatorTypes(rb.getString(tmpString)); varTypeLinks.put(rb.getString(tmpString), tmpContents); } catch(MissingResourceException mre) { break; } } } COM: <s> this method defines which data is allowed to be inputted from the data </s>
funcom_train/22277717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String selectedStringValue() { int start, stop; if (hasInsertionPoint()) { return ""; } start = selectionStart(); stop = selectionStop(); if (start == -1 || stop == -1) { return ""; } if (stop == _contents.length()) { return _contents.toString().substring(start); } return _contents.toString().substring(start, stop); } COM: <s> returns the selected portion of the text fields contents </s>
funcom_train/38480213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void boRemoved(BOInterface pBO) { log.info("BOListDialog.boRemoved " + pBO); int tIndex = getBOTablePanel().getIndexOfBO(pBO); getBOTablePanel().getModel().removeBO(pBO); getBOTablePanel().setSelectedIndex(tIndex); } COM: <s> remove from gui model keep selected index </s>
funcom_train/28754333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSlidenumber(String newVal) { if ((newVal != null && this.slidenumber != null && (newVal.compareTo(this.slidenumber) == 0)) || (newVal == null && this.slidenumber == null && slidenumber_is_initialized)) { return; } this.slidenumber = newVal; slidenumber_is_modified = true; slidenumber_is_initialized = true; } COM: <s> setter method for slidenumber </s>
funcom_train/35349817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int dluToPixels(int dlu, int direction) { if (baseUnitX == 0) { calculateBaseUnits(); } if (direction == SwingConstants.EAST || direction == SwingConstants.WEST) { return dlu * baseUnitX / 4; } assert (direction == SwingConstants.NORTH || direction == SwingConstants.SOUTH); return dlu * baseUnitY / 8; } COM: <s> converts the dialog unit argument to pixels along the specified </s>
funcom_train/10925409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int evaluateType(byte[] header) { final ByteBuffer magic = ByteBuffer.wrap(header, MAGIC_OFFSET, MAGICLEN); if (magic.compareTo(ByteBuffer.wrap(MAGIC_GNU.getBytes())) == 0) return FORMAT_OLDGNU; if (magic.compareTo(ByteBuffer.wrap(MAGIC_POSIX.getBytes())) == 0) return FORMAT_POSIX; return 0; } COM: <s> evaluate an entrys header format from a header buffer </s>
funcom_train/41961234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void RemoveThemeProperty(String PropertyName) { ThemeProps.remove(PropertyName); try { ThemeProps.store(new FileOutputStream(new File( ThemePath + java.io.File.separator + CurrentTheme + java.io.File.separator + "theme.properties")), "comments"); } catch ( Exception e) { ortus.api.DebugLog(ERROR, "Theme: " + e ); } } COM: <s> remove a theme property from the theme </s>
funcom_train/19000029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(Color color) throws PropertyVetoException // @A1 { Color oldColor = color_; if (vetos_ != null) vetos_.fireVetoableChange("color", oldColor, color); //@CRS color_ = color; if (changes_ != null) changes_.firePropertyChange("color", oldColor, color); //@CRS } COM: <s> sets the color used to paint the text </s>
funcom_train/35351503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList checkField(int fieldPosition, int fieldLength) { ArrayList wrongRows = new ArrayList(); Iterator it = rows.iterator(); while (it.hasNext()) { Row thisRow = (Row) it.next(); String field = (String) thisRow.getFields()[fieldPosition]; if (field.length() != fieldLength) wrongRows.add(thisRow); } return wrongRows; } COM: <s> checks if the specified field has the same length in every row </s>
funcom_train/32058065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVertexGXL() { System.out.println("testVertexGXL"); GPGraph newGraph = new GPGraph(); GPConverter newConverter = new GPConverter(); Object newID = new Object(); Object newVertex = new Object(); assertEquals("vertexGXL failed", newConverter.vertexGXL(newGraph, newID, newVertex) != null, true); } COM: <s> test of vertex gxl method of class gpconverter </s>
funcom_train/50381985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String promptForWorkspace() { // get the current workspace as the default ChooseWorkspaceData data = new ChooseWorkspaceData(Platform .getInstanceLocation().getURL()); ChooseWorkspaceDialog dialog = new ChooseWorkspaceWithSettingsDialog( window.getShell(), data, true, false); dialog.prompt(true); // return null if the user changed their mind String selection = data.getSelection(); if (selection == null) { return null; } // otherwise store the new selection and return the selection data.writePersistedData(); return selection; } COM: <s> use the choose workspace dialog to get the new workspace from the user </s>
funcom_train/6494065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertElementAt( Object item, int index ) { if ( canAdd( item ) ) { list.add( index, item ); fireEvent( new ListDataEvent( this, ListDataEvent.INTERVAL_ADDED, index, index ) ); setSelectedItem(item); } } COM: <s> description of the method </s>
funcom_train/3330126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeGroup(ModelGroup group){ if (group == null) return false; int position = _contentModel.indexOf(group); if (position >= 0) { String name = group.getName(); if (name != null) { String key = "group:"+name; _resolver.removeResolvable(key); } _contentModel.removeElementAt(position); return true; } return false; } COM: <s> removes the given model group definition from this content model group </s>
funcom_train/38316145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Panel getPanel(long id) throws PersistenceException { Panel panel = null; Session session = null; try { session = this.sessionManager.getHibernateSession(); panel = (Panel) session.load(Panel.class, new Long(id)); } catch (HibernateException he) { panel = null; } finally { this.sessionManager.flushCommitCloseSession(session); } return panel; } COM: <s> retrieve a given panel with an id from the database </s>
funcom_train/23393886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEnactingAgentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ServiceInvocation_enactingAgent_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ServiceInvocation_enactingAgent_feature", "_UI_ServiceInvocation_type"), ActionPackage.Literals.SERVICE_INVOCATION__ENACTING_AGENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the enacting agent feature </s>
funcom_train/3913539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActProperty getAct(Uol uol, Run run, User user, String propId) throws PropertyException { String key = getKey(uol, run, user, propId); ActProperty property = (ActProperty) fetchFromCache(key); if (property == null) { property = new ActProperty(uol, run, user, propId); addToCache(key, property); } return property; } COM: <s> return a act property based on the passed parameters </s>
funcom_train/3395650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodDocImpl findMethod(String methodName, String[] paramTypes) { // Use hash table 'searched' to avoid searching same class twice. //### It is not clear how this could happen. return searchMethod(methodName, paramTypes, new HashSet<ClassDocImpl>()); } COM: <s> find a method in this class scope </s>
funcom_train/10480522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unbind(Context context, String name, boolean removeNotEmptyContext) throws NamingException { if (context == this || (context instanceof AbstractContext && isNestedSubcontext(context))) { AbstractContext abstractContext = (AbstractContext) context; abstractContext.removeBinding(name, removeNotEmptyContext); } else { context.unbind(name); } } COM: <s> unbinds any value bound to the specified name within the specified context </s>
funcom_train/10586266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeTypeInfo getTypeInfo(String typeName) throws RepositoryException { NodeTypeInfo result = (NodeTypeInfo) this.typeInfos.get(typeName); if (result == null) { // TODO: build a NodeTypeInfo using introspection throw new RepositoryException("No type info found for node type '" + typeName + "'"); } return result; } COM: <s> get the type info for a given node type name </s>
funcom_train/45253370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ArrayList getPerspectiveExtensionActionSets() { PerspectiveExtensionReader reader = new PerspectiveExtensionReader(); reader .setIncludeOnlyTags(new String[] { IWorkbenchRegistryConstants.TAG_ACTION_SET }); PageLayout layout = new PageLayout(); reader.extendLayout(null, descriptor.getOriginalId(), layout); return layout.getActionSets(); } COM: <s> returns the action sets read from perspective extensions in the registry </s>
funcom_train/13272007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWallPattern(TextureImage wallPattern) { if (this.wallPattern != wallPattern) { TextureImage oldWallPattern = this.wallPattern; this.wallPattern = wallPattern; this.propertyChangeSupport.firePropertyChange(Property.WALL_PATTERN.name(), oldWallPattern, wallPattern); } } COM: <s> sets how walls should be displayed in plan by default and notifies </s>
funcom_train/26245196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateImpacts(int number, int size, double force, Terrain terrain, Terrain ejecta) { for (int i=0; i < number; i++) { int x = Die.rollZero(width); int y = (int)(Die.rollZero(height) * 0.9 + height * 0.05); int radius = Die.die(size, 2) / 2; addCrater(x, y, radius, force, terrain, ejecta); } } COM: <s> simulate asteroid bombardment by creating a number of random craters </s>
funcom_train/20045384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _createColumn() { try { XPropertySet column = oObj.createColumn("TextField"); tRes.tested("createColumn()",column!=null); } catch (com.sun.star.lang.IllegalArgumentException ex) { log.println("Exception occured while creating Column"); tRes.tested("createColumn()",false); } } COM: <s> creates column of type text field </s>
funcom_train/11419186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { WSPasswordCallback pc = (WSPasswordCallback)callbacks[i]; String pass = passwords.get(pc.getIdentifier()); if (pass != null) { pc.setPassword(pass); return; } } // // Password not found // throw new IOException(); } COM: <s> here we attempt to get the password from the private </s>
funcom_train/4286476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAccessedClassesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Query_accessedClasses_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Query_accessedClasses_feature", "_UI_Query_type"), OrmUsageProfilePackage.Literals.QUERY__ACCESSED_CLASSES, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the accessed classes feature </s>
funcom_train/34565463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Nod attribute(final String name) { try { Nod n = null; final NodeIter iter = node.attr(); final byte[] nm = Token.token(name); while((n = iter.next()) != null) { if(Token.eq(nm, n.nname())) return n; } } catch(final QueryException ex) { Main.notexpected(); } return null; } COM: <s> returns the specified attribute </s>
funcom_train/12157195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateProperties(MutableStyleProperties outputValues) { for (int index = 0; index < group.length; index++) { StyleProperty property = group[index]; int bit = 1 << index; if ((requiredForIndividual & bit) != 0) { copyValue(property, outputValues, index); } } } COM: <s> update the individual properties as the shorthand cannot be used </s>
funcom_train/42710119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int pick(Random random) { // If spec covers ages 5-9, then we need to select from [5,10). // Fortunately, nextDouble() selects from [0,1). return min_age + (int) (Math.floor(random.nextDouble() * (max_age + 1 - min_age))); } COM: <s> select an age value at random from within our range </s>
funcom_train/125607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTablePopup(JPopupMenu newTablePopup) { tablePopup = newTablePopup; if (tablePopup == null) removeMouseListener(triggerPopUp); else { triggerPopUp = new MouseAdapter() { public void mouseReleased(MouseEvent e) { tablePopup.processMouseEvent(e, null, null); } }; addMouseListener(triggerPopUp); } } COM: <s> sets the new code jpopup menu code that appears if the right mouse </s>
funcom_train/33475543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SlimPlaylist getPlaylist() throws PlaylistException { try { if (getPlayer() == null) { throw new PlaylistException("Player not set."); } return this.playlist; } catch (Exception e) { e.printStackTrace(); throw new PlaylistException(e.getMessage()); } } COM: <s> must set player first </s>
funcom_train/35612526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setPage(int page) { String label; int rv; if (totalPages == 0) { label = "No&nbsp;Pages"; rv = 0; } else { if (page < 0) { page = 0; } else if (page >= totalPages) { page = totalPages - 1; } currentPage = page; label = "Page&nbsp;" + (currentPage + 1) + "&nbsp;of&nbsp;" + totalPages; rv = currentPage; } stateLabel.setHTML(label); return rv; } COM: <s> sets the selected pages index </s>
funcom_train/13934428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void go() { final SwingWorker worker = new SwingWorker() { public Object construct() { try { // task to be monitored cr.readDirectories(); or.readAllFiles(); cd.populateTree(cr.getData(), or.getData()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); return null; } return cr; } //Runs on the event-dispatching thread. public void finished() { } }; worker.start(); } COM: <s> task that reads the data </s>
funcom_train/33325145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bindAnyAssociation(final XmlElement anyElement, final NakedObjectField field) { addIdType(field.getSpecification(), anyElement, "id-type", false, false); XmlElement nameElement = addElement(anyElement, "column"); nameElement.SetAttribute("name", field.getId()+"type"); XmlElement columnELement = addElement(anyElement,"column"); columnELement.SetAttribute("name", field.getId()+PRIMARY_KEY_SUFFIX); return; } COM: <s> create an assocation using an any mapping </s>
funcom_train/3760252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDate(String key) throws ConfigException { String ret = getString(key); try { return DATE_FORMAT.parse(ret); } catch (ParseException pe) { throw new ConfigException(source,key, "Date must be " + DATE_FORMAT.toPattern() + "not: " + ret, pe); } } COM: <s> return the value as a date </s>
funcom_train/29619735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMiUpdateConsult() { if (miUpdateConsult == null) { miUpdateConsult = new JMenuItem(); miUpdateConsult.setText(AppTextsDAO.get("MENUITEM_CONSULT_COLLECTION")); miUpdateConsult.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { FindCollectionFrame fcf = new FindCollectionFrame(); getJDesktop().addAndShow(fcf); } }); } return miUpdateConsult; } COM: <s> this method initializes mi update consult </s>
funcom_train/14354913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testListRolesByApplication() { loginAsSysAdmin(); assertTrue(initSecurityServices()); assertEquals("none", checkListRolesByApplication(testApplication1)); logout(); loginAsApplDev(); assertTrue(initSecurityServices()); assertEquals("none", checkListRolesByApplication(testApplication1)); logout(); loginAsApplDev(); assertTrue(initSecurityServices()); assertEquals("SecurityException", checkListRolesByApplication(testApplication2)); logout(); loginAsUser(); assertTrue(initSecurityServices()); assertEquals("SecurityException", checkListRolesByApplication(testApplication2)); logout(); } COM: <s> method name test list roles by application class name </s>
funcom_train/26273070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putLocalBean( ContextConfig contextConfig, String serviceId, Object bean ) { synchronized (contextMap) { IContextCache cache = (IContextCache)contextMap.get( contextConfig ); if ( cache == null ) { // Lazy creation cache = new ContextCacheImpl( contextConfig ); contextMap.put( contextConfig, cache ); } cache.putBean( serviceId, bean ); } } COM: <s> stores the service bean stored in the context instance cache by name </s>
funcom_train/19828073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig filterConfig) throws ServletException { this.encoding = filterConfig.getInitParameter("encoding"); String forceEncoding = filterConfig.getInitParameter("forceEncoding"); if (forceEncoding != null) { if (this.encoding == null) { throw new ServletException( "Filter config error: must init encoding and forceEncoding parameters together."); } this.forceEncoding = StringKit .stringToBooleanTrueFirst(forceEncoding); } } COM: <s> place this filter into service </s>
funcom_train/41719307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addColorAllocationAttributes(ModelColor color) { ColorResourceAttributeHandle resourceAllocationHandle = colorResourceAttributeHandle(color); final UnspecifiedTiedNumberExpression<IntegerValue> tiedNumber = new UnspecifiedTiedNumberExpression<IntegerValue>(IMPOSSIBLE_ALLOCATION_VALUE); ExpressionValueSource<IntegerValue> impossibleValueSource = new ExpressionValueSource<IntegerValue>(tiedNumber); addAttribute(resourceAllocationHandle, impossibleValueSource); CorrectColorExpressionAttributeHandle handle = CorrectColorExpressionAttributeHandle.getHandle(color); addAttribute(handle); return true; } COM: <s> adds attributes for the allocation of a colour </s>
funcom_train/24186543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FakeEncryptedInteger partialDecrypt(FakeEncryptedInteger cyphertext) { //cypher = xxxxxxxxKxxx : x = random number, K the key (may be encrypted more than 1 time, but max 9 times for this particular key) //mod = Kxxxx FakeEncryptedInteger mod = cyphertext.mod(key.multiply(TEN)); //big = xxxxxxxx0000 FakeEncryptedInteger big = cyphertext.subtract(mod); //small = xxx FakeEncryptedInteger small = mod.mod(key); //return xxxxxxxx0xxx return big.add(small); } COM: <s> partially decrypts the input cyphertext </s>
funcom_train/8074422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int clusterInstance(Instance instance) throws Exception { double [] dist = distributionForInstance(instance); if (dist == null) { throw new Exception("Null distribution predicted"); } if (Utils.sum(dist) <= 0) { throw new Exception("Unable to cluster instance"); } return Utils.maxIndex(dist); } COM: <s> assigns an instance to a cluster </s>
funcom_train/5870262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOuterAttrs() { final String attrs = super.getOuterAttrs(); final StringBuffer sb = new StringBuffer(64); if (attrs != null) { sb.append(attrs); } HTMLs.appendAttribute(sb, "z.anch", getAnchor()); HTMLs.appendAttribute(sb, "z.pid", getParent().getUuid()); if (isOpen()) { HTMLs.appendAttribute(sb, "z.open", "true"); } _open = null; return sb.toString(); } COM: <s> returns the html attributes for this tag </s>
funcom_train/46623120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProperties(Properties props) { resolveAllProperties(props); Enumeration e = props.keys(); while (e.hasMoreElements()) { String name = (String) e.nextElement(); String value = props.getProperty(name); String v = getProject().replaceProperties(value); if (prefix != null) { name = prefix + name; } addProperty(name, v); } } COM: <s> iterate through a set of properties </s>
funcom_train/1110747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate(double dx, double dy) { if (isLeaf()) getAllAttributes().translate(dx, dy); else { int moveableAxis = GraphConstants .getMoveableAxis(getAllAttributes()); if (moveableAxis == GraphConstants.X_AXIS) dy = 0; else if (moveableAxis == GraphConstants.Y_AXIS) dx = 0; Iterator it = childViews.iterator(); while (it.hasNext()) { Object view = it.next(); if (view instanceof AbstractCellView) { AbstractCellView child = (AbstractCellView) view; child.translate(dx, dy); } } } } COM: <s> translates code view code group by code dx dy code </s>
funcom_train/212384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cancel(Identity id) throws Exception { if (taskgraph.get(id) == null) { throw new Exception("ExecutableObject with given id does not exist"); } // if (getStatus(id).getStatusCode() < 2 // || getStatus(id).getStatusCode() > 4) { // throw new Exception("ExecutableObject for given id is not active"); // } return taskgraphHandler.cancel(id); } COM: <s> cancel the command with given id </s>
funcom_train/27835443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompareTo() { DBDriver mySQLDBDriver = new DBDriver("mySQLDBDriver", "", "com.mysql.jdbc.Driver"); assertTrue(goodDBDriver_.compareTo(goodDBDriver_) == 0); assertTrue(mySQLDBDriver.compareTo(goodDBDriver_) > 0); assertTrue(goodDBDriver_.compareTo(mySQLDBDriver) < 0); } COM: <s> tests the compare to method </s>
funcom_train/30006216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getSaveCheckBox() { if (this.saveCheckBox == null) { this.saveCheckBox = new JCheckBox(); this.saveCheckBox.setText(LanguageController.getInstance().getString("Settings_Dialog_Save_Checkbox")); this.saveCheckBox.setSelected(MainController.getInstance().isAutosave()); } return this.saveCheckBox; } COM: <s> gets the save on exit check box </s>
funcom_train/31654948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getVariableNames() { HashMap v = new HashMap(); Iterator it = tokenized.iterator(); while( it.hasNext() ) { Token t = (Token)it.next(); if ( t instanceof InterpolatedToken ) { v.put( ((InterpolatedToken)t).getVariableName(), null ); } } return v.keySet(); } COM: <s> get a set of variables existing in the source string </s>
funcom_train/19454286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object showDialog(Object object) { if(panel.open(object)) { ActivityLog.log("CTMDialog: Opening " + panel); if(object == null) { setTitle(panel.getNewText()); panel.zero(); } else { setTitle(panel.getEditText()); panel.populate(object); } setVisible(true); if(okButtonPressed && panel.isDataOk()) { return panel.getObject(object); } else { return null; } } else { return null; } } COM: <s> shows the dialog and returns a new or edit object </s>
funcom_train/7537996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unsafeReplace(int beg, int len, byte[] nbytes, int index, int count) { grow(count - len); int newSize = realSize + count - len; System.arraycopy(bytes,beg+len,bytes,beg+count,realSize - (len+beg)); System.arraycopy(nbytes,index,bytes,beg,count); realSize = newSize; } COM: <s> unsafe version of replace int int byte int int </s>
funcom_train/3499291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getModules() { Map res = new HashMap(); Set names = map.keySet(); for (Iterator i=names.iterator(); i.hasNext(); ) { RedaModuleDescriptor elm = (RedaModuleDescriptor)map.get((String)i.next()); res.put(elm.getName(), elm); } return res; } COM: <s> returns a module name reda module descriptor mapping of available modules </s>
funcom_train/33975553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String postFileRequest( IFacebookMethod method, SortedMap<String,String> params, String fileName, InputStream fileStream ) throws IOException { if ( log.isDebugEnabled() ) { log.debug( method.methodName() + ": POST-FILE: " + _serverUrl.toString() + ": " + params ); } return getCommunicationStrategy().postRequest( _serverUrl, params, fileName, fileStream ); } COM: <s> helper function for posting a request that includes raw file data eg </s>
funcom_train/29017958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getBackground (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return getBackground (); int pixel = cellBackground != null ? cellBackground [index] : -1; return pixel == -1 ? getBackground () : Color.win32_new (display, pixel); } COM: <s> returns the background color at the given column index in the receiver </s>
funcom_train/20883199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSpeakableResumed(SpeakableEvent event) { if (listener != null) { listener.speakableResumed(event); } Enumeration E; if (synth.speakableListeners != null) { E = synth.speakableListeners.elements(); while (E.hasMoreElements()) { SpeakableListener sl = (SpeakableListener) E.nextElement(); sl.speakableResumed(event); } } } COM: <s> utility function that sends a code speakable resumed code event </s>
funcom_train/2558304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object read(InputNode node, Class expect) throws Exception { Object item = root.read(node, expect); Class result = item.getClass(); Class actual = entry.getType(); if(!actual.isAssignableFrom(result)) { throw new PersistenceException("Entry %s does not match %s for %s", result, entry, type); } return item; } COM: <s> this code read code method will read the xml element from the </s>
funcom_train/33375766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAppendMessages4() throws IOException, MessagingException { helloWorldMessage.setFlag(Flags.Flag.RECENT, true); assertTrue(!inbox.exists()); assertTrue(inbox.create(Folder.HOLDS_MESSAGES)); assertTrue(!inbox.isOpen()); inbox.appendMessages(new Message[]{helloWorldMessage}); } COM: <s> append messages method can be invoked on a closed folder </s>
funcom_train/13128307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writePrologue() { myHtmlBuffer.append("<html>\n"); myHtmlBuffer.append("<head>\n"); myHtmlBuffer.append("<title>Builder Design Pattern Sample</title>\n"); myHtmlBuffer.append("</head>\n"); myHtmlBuffer.append("<body>\n"); } COM: <s> writes the default prologue to the html buffer </s>
funcom_train/41178823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean changetype(AnalysisType anatype, AnalysisType ntypana) { // Bouml preserved body begin 0002288C boolean trouve = false; for (int i = 0; i < listOfBatch.size(); i++) { if (anatype.equals(listOfBatch.get(i).getTypeOfAnalysis())) { trouve = true; listOfBatch.get(i).setTypeOfAnalysis(ntypana); } } return trouve; // Bouml preserved body end 0002288C } COM: <s> change the type of an existing analysis </s>
funcom_train/32779862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatieren(double a, boolean isIntValue){ String format = ""; if(isIntValue){ a = Math.rint(a); if(Math.abs(a) < 10000.0) format = "#0"; else format = "0.E0"; }else{ if(Math.abs(a) < 0.001) format = "0.00E0"; else if(Math.abs(a) < 10000.0) format = "#0.000"; else format = "0.00E0"; } DecimalFormat df = new DecimalFormat(format); return df.format(a); } COM: <s> convert double to string </s>
funcom_train/13778899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int searchForTheSameTable(IOpenMethod method) { DimensionPropertiesMethodKey methodKey = new DimensionPropertiesMethodKey(method); for (int i = 0; i < getCandidates().size(); i++) { IOpenMethod candidate = getCandidates().get(i); if (methodKey.equals(new DimensionPropertiesMethodKey(candidate))) { return i; } } return -1; } COM: <s> for different versions of the some table we should use in dispatching </s>
funcom_train/29768659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropViews(Connection connection, boolean ignoreErrors) { executeDDL(connection, ignoreErrors, IMapping.OpDropSubclassesView, null, true); executeDDL(connection, ignoreErrors, IMapping.OpDropView, null, true); } COM: <s> drops the view of our </s>
funcom_train/4085793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addVertexWidget( Widget widget, int thickness ) { add( widget ); int halfThickness = thickness/2; setWidgetLeftWidth(widget, -halfThickness, Unit.PX, thickness, Unit.PX); setWidgetTopHeight(widget, -halfThickness, Unit.PX, thickness, Unit.PX); } COM: <s> adds a widget that should occupy the top left vertex </s>
funcom_train/33282797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLDOMParseError jsxGet_parseError() { if (parseError_ == null) { parseError_ = new XMLDOMParseError(); parseError_.setPrototype(getPrototype(parseError_.getClass())); parseError_.setParentScope(getParentScope()); } return parseError_; } COM: <s> gets the java script property parse error for the document </s>
funcom_train/36286044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExtractMetaDataNextResult() throws Exception { List/*<char[]>*/[] expectedSchemas = new List/*<char[]>*/[] { getTableMetaDataCharArray(BOOK_TABLE1) }; testExtractMetaData(BOOK_TABLE1, expectedSchemas, null); } COM: <s> use activity to get meta data for one table then use </s>
funcom_train/17988354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskGraphsPanel getTaskGraphsPanel() { // Scan the vertical panels... for (Widget w: m_verticalPanels) { // ...and if we find a task graphs panel... if ((null != w) && (w instanceof TaskGraphsPanel)) { // ...return it. return ((TaskGraphsPanel) w); } } // If we get here, a task graphs panel isn't defined. Return // null. return null; } COM: <s> scan the defined tool panels for a task graphs panel and returns </s>
funcom_train/12558570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void export() { try { CallRecord[] dataArray = getDataArray(); for (int i=0; i<dataArray.length; i++) { CallRecord cr = dataArray[i]; String name = cr.name; System.out.println("Precompile = " + name); } } catch (Throwable t) { t.printStackTrace(); } } COM: <s> export the current view of the table into a file </s>
funcom_train/26532694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildData() { massageParameters(); String prefix = getPrefix(); data = ResultSet.get(getDataRepository(), parameters, prefix, getPSPProperties()); if (parameters.get("transpose") != null) data = data.transpose(); } COM: <s> create the data upon which this chart is based </s>
funcom_train/21527481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkBracket(String expression) { boolean hasBracket = false; for (int i = 0; i < expression.length(); i++) { if ((expression.charAt(i) == '(') || (expression.charAt(i) == ')')) { hasBracket = true; break; } } return hasBracket; } COM: <s> check if the expression contains any more brackets </s>
funcom_train/4925173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearUri() { // Test this.replayMockObjects(); // Change template to unique URI Change<WoofTemplateModel> change = this.operations.changeTemplateUri( this.template, null); // Validate the change this.assertChange(change, this.template, "Change Template URI", true); // Verify this.verifyMockObjects(); } COM: <s> ensure can clear uri </s>
funcom_train/34851454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAlbumInfo() { System.out.println("-------------- TEST GET_ALBUM_INFO ------------"); Object [] res = ser.login("this@that.com", "pword"); String [][] albums = ser.listAlbums((String)res[0]); String [] alb = ser.getAlbumInfo((String)res[0], albums[0][1]); assertEquals(3,alb.length); assertEquals(albums[1][1], alb[0]); } COM: <s> public string get album info string security token string album id </s>
funcom_train/34627827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRow(TexRow row) { rows.remove(row); // FIXME now maxrowcount becomes one less, since the row isn't cleared Iterator iterator = changeListeners.iterator(); while (iterator.hasNext()) ((ITexRowListViewer) iterator.next()).removeRow(row); } COM: <s> removes the given row first occurrance from the row list </s>
funcom_train/10863496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getFirstValue(String name) { Object v = _fields.get( name ); if (v == null || !(v instanceof Collection)) return v; Collection c = (Collection)v; if (c.size() > 0 ) { return c.iterator().next(); } return null; } COM: <s> returns the first value for a field </s>
funcom_train/32765306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkNewValue(int index, double dblVal) throws ArrayIndexOutOfBoundsException { if (index >= this.getDataSize()) throw new ArrayIndexOutOfBoundsException( "ProfileData#checkNewValue(): Index " + index + " exceeds storage capacity " + this.getDataSize() ); if (dblVal == Double.NaN) this.bolMissingData = true; } COM: <s> check a new data value for index position and not a number </s>
funcom_train/16218547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAnimationFrame(int[] animation) { if (this.animationFrame != animation) { this.animationFrame = animation; this.setAnimationFrame(0, (this.animationFrame != null) ? (this.animationFrame.length - 1) : (this.getImages().length - 1)); } } COM: <s> sets sprite animation frame to specified animation array </s>
funcom_train/37556293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getImageIndent () { checkWidget(); int index = parent.indexOf (this); if (index == -1) return 0; int hwnd = parent.handle; LVITEM lvItem = new LVITEM (); lvItem.mask = OS.LVIF_INDENT; lvItem.iItem = index; OS.SendMessage (hwnd, OS.LVM_GETITEM, 0, lvItem); return lvItem.iIndent; } COM: <s> gets the image indent </s>
funcom_train/19175340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color findBGColor(String saText, int row) { Color objlMatchedColor; objlMatchedColor = (Color)mapcBGPatterns.get(saText); if (objlMatchedColor == null && objcAlternatingBGColors != null) { objlMatchedColor = (Color)objcAlternatingBGColors.get(row % objcAlternatingBGColors.size()); } return objlMatchedColor; } COM: <s> finds the background color object that is associated with the string pattern </s>
funcom_train/1264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties loadPropertiesByFilename(String fileName) throws IOException { // Create new properties. Properties tempProp = new Properties(); // Get input stream to the property file. InputStream inPropFile = Utilities.getInputStream(fileName); try { // Load properties. tempProp.load(inPropFile); // Close file. inPropFile.close(); } catch(Exception e) { throw new IOException(e.getLocalizedMessage()); } // Return the read properties. return tempProp; } COM: <s> load properties from a file </s>
funcom_train/3391353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeHeader(ClassDoc classDoc, String header) { writer.println(); writer.println("<!-- ========= CONSTRUCTOR DETAIL ======== -->"); writer.println(); writer.anchor("constructor_detail"); writer.printTableHeadingBackground(header); } COM: <s> write the header for the constructor documentation </s>
funcom_train/39857852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyPressed(KeyEvent arg0) { int code = arg0.getKeyCode(); switch(code){ case KeyEvent.VK_UP: setOrigin(originU,++originV); refreshPositions(); break; case KeyEvent.VK_DOWN: setOrigin(originU,--originV); refreshPositions(); break; case KeyEvent.VK_LEFT: setOrigin(++originU,originV); refreshPositions(); break; case KeyEvent.VK_RIGHT: setOrigin(--originU,originV); refreshPositions(); break; } repaint(); } COM: <s> the arrow keys controls the point of view of the board </s>
funcom_train/51245359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(Object parent, Object child) { if (parent instanceof DbTreeNode) { DbTreeNode node = (DbTreeNode) parent; for (int i = 0; i < node.getChildren().size(); i++) { if (node.getChildren().get(i).equals(child)) { return i; } } } return 0; } COM: <s> gets the index of a child at a node </s>
funcom_train/9851519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readGazFile(String file_path) { try{ FileInputStream fstream = new FileInputStream(file_path); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String strLine; while ((strLine = br.readLine()) != null) { String str = strLine.toLowerCase().trim(); if(!str.isEmpty()) listNames.add(str); } in.close(); }catch (Exception e){ warning(e.getMessage()); } //listNames.remove(""); } COM: <s> read gazetteer list from gazetteer file name file </s>
funcom_train/14264827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhotoList getPhotos() throws FlickrException { if (deleted) throw new IllegalStateException("PhotoSet already Deleted"); Request req = new Request(); req.setParameter("method","flickr.photosets.getPhotos"); req.setParameter("photoset_id",id); return new PhotoList(req); } COM: <s> retrieve the list of photos associated with this photo set </s>
funcom_train/36557496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3f getForwardVector() { ModelInstance body = getModelInstance(); if (body != null) { if (bReverseHeading) return body.getTransform().getLocalMatrix().getLocalZ(); else return body.getTransform().getLocalMatrix().getLocalZ().mult(-1.0f); } return null; } COM: <s> override to return the characters forward vector </s>
funcom_train/1385589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnDuplica() { if (btnDuplica == null) { try { btnDuplica = new JButton(); btnDuplica.setBounds(new Rectangle(195, 5, 80, 26)); // Generated btnDuplica.setText("Duplica"); btnDuplica.addActionListener(new MyActionListener()); } catch (java.lang.Throwable e) { // TODO: Something } } return btnDuplica; } COM: <s> this method initializes btn duplica </s>
funcom_train/28492725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRequest(HttpMethod httpMethod, boolean persistent) { // Fills the internal method queue with information about the sent // requests. This information is needed later when parsing responses. requestQueue.offer(new Request(httpMethod, persistent)); if (this.httpMethod == null) { nextMessage(); } } COM: <s> must be called whenever a http request is sent by a corresponding request </s>
funcom_train/43673012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendDefs() { File dir = new File(System.getProperty("user.dir")+"/lib/synthdefs/"); for (File syn : dir.listFiles()) { try { //System.out.println("trying to load "+syn+"..."); SynthDef.readDefFile(syn)[0].send(server); } catch (IOException e) { System.out.println(syn+" is an invalid synthdef! trying to continue without it! if you notice funny behavior, chances are its because of this."); e.printStackTrace(); } } } COM: <s> this is a useful function if youre using jcolliders synthdefs </s>
funcom_train/48965953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3D cross(Vector3D v) { float crossX = y * v.z - v.y * z; float crossY = z * v.x - v.z * x; float crossZ = x * v.y - v.x * y; return(new Vector3D(crossX,crossY,crossZ)); } COM: <s> calculate the cross product with another vector </s>
funcom_train/27780175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { try { if (di != null) { logger.log(Level.FINEST, "close", term); di.close(); } di = null; } catch (java.io.IOException x) { logger.log(Level.WARNING, "close", x); } } COM: <s> close this input stream and mark for garbage collection </s>
funcom_train/5232214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addButtonToButtonPanel(JButton button){ button.setMinimumSize(new Dimension(90, 25)); button.setMaximumSize(new Dimension(160, 25)); buttonPanel.add(button); buttonPanel.add(Box.createRigidArea(new Dimension(0,5))); } COM: <s> adds a button to the button panel </s>
funcom_train/32068840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addDocumentAttachmentGroup(DocumentAttachmentGroup documentAttachmentGroup) { boolean addOk = getDocumentAttachmentGroups().add(documentAttachmentGroup); if (addOk) { documentAttachmentGroup.setParentGroup((DocumentAttachmentGroup)this); } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed document attachment group to the parent group collection </s>
funcom_train/40717310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBaseJavaPath() throws Exception { String javaCode = testJavaPath("<gxp:template" + NAMESPACE_DECLS + " name='inmemory.gxp.test.Main'/>", AlertSet.EMPTY); assertContains("public static void write(" + "final java.lang.Appendable gxp$out," + " final com.google.gxp.base.GxpContext gxp_context)", javaCode); } COM: <s> tests the simplest java code generation path </s>
funcom_train/2657892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setString(Object component, String key, String value) { Object[] definition = getDefinition(getClass(component), key, "string"); if (setString(component, (String) definition[1], value, (String) definition[3])) { update(component, definition[2]); } } COM: <s> sets the given property pair key and value for the component </s>
funcom_train/42043995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertChildAt(int index, ClusterNode child) throws IndexOutOfBoundsException { if (index == getNumberOfChildren()) { // this is really an append addChild(child); return; } else { children.get(index); //just to throw the exception, and stop here children.add(index, child); } } COM: <s> inserts a node t at the specified position in the child list </s>