__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25504685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image loadWidgetImage(String[] widgetKey) throws ResourceUnavailableException { assert widgetKey != null; assert widgetKey.length == 2; assert widgetKey[0] != null; assert widgetKey[1] != null; final String[] key = new String[] { widgetKey[0], widgetKey[1] + ".image" }; return loadImage(key); } COM: <s> load a widgets image attribute </s>
funcom_train/13902282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) { MenuManager menuMgr= new MenuManager(); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(menuListener); Menu menu= menuMgr.createContextMenu(getTree()); getTree().setMenu(menu); viewSite.registerContextMenu(popupId, menuMgr, this); } COM: <s> attaches a contextmenu listener to the tree </s>
funcom_train/3368671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Clipboard getClipboard(JComponent c) { if (SwingUtilities2.canAccessSystemClipboard()) { return c.getToolkit().getSystemClipboard(); } Clipboard clipboard = (Clipboard)sun.awt.AppContext.getAppContext(). get(SandboxClipboardKey); if (clipboard == null) { clipboard = new Clipboard("Sandboxed Component Clipboard"); sun.awt.AppContext.getAppContext().put(SandboxClipboardKey, clipboard); } return clipboard; } COM: <s> returns the clipboard to use for cut copy paste </s>
funcom_train/44701792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int delete(PlaqueId plaqueId) throws SQLException { Statement statement = connection.createStatement(); int deleted = 0; String delete = "DELETE FROM " + SUBMISSION + " WHERE " + PlaqueContainer.PLAQUE_ID + " = '" + plaqueId.getId() + "'"; try { deleted = statement.executeUpdate(delete); } catch (SQLException e) { throw e; } finally { statement.close(); } return deleted; } //delete() COM: <s> removes the specified submission from the database </s>
funcom_train/36172313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToDataDefinition(String variable, String units, SimConnectDataType dataType) throws IOException { if (dataType.size() == -1) throw new IllegalArgumentException(Messages.getString("DataDefinitionWrapper.0")); //$NON-NLS-1$ synchronized (this) { sc.addToDataDefinition(datadefid, variable, units, dataType); DataDef dd = new DataDef(variable, totalSize, dataType); dataDefs.add(dd); this.totalSize += dataType.size(); } } COM: <s> add a named variable to this data definition </s>
funcom_train/19318519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFloat(float value) throws JMSException { if(!isBodyModifiable()) { throw new MessageNotWriteableException("StreamMessage read_only"); } try { dos.writeByte((int) TYPE_FLOAT); dos.writeFloat(value); } catch(IOException e) { throw new JMSException(e.getMessage()); } } COM: <s> writes a code float code to the stream message </s>
funcom_train/31127075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirmwareVersion() { sendCommand('V'); byte mem_loc = 0x42; // NXTCam V1.1 appears to need a delay here otherwise it doesn't refresh the memory // at location 0x42 the first time. 50 ms is not enough, 100 ms works: try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } return fetchString(mem_loc, 12); } COM: <s> returns the nxtcam firmware version </s>
funcom_train/32812236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String afpFilenameDTD( String filename ) { StringBuilder result = new StringBuilder(getConfig() .getString(AFP_DTD_PREFIX_PROPERTY, DEFAULT_AFP_DTD_PREFIX)); if (perl.matches(filename, regex)) { MatchResult r = perl.getMatch(); for (int i=1; i<r.groups();i++) { result.append( r.group(i)); } } else { result.append( filename ); } return result.append(".dtd").toString(); } COM: <s> code afp filename dtd code creates the bogus dtd from the afp </s>
funcom_train/29372587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFormattedTextField getJTextField_TA() { if (jTextField_TA == null) { try { jTextField_TA = new JFormattedTextField(new MaskFormatter("*****")); } catch (ParseException e) { e.printStackTrace(); } jTextField_TA.setBounds(new Rectangle(395, 90, 60, 20)); } return jTextField_TA; } COM: <s> this method initializes j text field ta </s>
funcom_train/4920079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXmlConfigurationWithoutLabels() throws Exception { // Create the XML configuration context ConfigurationContext context = new XmlConfigurationContext(this, "XmlConfigurationContextWithoutLabels.xml"); // Validate the first configuration item ConfigurationItem one = context.getConfigurationItem("one"); this.validateConfigurationItem(one, "one", "<one name=\"value\">first</one>"); // Validate the second configuration item ConfigurationItem two = context.getConfigurationItem("two"); this .validateConfigurationItem(two, "two", "<two><element attribute=\"something\">another</element></two>"); } COM: <s> ensure can load the </s>
funcom_train/22346782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setList(java.lang.String[] newList) { // number of queues nbr_que = newList.length; // Create new List of queues list = new String[nbr_que]; // Load each slot for (int i = 0; i < nbr_que; i++) { // move to instance field list[i] = newList[i]; } // end-for } // end-method COM: <s> set the list of queues </s>
funcom_train/29645719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureFactory() { SimpleDateFormat formatter = new SimpleDateFormat(DATE_PATTERN, Locale.US); formatter.setTimeZone(TimeZone.getTimeZone("America/New_York")); CustomDateEditor dateEditor = new CustomDateEditor(formatter, true); registerCustomEditor(Date.class, dateEditor); } COM: <s> configure the company model reader e </s>
funcom_train/13938438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistanceToFace(CSG_Face face2){ double distance = Double.MAX_VALUE; Iterator<CSG_Polygon> polyIter = polygons.iterator(); while(polyIter.hasNext()){ CSG_Polygon poly = polyIter.next(); Iterator<CSG_Polygon> poly2Iter = face2.polygons.iterator(); while(poly2Iter.hasNext()){ CSG_Polygon poly2 = poly2Iter.next(); double distCheck = poly.getClosestDistanceToPoly(poly2); if(distCheck < distance){ distance = distCheck; } } } return distance; } COM: <s> get the closest distance from this face to another </s>
funcom_train/9687839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object another) { if (another instanceof BinPanelKey) { BinPanelKey other = (BinPanelKey) another; //System.out.println("another key: "+ other.key); //System.out.println("this key: "+ this.key); return other.key.equals(this.key); } return false; } COM: <s> overrides the equals method to compare the equality of another </s>
funcom_train/6494004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isRunTestsMethod( Method m ) { if ( !m.getName().equals( "runTests" ) ) return false; if ( !m.isPublic() ) return false; if ( !m.isStatic() ) return false; if ( !m.getSignature().equals( "()I" ) ) return false; return true; } COM: <s> checks that the given method is code public static int run tests code </s>
funcom_train/592619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer getRequestURL() { return new StringBuffer().append(this.protocol) .append("://") .append(this.serverName) .append(":") .append(this.serverPort) .append(this.contextPath) .append(this.servletPath) .append(this.pathInfo); } COM: <s> returns an attempt at a reconstructed url based on its constituent parts </s>
funcom_train/28875884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean insertValueAt(int index, int value) { if (size>=list.length) return false; // shift the elements for (int i=list.length-2; i>=index; i--) { list[i+1]=list[i]; } list[index]=value; size++; return true; } COM: <s> insert the given value at given position shifting all the others </s>
funcom_train/20612463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addArgPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UsedService_arg_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UsedService_arg_feature", "_UI_UsedService_type"), ClPackage.Literals.USED_SERVICE__ARG, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the arg feature </s>
funcom_train/15861721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Class allocateClass(final String fullclass) throws Exception { try { // try user class-cache and then class possibly indicated including packages Class c = classLoader.loadClass(fullclass); return (c != null) ? c : Class.forName(fullclass, false, null); } catch (ClassNotFoundException e) { return null; } catch (Exception e) { throw Tk.except("failed to dynamically aquire class: " + fullclass, e); } } COM: <s> this function dynamically tries to locate a class </s>
funcom_train/10801645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(InstrumentationLevel level, Object context) { if (_providers == null || _providers.size() == 0) { return; } for (InstrumentationProvider provider : _providers) { if (!provider.isStarted()) { provider.start(); } provider.startInstruments(level, context); } } COM: <s> starts all providers at a specific level and context </s>
funcom_train/16669507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { // append the letters StringBuilder string = new StringBuilder(); for (char letter : letters) { string.append(letter); } // append the occurrences string.append(" ("); for (int occurrence : occurrences) { string.append(" " + occurrence); } string.append(" )"); return string.toString(); } COM: <s> get a string with information about the word </s>
funcom_train/3561404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(java.lang.Object obj) { IndexedObject tempObject; if (obj instanceof IndexedObject) { tempObject = (IndexedObject) obj; if (refObject == null) if (tempObject == null) return true; else return false; else if (tempObject == null) return false; else return refObject.equals(tempObject.getRefObject()); } else return refObject.equals(obj); } COM: <s> checks if an object is equal to this one </s>
funcom_train/22189821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSignature(String st, int pos) { for(int i=pos; i < st.length(); i++) { if(st.charAt(i) == '(') { if ( i+1 < st.length() && findTick(st, i+1, FORWARD)) { return true; } } } return false; } COM: <s> provided that st starts with one of the block </s>
funcom_train/49318192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImageBackground(Color bg) { if (imageDisplay != null) { imageDisplay.setBackground(bg); } if (imagePanner != null) { ((JComponent)imagePanner.getImageDisplay()).setBackground(bg); } if (imageZoom != null) { ((JComponent)imageZoom.getImageDisplay()).setBackground(bg); } } COM: <s> set the background color of the image display pan and zoom windows </s>
funcom_train/37009456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double redMean() { double mean=0.f; for (int v = 0; v < getHeight(); v++) { for (int u = 0; u < getWidth(); u++) { mean += red(u, v); } } mean /= getWidth()*getHeight(); return mean; } COM: <s> returns the mean red pixel value in band 0 </s>
funcom_train/3104390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteItem(String _name) { for (int i=0; i<getItemCount();i++) { if ( ((String)getItemAt(i)).equals(_name) ) { removeItemAt(i); columnVector.removeElementAt(i); numberOfItems--; return true; } } return false; } COM: <s> deletes the item which has name equal to name </s>
funcom_train/19294822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRecomputeData() { mustRecompute = true; // Set the selected deterministics in the data manager. VARDataManager.getInstance().setDetSel( getCheckBox_Intercept().isSelected(), getCheckBox_Trend().isSelected(), getCheckBox_Dummies().isSelected()); } COM: <s> sets recomputation true and computes variable names </s>
funcom_train/4732624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlaneDisplace(int i, BigInteger value) throws ExceptionParameters, StegoException{ if((i < 0) || (i >= super.m_M)) throw new ExceptionParameters("generating in the СMethodBlakley.getPlaneDisplace(i)"); if(m_displacement == null) throw new StegoException(); m_displacement[i] = value; } COM: <s> set displacement of i th plane </s>
funcom_train/47184556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addHospital(HospitalBean hosp) throws FormValidationException { new HospitalBeanValidator().validate(hosp); try { if (hospDAO.addHospital(hosp)) { return "Success: " + hosp.getHospitalID() + " - " + hosp.getHospitalName() + " added"; } else return "The database has become corrupt. Please contact the system administrator for assistance."; } catch (DBException e) { e.printStackTrace(); return e.getMessage(); } catch (iTrustException e) { return e.getMessage(); } } COM: <s> adds a hosptial using the hospital bean passed as a param </s>
funcom_train/24539066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IProxy handleShellTitle(IProxy shell, IProxy title, boolean replaceOld, boolean wantOld, IExpression expression) { return expression.createSimpleMethodInvoke(BeanSWTUtilities.getShellApplyTitleMethodProxy(expression), null, new IProxy[] {shell, title, expression.getRegistry().getBeanProxyFactory().createBeanProxyWith(replaceOld)}, wantOld); } COM: <s> handle the shell title </s>
funcom_train/3365100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void completeEditing() { /* If should invoke stopCellEditing, try that */ if(tree.getInvokesStopCellEditing() && stopEditingInCompleteEditing && editingComponent != null) { cellEditor.stopCellEditing(); } /* Invoke cancelCellEditing, this will do nothing if stopCellEditing was successful. */ completeEditing(false, true, false); } COM: <s> messages to stop the editing session </s>
funcom_train/15695041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMemory(int memory) { int[] sz = new int[memory]; System.arraycopy(this.size, 0, sz, 0, memory); this.size = sz; int[] av = new int[memory]; System.arraycopy(this.availability, 0, sz, 0, memory); this.availability = av; if (horizon > memory) { horizon = memory; this.recompute(); } } COM: <s> sets the new lookback memory </s>
funcom_train/4541786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processDataFile() throws HsqlException { if (cache == null || filesReadOnly || database.isStoredFileAccess() ||!fa.isStreamElement(logFileName)) { return; } File file = new File(logFileName); long logLength = file.length(); long dataLength = cache.getFileFreePos(); if (logLength + dataLength > cache.maxDataFileSize) { checkpoint(true); } } COM: <s> defrag large data files when the sum of </s>
funcom_train/26327774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: + " public void add_extern_model(data_table_model ext_mod) \n" + " { \n" + " if (external_models.size() == 0) \n" + " { \n" + " \n" + " util_mod = ext_mod; \n" + " \n" + " } \n" + " \n" + " \n" + " super.add_extern_model( ext_mod) ; \n" + " \n" + " \n" + " } \n" COM: <s> overridden to set ref to external model in this class n </s>
funcom_train/197369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent ce) { /* * ASSUME this is an OK cast! (is there a language Number that isn't * Comparable?) */ Comparable masterValue = (Comparable) masterSpinner.getNumber(); slaveSpinner.setMinimum(masterValue); if (manip) { if (masterValue.compareTo(slaveSpinner.getNumber()) > 0) { slaveSpinner.setValue(masterSpinner.getNumber()); } } } COM: <s> responds to the master spinner number model being changed and sets </s>
funcom_train/12156664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPhotoBackground(int currentZoom, String t,int offx,int offy) { if (logger.isDebugEnabled()) { logger.debug("Executing zoomInPhoto(zoom=" + currentZoom + ", t=" + t + ")"); } return OperationHelper.getInstance().getBgPhotoImagesList(t,offx,offy); } COM: <s> get photo images from background operation images normally invisible </s>
funcom_train/39185186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAllGenes () { StringBuffer allgenes = new StringBuffer(); for (int count = 0; count < genes.size(); count++) allgenes.append(((Gene)genes.elementAt(count)).getName() + " "); return allgenes.toString(); } COM: <s> returns a string all gene names </s>
funcom_train/39973785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AABB getBoundingBox() { final Vec3D minBounds = Vec3D.MAX_VALUE.copy(); final Vec3D maxBounds = Vec3D.MIN_VALUE.copy(); for (Vertex v : vertices.values()) { minBounds.minSelf(v); maxBounds.maxSelf(v); } bounds = AABB.fromMinMax(minBounds, maxBounds); return bounds; } COM: <s> computes returns the axis aligned bounding box of the mesh </s>
funcom_train/7981107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReset() { // append something into the buffer assertEquals("nothing in buffer", "", buf.toString()); buf.append("foo"); assertEquals("buffer is 'foo'", "foo", buf.toString()); buf.reset(); assertEquals("nothing in buffer after reset", "", buf.toString()); } COM: <s> check the reset method clears the buffer </s>
funcom_train/4545193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectOutputStream getDataWriter() { ObjectOutputStream objStream; try { File f = getDataFile(); f.getParentFile().mkdirs(); FileOutputStream outStream = new FileOutputStream(f); objStream = new ObjectOutputStream(outStream); } catch(IOException e) { objStream = null; } return objStream; } COM: <s> get an object output stream that points to this buddys binary data file </s>
funcom_train/44551395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String fromByteToAscii(int j, int numberOfBytes) throws Exception { int id = j; StringBuffer buffer = new StringBuffer(4); for (int i = 0; i < numberOfBytes; i++) { int c = id & 0xff; buffer.append((char) c); id >>= 8; } return new String(buffer); } COM: <s> returns the ascii value of id </s>
funcom_train/49798393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOperator(int a) { return a == '+' || a == '-' || a == '*' || a == '/' || a == '^' || a == '>' || a == '<' || a == '=' || a == '!' || a == '&' || a == '|'; } COM: <s> is the given character a single character operator </s>
funcom_train/16604671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateRender() { if (inherit.isSelected()) { emitter.usePoints = Particle.INHERIT_POINTS; oriented.setEnabled( true ); } if (quads.isSelected()) { emitter.usePoints = Particle.USE_QUADS; oriented.setEnabled( true ); } if (points.isSelected()) { emitter.usePoints = Particle.USE_POINTS; oriented.setEnabled( false ); oriented.setSelected( false ); } // oriented if( oriented.isSelected()) emitter.useOriented= true; else emitter.useOriented= false; // additive blending if( additive.isSelected()) emitter.useAdditive= true; else emitter.useAdditive= false; } COM: <s> update the render setting </s>
funcom_train/37519430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void jumpToBasicBlock(BasicBlock block) { if (block.isMarked() || block.getPosition() >= max) { plantInstruction(new InstructionHandle(new JumpInstruction(org.multijava.util.classfile.Constants.opc_goto, block), current)); } plantBasicBlock(block); } COM: <s> adds a basic block and a jump instruction as needed </s>
funcom_train/32636009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean selectCanonicalResult(String taskID) { boolean success = false; Result search = TaskFactory.createResult(taskID); try { Result r = search.find()[0]; transitioner.selectCanonicalResult(r); success = true; } catch (ArrayIndexOutOfBoundsException e) { SysLogger.println("ERROR: RemoteTransitionerRPCHandler.selectCanonicalResult: Could not result " + taskID + "."); } catch (Exception e) { SysLogger.println("ERROR: RemoteTransitionerRPCHandler.selectCanonicalResult: " + e + "."); } return success; } COM: <s> designates a canonical result by removing all related results from </s>
funcom_train/34527190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputDocument loadOutputDocument() throws RequestException, DocumentException, EvaluationException, DataSourceException { String name = packRequest.getName(); String type = Pack.TYPE; String outputType = packRequest.getOutputType(); Map<String, Object> properties = packRequest.getProperties(); return loadOutputDocument(name, type, outputType, properties); } COM: <s> loads and returns the output document assigned to this context </s>
funcom_train/34967099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testListBanned() throws Exception { System.out.println("listBanned"); String nick = "nick"; String email = null; Long share = null; String ip = null; BanListDAO instance = DAOFactory.getBanListDAO(); instance.listBanned(nick, email, share, ip); } COM: <s> test of list banned method of class jhub </s>
funcom_train/2636289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/39179916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element wrap(Peer peer) { log.debug("Entering wrap"); Element elpeer = new Element("peer"); elpeer.setAttribute("uri",peer.getURI().toString()); if (peer.isClone() == true) elpeer.setAttribute("clone","true"); else elpeer.setAttribute("clone","false"); if(peer.getId()!=null) elpeer.setAttribute("id",peer.getId()); log.debug("Leaving wrap"); return elpeer; } COM: <s> returns the element class of the passed peer </s>
funcom_train/46694195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSource() { System.out.println("getSource"); BasicUserLink instance = new BasicUserLink(); Actor expResult = ActorFactory.newInstance().create("Mode", "ID"); instance.setSource(expResult); Actor result = instance.getSource(); assertEquals(expResult, result); } COM: <s> test of get source method of class basic user link </s>
funcom_train/24625065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int writeRBSP(RBSP rbsp, H264EntropyOutputStream output) { // delegate the payload write to the RBSP object int rbsp_size = rbsp.write(output); // check if it isn't too big :-) if (rbsp_size < RBSP.MAXRBSPSIZE) { // TODO throw an exception. PayloadOverloadedException? } // check if there isn't any start code prefix within the RBSP int length = 1 + preventEmulationOfStartCode(output, 0); return length; } COM: <s> converts an rbsp to a nalu </s>
funcom_train/2903170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopP2P(JXUser usr){ if(usr == null){ return; } JXRequest[] req = new JXRequest[1]; JunkTask jt = (JunkTask)JunkSupportedTask.getTaskDescription(JunkSupportedTask.STOP_P2P_LISTENER); Vector v = new Vector(1); v.add(new Integer(usr.getPort())); jt.setParam(v); req[0] = new JXRequest(JunkSupportedTask.JUNK_ID, jt); makeRequest(req); } COM: <s> stop users p2p connections </s>
funcom_train/31906238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKernel(Kernel k) { touch(); this.kernel = k; kernelHasNegValues = false; float [] kv = k.getKernelData(null); for (int i=0; i<kv.length; i++) if (kv[i] < 0) { kernelHasNegValues = true; break; } } COM: <s> sets the convolution kernel to use </s>
funcom_train/1712610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final private void processPatterns(Map rawValues) { LogWriter.writeMethod("{processPatterns}", 0); String name = "", object = ""; Iterator list = rawValues.keySet().iterator(); while (list.hasNext()) { name = (String) list.next(); object = (String) rawValues.get(name); /** * put data into array for later retrieval */ currentPatternValues.put(name, object); } } COM: <s> read the pattern objects </s>
funcom_train/14588607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double placekickDist(Play play, int protection, int intendedDist) { int threshold = 40; // high avg kick double kick = Math.atan(Math.random() * getOffense().sumPlacekickDist(play, protection)) + .1; if (kick == 0) kick = 1e-10; double dist = intendedDist - Math.pow(1.1, (intendedDist - threshold) / kick); return dist; } COM: <s> handles place kicking distances </s>
funcom_train/32129937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeConfiguration() { IDialogSettings s = getDialogSettings(); int historySize = Math .min(fPreviousSearchPatterns.size(), HISTORY_SIZE); s.put(STORE_HISTORY_SIZE, historySize); for (int i = 0; i < historySize; i++) { IDialogSettings histSettings = s.addNewSection(STORE_HISTORY + i); SearchPatternData data = ((SearchPatternData) fPreviousSearchPatterns .get(i)); data.store(histSettings); } } COM: <s> stores it current configuration in the dialog store </s>
funcom_train/30253854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LayoutDialog getLayout(final String title, final int width, final int height, final boolean isClosable){ final LayoutDialog dialog = new LayoutDialog(new LayoutDialogConfig(){ { setTitle(title); setClosable(isClosable); setCollapsible(false); setWidth(width); setHeight(height); setResizable(false); setShadow(true); } }, new LayoutRegionConfig()); return dialog; } COM: <s> helper method to setup default layout dialog </s>
funcom_train/16743035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PSCNSample getSample(String sampleName) { checkListOrdering(); // First, make sure the list is sorted mDummySample.setSampleName(sampleName); // set the dummy sample that will be used in the search int result = Collections.binarySearch(mPscnList, mDummySample); if (result >= 0) { return getSample(result); } else { return null; } } COM: <s> given a sample name this returns the sample </s>
funcom_train/35166048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInsideFrustum(Matrix4f modelViewMatrix, BoundingSphere boundingSphere, Point3f center3f) { center3f.set(boundingSphere.getCenter()); modelViewMatrix.transform(center3f); float radius = (float) boundingSphere.getRadius(); for (int planeIdx=0; planeIdx<planes.length; planeIdx++) { Plane plane = planes[planeIdx]; float distance = plane.getDistance(center3f); if (distance < -radius) { return false; } } return true; } COM: <s> with culling 160 163 </s>
funcom_train/4517260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCarRotation(double newDegrees) { carRotation = newDegrees; // repaint area accounts for larger rectangular are because rotate // car will exceed normal rectangular bounds repaint(0, carPosition.x - carW, carPosition.y - carH, 2 * carW, 2 * carH); } COM: <s> set the new rotation and schedule a repaint </s>
funcom_train/2290416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConfiguration(I_CmsXmlConfiguration configuration) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_ADD_CONFIG_1, configuration)); } m_configurations.add(configuration); cacheDtdSystemId(configuration); } COM: <s> adds a configuration object to the configuration manager </s>
funcom_train/13272220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFieldOfView(float fieldOfView) { if (fieldOfView != this.fieldOfView) { float oldFieldOfView = this.fieldOfView; this.fieldOfView = fieldOfView; this.propertyChangeSupport.firePropertyChange(Property.FIELD_OF_VIEW.name(), oldFieldOfView, fieldOfView); } } COM: <s> sets the field of view in radians of this camera </s>
funcom_train/26313089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshAll() { if (ce() == null) { return; } clientgui.bv.redrawEntity(ce()); clientgui.mechD.displayEntity(ce()); clientgui.mechD.showPanel("weapons"); //$NON-NLS-1$ clientgui.mechD.wPan.selectWeapon(ce().getFirstWeapon()); updateTarget(); } COM: <s> refeshes all displays </s>
funcom_train/21913274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActiveTabIndexPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UIMTabPanel_activeTabIndex_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UIMTabPanel_activeTabIndex_feature", "_UI_UIMTabPanel_type"), UIMPackage.Literals.UIM_TAB_PANEL__ACTIVE_TAB_INDEX, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the active tab index feature </s>
funcom_train/3902699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMeasureSatisfactionIfActivePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RollupConsiderationsType_measureSatisfactionIfActive_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RollupConsiderationsType_measureSatisfactionIfActive_feature", "_UI_RollupConsiderationsType_type"), AdlseqV1p3Package.Literals.ROLLUP_CONSIDERATIONS_TYPE__MEASURE_SATISFACTION_IF_ACTIVE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the measure satisfaction if active feature </s>
funcom_train/6209037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface Listener { /** * Is called when the remote partner has canceled this connection * or when the connection timed out. After this function was called * this connection is not valid any longer. Any further calls to its * methods may result in undefined behavior. * * @throws RemoteException (only possible on remote listeners, local listeners * do not have to do that.) */ public void disconnected() throws RemoteException; } COM: <s> describes the interface the user of an out connection has to provide </s>
funcom_train/7618596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump() { Log.e(TAG, "dump: size=" + mMap.size()); for (String k : mMap.keySet()) { Log.e(TAG, "dump: " + k + "=" + mMap.get(k)); } } COM: <s> writes the current parameters to the log </s>
funcom_train/37831533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeExpiredOffer(Offer offerToRemove) { this.getSlot(EXPIRED_OFFERS_SLOT_NAME).remove(offerToRemove.getID()); Item item = offerToRemove.getItem(); if (item != null) { new ItemLogger().destroy(null, this.getSlot(EXPIRED_OFFERS_SLOT_NAME), item, "timeout"); } this.getZone().storeToDatabase(); } COM: <s> removes an expired offer permanently from the market </s>
funcom_train/39366965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertyDescription clone() { PropertyDescription element = new PropertyDescription(_label, _description, _format, _count); element._offset = this._offset; // These get set elsewhere. // element._formatLength = this._formatLength; // Not necessary? // element._recordLength = this._recordLength; // Not necessary? return(element); } COM: <s> clones the property </s>
funcom_train/31947292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sessionStart(SessionManager manager) { invokeAndWait(new Runnable() { public void run() { progressMonitor = new ProgressMonitor(null, "Launching Session", "", 0, 4); progressMonitor.setNote("Loading curnit"); // we want this to popup immediately. // the default is 2 seconds. progressMonitor.setMillisToDecideToPopup(0); progressMonitor.setMillisToPopup(0); // This has to occur after the millis settings because // calling this method is when the millis are decided progressMonitor.setProgress(1); } }); } COM: <s> creates progress monitor and shows it </s>
funcom_train/18595199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCaptureNoPopup() { JLabel label = new JLabel("No Popup Here"); showFrame(label); startRecording(); tester.actionClick(label, label.getWidth()/2, label.getHeight()/2, AWTConstants.POPUP_MASK); assertStep("Click\\(.*,POPUP_MASK\\)"); } COM: <s> if no popup exists a regular click should be recorded instead using </s>
funcom_train/49350305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem newHighlightMenuItem() { highlightMenuItem = new JMenuItem(resource.getString("highlight")); highlightMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { BestHitList genes = getSelectedBestHits(); GraphicInteractionController.instance().showHighlightConfigurationDialog(genes); } }); return highlightMenuItem; } COM: <s> this method initializes highlight menu item </s>
funcom_train/43369033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) throws DuplicateNameException { if ((parent != null) && !this.name.equals(name)) { if (parent.getSubfolder(name) != null) { throw new DuplicateNameException("Parent folder already contains a subfolder with this name"); } } //name may not contain a / this.name = name.replace('/', '-'); } COM: <s> sets the name </s>
funcom_train/6206139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateRootWebFlowGroup(IProgressMonitor monitor) throws CoreException { IGaijinWebFlowGroup group = getGaijinProject().getRootWebFlowGroup(); if (group != null) { GenWebFlowGroupSourceJob job = new GenWebFlowGroupSourceJob(group); SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 100); job.run(subMonitor); } } COM: <s> recursively generate the contents of the root web flow group </s>
funcom_train/25073305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(String key) { try { return bundle.getString(key); } catch (MissingResourceException e) { logger.warn("Invalid key " + key + " in " + bundle.getLocale()); return '!' + key + '!'; } catch (NullPointerException e) { logger.warn("Invalid key " + key + " in " + bundle.getLocale()); return '!' + key + '!'; } } COM: <s> returns the string of the specified code key code in the </s>
funcom_train/8534016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sinkSpans() { if (isAttached()) { for (Iterator iterator = fIdList.iterator(); iterator.hasNext();) { String id = (String) iterator.next(); Element e = DOM.getElementById(id); DOM.sinkEvents(e, Event.ONCLICK); DOM.setEventListener(e, fListener); } } } COM: <s> activates all wrapper elements by adding to them the click listener </s>
funcom_train/31816554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton addButton(String key, ActionListener listener, KeyListener keyListener){ // check params if( key == null ) return null; // get the button JButton button = JComponentBuilder.createJButton(key, key, listener); button.addKeyListener(keyListener); // add the button to the panel this.buttonPanel.add(button); // return the button return button; } COM: <s> adds a button to the button panel </s>
funcom_train/37797181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String copyright() { if (copyright == null) { StringBuffer buf = new StringBuffer(); buf.append("SQLUnit Transform Tool").append(LF). append("Copyright(c) 2005, The SQLUnit Team"). append(LF); this.copyright = buf.toString(); } return this.copyright; } COM: <s> generates the copyright notice for the tool </s>
funcom_train/40448416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawNodes() { for (int i=0; i<nodeStates.length; i++) { NodeState nodeState= nodeStates[i]; // Node n= graph.getNode(nodeState.index); // System.err.print(" "+n.color); paintNode(offgraphics, nodeState, render); // System.err.print(" "+nodeState.winStatus); } // System.err.println(" <== colors"); // System.err.println(" <== winStati"); } COM: <s> paints every node in node states onto offgraphics </s>
funcom_train/48406472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsQueryPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Operation_isQuery_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Operation_isQuery_feature", "_UI_Operation_type"), SpemxtcompletePackage.eINSTANCE.getOperation_IsQuery(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is query feature </s>
funcom_train/31435805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectPortToX10Gateway(SerialPortBean bean, int deviceType) throws RemoteException, HomeException { switch(deviceType) { case CM11A_TRANSMITTER: /* Active Home Initialization Routines CM11A */ this.setupCM11A(bean); break; case CM17A_TRANSMITTER: /* FireCracker port initialization routines */ this.setupCM17A(bean); break; case TEST_TRANSMITTER: bPORT_ACTIVE = true; } } COM: <s> based on the users select it will set the port to </s>
funcom_train/18934629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(SchedulerData data, ServiceManager manager) { fillData(data.getXml()); DeploymentID peerID = new DeploymentID(pID); if (peerID != null) { PeerEntry peerEntry = manager.getDAO(PeerDAO.class).getPeerEntry(peerID.getContainerID()); peerEntry.getLocalWorkerProvider().pauseRequest(requestID); } } COM: <s> pause request peer id string request id long </s>
funcom_train/9764541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(AtomsArray av) { if (av == null) { return false; } if (size() != av.size()) { return false; } for (int i = 0; i < size(); i++) { AtomInterface a1 = getAtom(i); AtomInterface a2 = av.getAtom(i); if (!a1.equals(a2)) { return false; } } return true; } COM: <s> compares this atom array with another </s>
funcom_train/41605953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(List<ValidationMessage> messages) { assertModifiable(); if (messages == null) throw new NullPointerException("The messages list must not be null."); for (ValidationMessage message : messages) { if (message.severity() == Severity.OK) { throw new IllegalArgumentException("You must not add a validation message with severity OK."); } } messageList.addAll(messages); } COM: <s> adds all messages from the given list to this validation result </s>
funcom_train/10268575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean connected() { try { if (!checkConnection(_sessionHandle)) // if not connected _sessionHandle = connectAsService(); } catch (IOException ioe) { _log.error("Exception attempting to connect to engine", ioe); } return (successful(_sessionHandle)) ; } COM: <s> checks if there is a connection to the engine and </s>
funcom_train/15555673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getHorizontalSplitPane1_1() { if (horizontalSplitPane1_1 == null) { horizontalSplitPane1_1 = new JSplitPane(); horizontalSplitPane1_1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); horizontalSplitPane1_1.setDividerLocation(80); horizontalSplitPane1_1.setTopComponent(getActionStepsPanel()); horizontalSplitPane1_1.setBottomComponent(getAlgorithmsPanel()); horizontalSplitPane1_1.setDividerSize(5); } return horizontalSplitPane1_1; } COM: <s> this method initializes horizontal split pane1 1 </s>
funcom_train/31646055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHeader(String name) { // Variables Vector list; hdr current; int index; // Process All Headers list = new Vector(); for (index = 0; index < headers.size(); index++) { // Get Header current = (hdr) headers.get(index); // Check if Name matches if (current.getName().equals(name) == false) { list.addElement(current); } // if } // for: index // Set List as new Header List headers = list; }// removeHeader(String) COM: <s> remove all headers that match the specified header name </s>
funcom_train/11010442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSubject() { if (!propsPart.getSubjectProperty().hasValue()) return; Element elem = xmlDoc.getRootElement().element( new QName(KEYWORD_SUBJECT, namespaceDC)); if (elem == null) { // missing, we add it elem = xmlDoc.getRootElement().addElement( new QName(KEYWORD_SUBJECT, namespaceDC)); } else { elem.clearContent();// clear the old value } elem.addText(propsPart.getSubjectProperty().getValue()); } COM: <s> add subject property if needed </s>
funcom_train/51783066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canCreateNewModel() { if (appState.isModified()) { return JOptionPane.showConfirmDialog(getShellComponent(), ApplicationResources.getInstance().getString("confirm.new.message"), ApplicationResources.getInstance().getString("confirm.new.title"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION; } return true; } COM: <s> determines if a new model can be created </s>
funcom_train/42420654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePupil(String name, int domain) throws InvalidAttributeValueException{ Session session = null; try{ session = Factory.getHibernateSessionFactory().openSession(); Pupil pupil = new Pupil(name, domain); Transaction tx = session.beginTransaction(); Object o = session.get(Pupil.class, pupil); if (o == null){ throw new InvalidAttributeValueException("Pupil " + name + " doesn't exist!"); } session.delete(pupil); tx.commit(); cache.removeFromCache(pupil); }finally{ session.close(); Factory.close(); } } COM: <s> removes the specified pupil from database </s>
funcom_train/3862442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDownloadNumbersMatchEachOther() { int cDownloadCount = 0; for (int mHttpCode = 0; mHttpCode <= 999; mHttpCode++) { cDownloadCount += sSperowider.getHttpResponseCodeCount(mHttpCode); } //cDownloadCount += 3; // cause a failure Assert.assertEquals(cDownloadCount, sSperowider.getTotalHttpAttempts()); } COM: <s> checks to confirm that download numbers all check </s>
funcom_train/26324649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Stack loadStack(FCValue name) { Stack stack = null; try { stack = new Stack(_runtime, Class.forName(name.getAsString()).newInstance(), null); } catch (Exception e) { log.debug("Failed to load stack from class: " + name, e); } return null; } COM: <s> loads the specified stack </s>
funcom_train/35541769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalcStorageLengthFromPicture() { assertEquals(3, getStorageLengthFromPicture("X(3)", false)); assertEquals(5, getStorageLengthFromPicture("ABEG", false)); assertEquals(7, getStorageLengthFromPicture("ABEGN", false)); assertEquals(7, getStorageLengthFromPicture("ABEGNP", false)); } COM: <s> test that z os storage length is correctly inferred from picture clause </s>
funcom_train/40638490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon getIcon(ResourceKey key, Class cls) { String resourceName = getText(ResourceKey.makeKey(key + ".icon")); ImageIcon icon = null; if (resourceName != null) { URL url = cls.getResource(resourceName); icon = new ImageIcon(url, key.toString()); } return icon; } COM: <s> use cache later and lazy loading feature </s>
funcom_train/22598647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFileChooser getFileChooser() { if (cxfFileChooser == null) { cxfFileChooser = new JFileChooser(); cxfFileChooser.setDialogTitle("Saving cuttlefish network..."); cxfFileChooser.setFileFilter(new FileNameExtensionFilter(".cxf files", "cxf")); cxfFileChooser.setCurrentDirectory( new File(System.getProperty("user.dir"))); } return cxfFileChooser; } COM: <s> this method initializes the cxf file chooser for saving </s>
funcom_train/7626991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean parseAcronym() { if(!parseAcronyms) { return false; } TrieNode match = longestMatch(getResources().getAcronyms(), this, nextChar); if (match == null) { return false; } else { addToken(new Acronym(match.getText(), match.getValue())); nextChar += match.getText().length(); return true; } } COM: <s> looks for acronyms e </s>
funcom_train/18513885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer datOut = new StringBuffer(); datOut.append(this.getName()); for (int k = 0; k < this.data.length; k++) { datOut.append(this.getData(k)); } return datOut.toString(); } COM: <s> returns the string ascii representation of the data contained in this </s>
funcom_train/25314438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startGame() { /*int width = Integer.parseInt(mapWidth.getText()); int height = Integer.parseInt(mapHeight.getText()); */ // Add a chat message to inform all players if(ChatText.getActiveInstance()!=null){ ChatText.getActiveInstance().addText("Game started!"); } // Inform all computers that the game begins if(localPlayer().isHost()){ settings.startGame(); } } COM: <s> starts the game engine </s>
funcom_train/3470441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void displayTestEditor(Component comp) { removeTestEditor(); test = testLoader.getTest(comp); if (test != null) { editor = (TestEditor) getEditor(test); if (editor != null) { editor.setElement(test); editorComponent = editor.getComponent(); panTestEditor.add(editorComponent); panTest.setVisible(true); validate(); pack(); } } } COM: <s> shows a test editor </s>
funcom_train/785716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int row, String field, Object val) { int col = getColumnNumber(field); row = getColumnRow(row, col); getColumn(col).set(val, row); // we don't fire a notification here, as we catch the // notification from the column itself and then dispatch } COM: <s> set the value of a given row and data field </s>