__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44011541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCustPhone() { System.out.println("getCustPhone"); CustomerBO instance = null; String expResult = ""; String result = instance.getCustPhone(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get cust phone method of class edu </s>
funcom_train/50479023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(String s1, String s2) { if (s1.endsWith("*") && !s2.endsWith("*")) { return -1; } else if (!s1.endsWith("*") && s2.endsWith("*")) { return 1; } else { return s1.compareTo(s2); } } COM: <s> sorts the list of resource names </s>
funcom_train/2292529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getResourceTypeId() { if (CmsStringUtil.isNotEmpty(getResourceType())) { try { return OpenCms.getResourceManager().getResourceType(getResourceType()).getTypeId(); } catch (CmsException e) { // ignore, no valid resource type ID found } } return -1; } COM: <s> returns the resource type id of the xml contents to process </s>
funcom_train/28257938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeControlListener(EventListener listener) { if (listener instanceof ActionListener) { AbstractButton ab; StandardGainButtonPanel p = (StandardGainButtonPanel) getControlComponent(); ab = p.getGainIncreaseButton(); ab.removeActionListener((ActionListener) listener); ab = p.getGainDecreaseButton(); ab.removeActionListener((ActionListener) listener); } else { throw new IllegalArgumentException("ActionListener required"); } } COM: <s> remove listener from both gain increase button and gain </s>
funcom_train/45762125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(Object[] parm1) throws com.sun.star.uno.Exception { if (!(parm1[0] instanceof Object[])) return; for (int i=0; i<parm1.length; i++) { processActionForXMLChecker((Object[])parm1[i]); } } COM: <s> initialize this class with rules </s>
funcom_train/8076277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getShape(String sh) { if (sh.equalsIgnoreCase("box") || sh.equalsIgnoreCase("rectangle")) { return new Integer(1); } else if (sh.equalsIgnoreCase("oval")) { return new Integer(2); } else if (sh.equalsIgnoreCase("diamond")) { return new Integer(3); } else { return null; } } COM: <s> this will convert the shape string to an int representing that shape </s>
funcom_train/29580515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void populateVersions() { String ver; for(int y = 1; ; y++) //then to load subpolicy editors { try { ver = rbl.getString("LDAPConfigVersion" + y); versionComboBox.addItem(ver); } catch(MissingResourceException mre) { break; } } } COM: <s> a simple method to populate the drop down list with the version </s>
funcom_train/16544112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getBounds(final Graph graph) { if (this.getPosition(graph) == null) { System.err.println("Error in node: " + getProperty("label")); } return new Rectangle2D.Double(this.getPosition(graph).getX(), this .getPosition(graph).getY(), this.getDimension(graph).getWidth(), this.getDimension(graph) .getHeight()); } COM: <s> returns a convex hull of this nodes shape in graph </s>
funcom_train/19253533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupComponent() { setLayout(new BorderLayout()); add(comp, BorderLayout.CENTER); add(errorOutput, BorderLayout.EAST); // Blank icon errorOutput.setIcon(SwingWTUtils.getPixmap(ValidatableComponent.class, "blankicon.gif")); // Work out whether the component is valid by firing the // validation event when the component loses the focus comp.addFocusListener(new FocusAdapter() { public void focusLost(FocusEvent e) { fireValidation(false); } }); } COM: <s> should be called by subclasses after component creation </s>
funcom_train/48406478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsUniquePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Operation_isUnique_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Operation_isUnique_feature", "_UI_Operation_type"), SpemxtcompletePackage.eINSTANCE.getOperation_IsUnique(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is unique feature </s>
funcom_train/11515238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doWriteObject(ObjectOutputStream outputStream) throws IOException { // Write the size so we know how many nodes to read back outputStream.writeInt(size()); for (Iterator<E> itr = iterator(); itr.hasNext();) { outputStream.writeObject(itr.next()); } } COM: <s> serializes the data held in this object to the stream specified </s>
funcom_train/32766643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkFrequency(int intFreq) throws IndexOutOfBoundsException { if ( (intFreq < 0) || (intFreq >= this.getDataSize()) ) throw new IndexOutOfBoundsException( "SineFilter#checkFrequency() - given frequency = " + Integer.toString(intFreq) + "outside interval [0," + Integer.toString(this.getDataSize()) + "]" ); } COM: <s> check the given frequency to see that it lies within the interval of </s>
funcom_train/37038121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHeader(String name) { // XXX // warning: rather sticky code; heavily tuned for (int i = 0; i < count; i++) { if (headers[i].getName().equalsIgnoreCase(name)) { // reset and swap with last header MimeHeaderField mh = headers[i]; mh.recycle(); headers[i] = headers[count - 1]; headers[count - 1] = mh; count--; i--; } } } COM: <s> removes a header field with the specified name </s>
funcom_train/45077596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InfoItem getInfoItemByUse(String inUse) { InfoItem anItem = getFirstInfoItem(); while ( anItem != null) { if (anItem.itemUse != null) if ( anItem.itemUse.equals(inUse)) return anItem; anItem = getNextInfoItem(); } return null; } COM: <s> look up an item by the item use value </s>
funcom_train/36428135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkConnection() throws GoldenGateDatabaseNoConnectionException { try { DbModelFactory.dbModel.validConnection(this); isDisconnected = false; if (admin != null) admin.isConnected = true; } catch (GoldenGateDatabaseNoConnectionException e) { isDisconnected = true; if (admin != null) admin.isConnected = false; throw e; } } COM: <s> check the connection to the database and try to reopen it if possible </s>
funcom_train/3857833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectName createMBean(String type, ObjectName objectName, MBeanServer mbserver) throws MBeanRegistrationException { try { return mbserver.createMBean(type,objectName).getObjectName(); } catch (Exception ex) { throw new MBeanRegistrationException(ex); } } COM: <s> this implementation simply calls mbserver </s>
funcom_train/3080842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get(int index) { if (data == null) { return nullValue; } else if (index < data.size()) { Integer integer = (Integer) data.get(index); if (integer == null) { return nullValue; } else { return integer.intValue(); } } else { return nullValue; } } COM: <s> returns the value in the array at the specified index </s>
funcom_train/17794573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void discardListeners(FileNotifyEvent discardedEvent) { if (discardedEvent == null) { throw new NullPointerException(); } synchronized (listenerList) { Iterator iter = listenerList.iterator(); while (iter.hasNext()) { FileNotifyListener l = (FileNotifyListener) iter.next(); l.discarded(discardedEvent); } listenerList.clear(); } } COM: <s> notifies all added listeners about the discarding event and removes them </s>
funcom_train/25787380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reference getBaseRef(HttpServletRequest request) { Reference result = null; // Do not use getContextPath and getRequestURL, // because XMLDB allways returns null and is servlet 2.2 final String requestUrl = request.getServletPath() + request.getRequestURI(); result = new Reference(requestUrl); return result; } COM: <s> returns the base reference of new restlet requests </s>
funcom_train/12699622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRelativePath(String url) { int pos = url.indexOf('/', 8); if (pos == -1) { return "/"; } else { String path = url.substring(pos); if (!path.endsWith("/")) { path += "/"; } return path; } } COM: <s> this code has been shamelessly copied from the hudson eclipse project http code </s>
funcom_train/28108365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replaceAttributes(DefaultGraphCell cell, Map newattributes) { if (attributes.containsKey(cell)) { Map oldattributes = (Map) attributes.get(cell); oldattributes.clear(); oldattributes.putAll(newattributes); if (log.isDebugEnabled()) { // log.debug("after replacement: " + oldattributes.toString()); } } } COM: <s> replaces attributes for the given graphcell with the given attribute map </s>
funcom_train/26336187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void identify( GameItem item ) { String className = item.getClass().getName(); this.identNames.put( className, item.getIdentName() ); // refresh existing items this.refreshInventory( this.engine.getWorld().getPlayer().getInventory() ); this.refreshMapItems( this.engine.getWorld().getCurrentMap() ); } COM: <s> identify type of item </s>
funcom_train/1242177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeDimensionStyles() throws IOException { writeTableStart("DIMSTYLE"); writeGroup(5, "A"); writeOwnerHandle("0"); writeSubClass("AcDbSymbolTable"); writeSize(1); writeDimensionStyle("27", "A", "11", "STANDARD", 0); writeTableEnd(); } COM: <s> writes the dimstyle table </s>
funcom_train/24260378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String propertyType(String prop) { String type = ""; if (prop != null) { if (prop.length() >= 8 && prop.substring(0, 8).equals("distance")) type = "distance"; else if (prop.length() >= 9 && prop.substring(0, 9).equals("direction")) type = "direction"; else if (prop.length() >= 7 && prop.substring(0, 7).equals("part_of")) type = "part_of"; else type = prop; } return type; } COM: <s> check what kind of property we have </s>
funcom_train/7534852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processAlterSchemaRename() throws HsqlException { String name = tokenizer.getSimpleName(); tokenizer.getThis(Token.T_RENAME); tokenizer.getThis(Token.T_TO); String newName = tokenizer.getSimpleName(); boolean isQuoted = tokenizer.wasQuotedIdentifier(); database.schemaManager.renameSchema(name, newName, isQuoted); } COM: <s> handles alter schema </s>
funcom_train/1721653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isConflict() { for(ContainerComponent c1 : workplaceComponents) { Rectangle r=c1.getBounds(); for (ContainerComponent c2 : workplaceComponents) { if (c2==c1) continue; Rectangle r2 = c2.getBounds(); if (r2.intersects(r)) { return true; } } Rectangle truckBounds=truck.getBounds(); if(truckBounds.intersects(r) && !truckBounds.contains(r)) { return true; } } return false; } COM: <s> checks if there exist conflict at the workplace </s>
funcom_train/12190186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultipleInterfaces() throws Exception { final ClassWithMultipleInterfaces1Mock classMock = new ClassWithMultipleInterfaces1Mock("classMock", expectations); Interface1Mock.Expects mock1Expects = classMock.expects; Interface2Mock.Expects mock2Expects = classMock.expects; Interface3Mock.Expects mock3Expects = classMock.expects; InterfaceWithMultipleInterfaces1Mock.Expects multipleMockExpects = classMock.expects; assertSame(mock1Expects, mock2Expects); assertSame(mock3Expects, multipleMockExpects); } COM: <s> ensure that multiple interfaces works correctly </s>
funcom_train/46824578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { if (isGamePlaying() && isThisPlayersTurn()) { int mouseX = e.getX(); int mouseY = e.getY(); int col = 0; int row = 1; int location = 2; int[] info = this.model.getCellAndLocation(new Point(mouseX, mouseY)); this.model.setPressedLine(info[col], info[row], info[location]); } } COM: <s> implementation of the mouse pressed interface </s>
funcom_train/167387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void run() { accept(this); check(); setLinks(); do { if (isCalculate) { // 計算前のObserverを呼び出す if (calculationObservers.size() > 0) { Iterator iter = calculationObservers.listIterator(); while (iter.hasNext()) ((CalculationObserver) iter.next()).start(); } integrate(); // 計算後のObserverを呼び出す if (calculationObservers.size() > 0) { Iterator iter = calculationObservers.listIterator(); while (iter.hasNext()) ((CalculationObserver) iter.next()).stop(); } } if (isActive) try { wait(); } catch (InterruptedException e) { log.error(e); } } while (isActive); quit(); } COM: <s> main entry of this thread </s>
funcom_train/50119668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean set_start_room(String[] params) { if (params.length < 2) { write("Syntax is: set_home </start/room>"); return true; } ((client)this_player()).set_start_room(params[1]); write("Your start location is now: " + params[1] + "."); return true; } COM: <s> implementation for the set home command added in the create method </s>
funcom_train/42452364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertChildAt(final int index, final Node 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 at the specified position in the child list </s>
funcom_train/2344819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.weightx = 1.0; jPanel = new JPanel(); jPanel.setLayout(new GridBagLayout()); jPanel.add(getJScrollPane(), gridBagConstraints); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/18749785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Action getPasteAction() { if (pasteAction == null) { Action action = TransferHandler.getPasteAction(); action.putValue(Action.SMALL_ICON, new ImageIcon(Groove.getResource("paste.gif"))); pasteAction = new TransferAction(action, Options.PASTE_KEY, Options.PASTE_ACTION_NAME); } return pasteAction; } COM: <s> lazily creates and returns the action to paste graph elements into the editor </s>
funcom_train/37658415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printSummary(TestResult result) { log.debug("calling printHeader() ..."); printHeader(result); log.debug("calling printErrors() ..."); printErrors(result); log.debug("calling printFailures() ..."); printFailures(result); log.debug("calling printFooter() ..."); printFooter(result); } COM: <s> print the result summary </s>
funcom_train/3366630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMaximumSize(JComponent c) { long width = 0; Enumeration enumeration = table.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { TableColumn aColumn = (TableColumn)enumeration.nextElement(); width = width + aColumn.getMaxWidth(); } return createTableSize(width); } COM: <s> return the maximum size of the table </s>
funcom_train/25422324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResponseFormat getResponseFormat(HttpServletRequest request, RestQuery query) { String sFormat = ""; if (query != null) { sFormat = Val.chkStr(query.getResponseFormat()); } if (sFormat.length() == 0) { sFormat = getRequestParameter(request,"f"); } return ResponseFormat.checkValueOf(sFormat); } COM: <s> determines the response format </s>
funcom_train/14245187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MCallAction buildCallAction(MOperation oper, String name) { if (oper == null) { throw new IllegalArgumentException("There should be an operation" + " with a callaction."); } MCallAction action = createCallAction(); action.setName(name); action.setOperation(oper); return action; } COM: <s> builds a callaction belonging to operation oper with a given name </s>
funcom_train/7620619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getTransformedIndex(AnimationParameters params) { switch (getOrder()) { case ORDER_REVERSE: return params.count - 1 - params.index; case ORDER_RANDOM: if (mRandomizer == null) { mRandomizer = new Random(); } return (int) (params.count * mRandomizer.nextFloat()); case ORDER_NORMAL: default: return params.index; } } COM: <s> transforms the index stored in </s>
funcom_train/15694785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertStageAt(AbstractStage<T> stage, int pos) { this.stages.add(pos, stage); if (stage.getFitness() == null) { if (this.fitness != null) { stage.setFitness(this.fitness, true); } else { stage.setBiggerIsBetter(this.biggerIsBetter); } } } COM: <s> adds the specified stage to the specified position </s>
funcom_train/21999696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFloating(boolean b, Point p) { super.setFloating(b, p); Component component = getParent(); while (!(component instanceof JFrame) && !(component instanceof JInternalFrame)) component = component.getParent(); component.invalidate(); component.validate(); component.repaint(); Window w = SwingUtilities.getWindowAncestor(getParent()); if (w != null) { JDialog fr = null; if (w instanceof JDialog) { fr = (JDialog) w; fr.addWindowListener(new FloatFrameCloseListener()); w.validate(); w.repaint(); } } } COM: <s> this method sets the floating property for the jtool bar </s>
funcom_train/50565040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean refreshAll() { synchronized(this) { if (alreadyRunningRefreshThread) return false; alreadyRunningRefreshThread = true; } Thread t = new Thread("FlockAsyncRefresh") { public void run() { try { doRefreshAll(); } catch (FlockResourceException e) { LOGGER.warn("Problem in refreshAll", e); } finally { alreadyRunningRefreshThread = false; } } }; t.start(); return true; } COM: <s> todo implement proper balking </s>
funcom_train/12896295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startScheduler() { try { Scheduler scheduler = SchedulerService.getService().getScheduler(); if (!scheduler.isStarted()) { scheduler.start(); } _log.info("Thread Pool: " + scheduler.getMetaData().getThreadPoolSize()); } catch (Exception e) { _log.error("Error starting scheduling service", e); } } COM: <s> initialize the quartz scheduling service </s>
funcom_train/3992039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openTarget() { if (target != null) { try { if(movieScreen.ErrNum == 10) { getAppletContext().showDocument(new URL(lockedInfo), target); } else { getAppletContext().showDocument(new URL(address), target); } } catch (java.net.MalformedURLException MUE) { System.out.println("MPEG1.mouseClicked: " + MUE); } } } COM: <s> opens an address url in the target self blank top etc window </s>
funcom_train/45692172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSongLengthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Song_songLength_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Song_songLength_feature", "_UI_Song_type"), EsxPackage.Literals.SONG__SONG_LENGTH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the song length feature </s>
funcom_train/2948882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create() { Connection conn = null; try { //get query details conn = ArtDBCP.getConnection(); create(conn, queryId); //build parameter list buildParamList(conn); } catch (Exception e) { logger.error("Error",e); } finally { try { if (conn != null) { conn.close(); } } catch (SQLException e) { logger.error("Error",e); } } } COM: <s> connect to art repository and retrieve info related to the query </s>
funcom_train/20646447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTitle(String name, int level) { assert level > 0 : "level cannot be equal to zero"; m_currentLevel = level; if (level < REALTITLELIMIT) { m_row.titles[level-1] = name; } else { m_row.titles[REALTITLELIMIT-1] = produceIndent(level)+name; m_row.subreport = null; m_row.tariffTitle = ""; m_row.tariffDescription = ""; m_row.level = REALTITLELIMIT; m_result.addData(m_row); } } COM: <s> add a title item </s>
funcom_train/28672849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFactoryMethodPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BeanType_factoryMethod_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BeanType_factoryMethod_feature", "_UI_BeanType_type"), BeansPackage.Literals.BEAN_TYPE__FACTORY_METHOD, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the factory method feature </s>
funcom_train/48045548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void normalizeConvert(CalendricalMerger merger, DateTimeRule sourceRule, DateTimeRule destRule) { DateTimeField field1 = merger.getValue(sourceRule); if (field1 != null) { long period = sourceRule.convertToPeriod(field1.getValue()); merger.storeMergedField(destRule, destRule.convertFromPeriod(period)); merger.removeProcessed(sourceRule); } } COM: <s> merges a field to a simpler form of itself </s>
funcom_train/42970502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logInternalError(ServiceCall serviceCall, Exception e) throws DriverManagerException{ logger.error("Internal Failure", e); throw new DriverManagerException("Internal Error calling service (" + serviceCall.getService() + ") on Driver (" + serviceCall.getDriver() + ") in instance (" + serviceCall.getInstanceId() + ")",e); } COM: <s> utility method for logging internal failures and encapsulating it into driver manager exceptions </s>
funcom_train/25858477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printAllTriplesNoDuplicated() throws Exception { if (searcher != null) { TreeMap<String, String> output = new TreeMap<String, String>(); for (int i = 0; i < searcher.maxDoc(); i++) { Document doc = searcher.doc(i); output.put(doc.get(KEY_FIELD), doc.get(VALUE_FIELD)); } for (String key : output.keySet()){ System.out.println(key + " | " + output.get(key)); } } } COM: <s> print all triples without dup </s>
funcom_train/10013502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void menuEvent(Event event) { switch (event.type) { case SWT.Show: monthsMenu.setDefaultItem(monthsMenu.getItems()[currentMonthCal .get(Calendar.MONTH)]); break; case SWT.Selection: currentMonthCal.set(Calendar.MONTH, ((Integer) event.widget .getData()).intValue()); refreshDisplay(); break; } } COM: <s> manages all events of the contextual menu on the month label of the </s>
funcom_train/11728204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCombinedAnd() throws RepositoryException { String stmt = xpathRoot + "/*[@" + jcrPrimaryType + "='" + nodeTypeName + "' and @" + jcrPrimaryType + "='" + ntBase + "']"; try { qm.createQuery(stmt, Query.XPATH); } catch (InvalidQueryException e) { fail("invalid statement syntax for '" + stmt + "'"); } } COM: <s> verifies that the and operator is accepted for propertiess values </s>
funcom_train/50863287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsUnitClassLocal(Class<? extends Unit> unitClass) { boolean result = false; if (containedUnits != null) { Iterator<Unit> i = containedUnits.iterator(); while (i.hasNext()) { if (unitClass.isInstance(i.next())) { result = true; } } } return result; } COM: <s> checks if any of a given class of unit is in storage </s>
funcom_train/5242422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EncryptedPair ReEncrypt(EncryptedPair pair, BigIntMod rndNum){ BigIntMod one = new BigIntMod(P, BigInteger.ONE); // make a new EncryptedPair - E(1,r) EncryptedPair EncryptOne = Encrypt (one, rndNum); // return the multiply of pair and E(1,r) return multEncryptions (pair, EncryptOne); } COM: <s> re encrypt an encrypted message </s>
funcom_train/34524847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(EvaluationContext context, Closure[] args) { ELContext elctx = context.getELContext(); Object target = getValue(context); try { return ELEngine.invokeTarget(elctx, target, args); } catch (MethodNotFoundException ex) { throw methodNotFound(elctx, target, null, ex); } catch (RuntimeException ex) { throw runtimeError(elctx, ex); } } COM: <s> apply function call </s>
funcom_train/13390740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testGetView() throws Exception { /* States: * View: original, modified * Argument combinations: * N/A */ WatchDataSourceImpl impl = new WatchDataSourceImpl( "watch", null, EmptyConfiguration.INSTANCE); Assert.assertEquals(null, impl.getView()); impl.setView("abcd"); Assert.assertEquals("abcd", impl.getView()); impl.close(); } COM: <s> tests the code get view code method </s>
funcom_train/48337635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(ModifiableString s) { char[] chars2 = s.chars; int l1 = chars.length; int l2 = chars2.length; for (int i=0; i<l1 && i<l2; i++) { char c1 = chars[i]; char c2 = chars2[i]; if (c1 != c2) { return c1 - c2; } } return l1 - l2; } COM: <s> compare this string with the specified string </s>
funcom_train/8312061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Context getContext(Object node) { if (node instanceof Context) { return ((Context) (node)); } Context fullContext = new Context(getContextSupport()); if (node instanceof java.util.Vector) { fullContext.setNodeSet(((Vector) (node))); } else { Vector list = new SingletonList(node); fullContext.setNodeSet(list); } return fullContext; } COM: <s> implementation specific object </s>
funcom_train/46692495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void colorRows() { int size = table.getItemCount(); for(int i=0; i<size; i++) { if(i % 2 == 0) { table.getItem(i).setBackground((pref_altRowColors ? Constants.LIGHT_GRAY : Constants.WHITE)); } else { table.getItem(i).setBackground(Constants.WHITE); } } } COM: <s> colors the backgrounds of the rows on the table </s>
funcom_train/6289718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurFirstUnread() { if (getUnreadMails() != 0) { MessageHeader message; cur = 0; empties = 0; for (int i = 0; i < getMessageCount(); i++) { message = getMessageHeaderAt(i); if ( message.readStatus == MessageHeader.NOT_READ) { break; } shiftSelectedIndex(true); } } } COM: <s> moves the cursor on the first unread mail </s>
funcom_train/4814129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleFaceDownTile(Point2D buttonPosition) { if (buttonPosition == null) { throw new IllegalArgumentException("Button position can't be null"); } Team flippingTeam = game.getActivePlayer().getTeam(); game.getBoard().flipTile(flippingTeam, buttonPosition); } COM: <s> handles the user clicking a face down tile to flip it </s>
funcom_train/10559200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void skipField(ObjectInput in) throws IOException { int fieldStatus = StoredFieldHeader.readStatus(in); int fieldDataLength = StoredFieldHeader.readFieldDataLength(in, fieldStatus, slotFieldSize); if (fieldDataLength != 0) { DataInputUtil.skipFully(in, fieldDataLength); } } COM: <s> skip a field header and its data on the given stream </s>
funcom_train/41024614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Card getExaltedAttacker() { if (getAttackerCount() > 1) { return null; } if (combat.getAttackersList().size() == 1) { return combat.getAttackersList().get(0); } Set<Integer> keys = pwCombatMap.keySet(); for (Integer pwid : keys) { Combat pwCombat = pwCombatMap.get(pwid); if (pwCombat.getAttackersList().size() == 1) { return pwCombat.getAttackersList().get(0); } } return null; } COM: <s> search for alone attacker in combat and planeswalker combats </s>
funcom_train/29985894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HTTPHeader filterHTTPIn (List<HTTPFilter> filters, HTTPHeader in) { int fsize = filters.size (); for (int i = 0; i < fsize; i++) { HTTPFilter hf = filters.get (i); HTTPHeader badresponse = hf.doHTTPInFiltering (socket.socket (), in, this); if (badresponse != null) return badresponse; } return null; } COM: <s> filter the headers using the methods in the vector </s>
funcom_train/48385835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void regenerate() { if (diff_map.size() == 0) return; counter = 0; base_map = new HashMap<Key, Value>(base_map); for (Entry<Key, Value> entry: diff_map.entrySet()) { if (entry.getValue() == null) base_map.remove(entry.getKey()); else base_map.put(entry.getKey(), entry.getValue()); } diff_map = new HashMap<Key, Value>(); } COM: <s> create a new immutable backing map for this map </s>
funcom_train/3369706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void computeRow( int y, int[] row ) { if ( y == 0 ) { synchronized ( this ) { try { while ( !isDirty ) { wait(); } } catch (InterruptedException ie) { } isDirty = false; } } if (aborted) { return; } for ( int i = 0; i < row.length; ++i ) { row[i] = getRGBForLocation( i, y ); } } COM: <s> overriden method from synthetic image </s>
funcom_train/47548123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLineJoin() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); GdkGCValues values = new GdkGCValues(); OS.gdk_gc_get_values(handle, values); int join = SWT.JOIN_MITER; switch (values.join_style) { case OS.GDK_JOIN_MITER: join = SWT.JOIN_MITER; break; case OS.GDK_JOIN_ROUND: join = SWT.JOIN_ROUND; break; case OS.GDK_JOIN_BEVEL: join = SWT.JOIN_BEVEL; break; } return join; } COM: <s> returns the receivers line join style which will be one </s>
funcom_train/33591697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rebuild(final JavaClass jclass, final String targetName) throws IOException, ClassNotFoundException { if (checkRebuildable(jclass)) { ClassGen cgen = new ClassGen(jclass); cgen.addMethod(createWriteObject(cgen, jclass)); cgen.addMethod(createReadObject(cgen, jclass)); cgen.getJavaClass().dump(targetName); } } COM: <s> actual re build process </s>
funcom_train/28473931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getLocusUnknownPanel() { if (locusUnknownPanel == null) { locusUnknownLabel = new JLabel(); locusUnknownLabel.setText("Unknown Score (0-1):"); locusUnknownLabel.setPreferredSize(new Dimension(180, 16)); locusUnknownPanel = new JPanel(); locusUnknownPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); locusUnknownPanel.add(locusUnknownLabel, null); locusUnknownPanel.add(getLocusUnknownTextField(), null); } return locusUnknownPanel; } COM: <s> this method initializes locus unknown panel </s>
funcom_train/39177565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setLocale(Locale locale) { endComposition(); try { if(supportedLocales.containsKey(locale)){ currentLocale = locale; loadLocale(locale); if(keyboardMap != null) keyboardMap.update(currentHandler, currentState); return true; } } catch(IllegalArgumentException iae){ iae.printStackTrace(); return false; } return false; }// boolean setLocale(Locale locale) COM: <s> selects the active locale </s>
funcom_train/24000659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetInvalidTypeError() { OclExpressionAst source = new TestOclExpressionAst("test", OclObjectFactory.TRUE); FeatureCallAst instance = new TestFeatureAst(source); assertEquals("Undefined feature call 'FullFeatureName' on Boolean",instance.getInvalidTypeError()); } COM: <s> test of get invalid type error method of class feature call ast </s>
funcom_train/46999512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBinLog(int id, int arg, Object res, byte[] annotation) { String fileS = ""; if (res != null) { currentFile = (File) res; fileS = currentFile.getName(); } try { sql.binlog(action(arg), fileS, annotation); } catch (RemoteException e) { e.printStackTrace(); } } COM: <s> adds a drawing at low level </s>
funcom_train/29687329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonSettings() { if (jButtonSettings == null) { jButtonSettings = new JButton(); jButtonSettings.setText("Settings ..."); jButtonSettings.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { doSettings(); } }); } return jButtonSettings; } COM: <s> this method initializes j button settings </s>
funcom_train/18255426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assignAgentSelector(IncrementalExecutionStrategy strategy) { if (scape.getExecutionStyle() == Scape.COMPLETE_TOUR) { if (iterationCount >= scape.getSize()) { strategy.agentSelector = new TourAgentSelector(strategy); } else { strategy.agentSelector = new PartialTourAgentSelector(strategy, iterationCount); } } else { strategy.agentSelector = new RandomAgentSelector(strategy, iterationCount); } } COM: <s> assign agent selector </s>
funcom_train/47088211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void waitForInitialization() { // ******************************* // *** !!! CICLO DI ATTESA !!! *** // ******************************* while (! isInitialized()) { try { // TODO -- may include a test for initialization exception here. System.out.println("Wait init canvas..."); Thread.sleep(500); } catch (InterruptedException e) { } } System.out.println("...canvas initialized!"); } COM: <s> loops until the canvas is initialize </s>
funcom_train/37616172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMatrices(String name, InterpolationType interp, float[] data) { if (data == null || data.length % 16 != 0) { UI.printError(Module.API, "Cannot create matrix parameter %s -- invalid data length", name); return; } add(name, new Parameter(ParameterType.MATRIX, interp, data)); } COM: <s> add the specified matrices as a parameter </s>
funcom_train/640666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PortType getPortType(String portTypeName) throws NoPortTypeFoundException{ PortType portType = new PortType(); for(PortType x : portTypes){ if (x.getPortTypeName().equals(portTypeName)){ portType = x; } } try{ if ( portType.getPortTypeName().equals("") ) { } } catch (NullPointerException e) { throw new NoPortTypeFoundException(); } return portType; } COM: <s> returns an object of type port type with the imported name </s>
funcom_train/35873192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getParameter(String name, String defaultVal) { if (name != null) { String retVal = super.getParameter(name); retVal = isBlank(retVal) ? super.getParameter(name.toUpperCase()) : retVal; return isBlank(retVal) ? defaultVal : retVal; } return defaultVal; } COM: <s> overrides get parameter to allow all upper or all lowercase parameter names </s>
funcom_train/5343934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getHadSuccessfulUpload() throws BadPacketException { parseResults(); switch (_uploadedFlag) { case UNDEFINED: throw new BadPacketException(); case TRUE: return true; case FALSE: return false; default: Assert.that(false, "Bad value for uploaded flag: "+_pushFlag); return false; } } COM: <s> returns true if this has successfully uploaded a complete file bit set </s>
funcom_train/9083899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getScore() throws NumberFormatException { final String spamHeaderValue = getSpamHeaderValue(); if (spamHeaderValue == null) { return 0d; } final int semicolonPosition = spamHeaderValue.indexOf(';'); if (semicolonPosition == -1) { return 0d; } int slashPosition = spamHeaderValue.indexOf('/'); if (slashPosition == -1) { // there is no threshold value slashPosition = spamHeaderValue.length(); } final String score = spamHeaderValue.substring( semicolonPosition + 1, slashPosition).trim(); return Double.parseDouble(score); } COM: <s> get the spam score for the processed message </s>
funcom_train/50579167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { try { if (isPortletRequest == false) { pageContext.getOut().write("</title>"); } } catch (java.io.IOException e) { throw new JspTagException("IO Error: " + e.getMessage()); } return EVAL_PAGE; } COM: <s> method called at end of tag </s>
funcom_train/1426380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void chooseReplayFiles( final File[] files ) { if ( files == null ) return; for ( final File file : files ) { if ( requestedToStop ) return; if ( file.isDirectory() ) chooseReplayFiles( file.listFiles( IO_REPLAY_FILE_FILTER ) ); else if ( IO_REPLAY_FILE_FILTER.accept( file ) ) replayFileList.add( file ); } } COM: <s> chooses the replay files in the specified files and folders </s>
funcom_train/3159855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void internalFrameClosing(InternalFrameEvent e) { final Container contentPane = e.getInternalFrame().getContentPane(); if (contentPane instanceof ProductSceneView) { ProductSceneView view = (ProductSceneView) contentPane; Product product = view.getProduct(); view.removePixelPositionListener(getPixelPositionListener(product)); } } COM: <s> invoked when an internal frame is in the process of being closed </s>
funcom_train/28754461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRnaextractionid(Long newVal) { if ((newVal != null && this.rnaextractionid != null && (newVal.compareTo(this.rnaextractionid) == 0)) || (newVal == null && this.rnaextractionid == null && rnaextractionid_is_initialized)) { return; } this.rnaextractionid = newVal; rnaextractionid_is_modified = true; rnaextractionid_is_initialized = true; } COM: <s> setter method for rnaextractionid </s>
funcom_train/34138175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(String filename) { try { FileOutputStream fileOutputStream = new FileOutputStream(filename); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream); outputStreamWriter.write(toXml()); outputStreamWriter.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> write currently loaded menus to an xml file </s>
funcom_train/44163421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int scoutsNeeded() { int nScouts = 0; for (Unit u : getPlayer().getUnits()) { if (u.getRole() == Unit.Role.SCOUT) nScouts++; } nScouts = ((getGame().getTurn().getAge() <= 1) ? 3 : 1) - nScouts; return Math.max(0, nScouts); } COM: <s> how many scouts should we have </s>
funcom_train/24000741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateState() throws Exception { LoopState state = new LoopState(); state.results = null; IterateAst instance = new IterateAst(-1,TokenFactory.createToken(-1)); instance.updateState(null,state,null, OclObjectFactory.TRUE); assertEquals(OclObjectFactory.TRUE,state.results); assertFalse(state.exitEarly); } COM: <s> test of update state method of class iterate ast </s>
funcom_train/5774420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getLicenseArea() { if (licenseArea == null) { licenseArea = new LTextArea(); licenseArea.setEditable(false); licenseArea.setLineWrap(true); licenseArea.setWrapStyleWord(true); licenseArea.setDefaultCharset("UTF-8"); licenseArea.setCaptionTag("license"); } return licenseArea; } COM: <s> this method initializes license area </s>
funcom_train/28351990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeBPMPanel() { JPanel setupPanel = makeBPMSetupPanel(theDoc.bpmController); JPanel resultsPane = makeResultsPanel(); //bpmPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, setupPanel, tablePanel); bpmPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, setupPanel, resultsPane); bpmPanel.setOneTouchExpandable(true); } COM: <s> contruct the panel to do the accelerator device selection setup </s>
funcom_train/50077226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateUser() throws SecurityManagementException { UserManager userManager = (UserManager) Lookup.getInstance().fetchComponent( userManagerServiceLocation); Principal user = userManager.createUser(TEST_USERNAME, TEST_USERINFO); Principal cycledUser = userManager.createUser( TEST_STANDALONE_USERNAME, TEST_STANDALONE_USERINFO); if (user == null) { fail( "After call to createUser, a null user object " + "was returned."); } } COM: <s> tests creation of a user </s>
funcom_train/40311539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDependentsString() { DBObject dbObject = new DBObject(definition, NAME, null); DBObjectDef def = new DBObjectDef("TABLE"); DBObject tableObj = new DBObject(def, "TABLE", dbObject); dbObject.addDependent(tableObj); Collection<DBObject> dependents = dbObject.getDependents("TABLE"); assertNotNull("Get dependents failed", dependents); assertTrue("Get dependents failed", dependents.contains(tableObj)); } COM: <s> p test get dependents string successfully </s>
funcom_train/50300589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer blaj = new StringBuffer("AsynchMessage: <#" + getNumber() + "> "); if (parameters == null || parameters.length == 0) { blaj.append("empty"); return blaj.toString(); } for (int i=0;i<parameters.length;i++) blaj.append("<"+parameters[i].toString()+">"); return blaj.toString(); } COM: <s> returns a string representation </s>
funcom_train/13261238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void analyzeDropRate(JobClass jobClass, Measure Measure) { if (jobClass != null) { // If array is not initialized, initialize it if (dropRatePerClass == null) { dropRatePerClass = new InverseMeasure[numClass]; } // Sets measure dropRatePerClass[jobClass.getId()] = (InverseMeasure) Measure; } else { dropRate = (InverseMeasure) Measure; } } COM: <s> analyzes drop rate for a specific job class or for every class </s>
funcom_train/43098745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testModelElement() { Object me = Model.getUmlFactory().buildNode(Model.getMetaTypes().getObject()); assertNotNull("Didn't create object", me); assertTrue("Should be a base", Model.getFacade().isABase(me)); assertTrue("Should be a model element", Model.getFacade().isAModelElement(me)); runTruthTests(me); } COM: <s> test the creation of a model element </s>
funcom_train/48633129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateSearchTerms() { // populate search terms from current MEST search catalogue List<String> searchTerms = getPortalSession().getSelectedSearchCatalogueTerms(); if (searchTerms == null) { logger.warn("no search keywords available to populate MEST search combobox (is MEST server down?)"); } else { SimpleListModel dictModel= new SimpleListModel(searchTerms); getMESTSearchTermsCombobox().setModel(dictModel); } } COM: <s> fixme this really belongs in whatever class is composed with </s>
funcom_train/10769195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlock() { synchronized (this) { if (ss == null) { throw new IllegalStateException("ProcessMutex: Bad mutex state exception."); } try { ss.close(); } catch (IOException ioe) { throw new IllegalStateException("ProcessMutex: Error closing socket."); } finally { ss = null; this.notify(); } } } COM: <s> release the lock </s>
funcom_train/8559071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean roleEquals(Role role) { // if either of reference is null return false. if (exclusiveOr(this.role, role)) { return false; } // check if both are non-nulls if (assertNotNull(this.role) && assertNotNull(role)) { return stringEquals(this.role.getName(), role.getName()); } // both are null return true; } COM: <s> check equality for given role object with this profile locators role </s>
funcom_train/3712141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove (Object key) { // We cannot use remove() directly on both vectors since only // the key objects are required to implement equals(). int k = key_storage.indexOf (key); if (k == -1) { return; } synchronized (this) { object_storage.remove (k); key_storage.remove (k); } } COM: <s> removes object with given key </s>
funcom_train/45472157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createComment(final Annotation annotation) { if (annotation == null) { return null; } Enumeration enumeration = annotation.getDocumentation(); if (enumeration.hasMoreElements()) { //-- just use first <info> Documentation documentation = (Documentation) enumeration.nextElement(); return normalize(documentation.getContent()); } return null; } COM: <s> creates and returns a javadoc comment from a given </s>
funcom_train/10914467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) { PDFANode aNode = (PDFANode)super.createGraphicsNode(ctx, e); aNode.setDestination(((SVGAElement)e).getHref().getBaseVal()); aNode.setTransform(transform); return aNode; } COM: <s> builds using the specified bridge context and element the </s>