__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/27849354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaults(){ System.out.println("org.wettp2p.creature.Alignment.testDefaults"); Alignment alig = new Alignment(); if(!(alig.isMoralNeutral() && alig.isOrderNeutral())) fail("Default alignment should be True Netural, is: " + alig.toString()); } COM: <s> test default values of class org </s>
funcom_train/328788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableFlipButtons() { int i = rsdb.getUnitIndex(currentUnit); if (i==0) { prevSight.setEnabled(false); } else { prevSight.setEnabled(true); } if (i==rsdb.getUnitsCount()-1) { nextSight.setEnabled(false); } else { nextSight.setEnabled(true); } } COM: <s> enable disable the sighting scroll buttons depending on where we </s>
funcom_train/37821841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEvents() { // System.out.println("getEvents"); StartParameters instance = new StartParameters(); Set<Event> expResult = null; Set<Event> result = instance.getEvents(); assertEquals(expResult, result); instance = startParameters; expResult = events; result = instance.getEvents(); assertEquals(expResult, result); } COM: <s> test of get events method of class start parameters </s>
funcom_train/4085838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVerticalEdgeWidget( Vec2i loc, Widget widget, int thickness ) { assert 0 <= loc.x && loc.x <= width : "The x coordinate must be a valid vertex coordinate."; assert 0 <= loc.y && loc.y < height : "The y coordinate must be a valid cell coordinate."; cells[loc.x][loc.y].addLeftEdgeWidget(widget, thickness); } COM: <s> adds a the widget to draw at a specific vertical edge </s>
funcom_train/2344811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel11() { if (jPanel11 == null) { jLabel = new JLabel(); jLabel.setText("Kontextbezogene Aktionen"); jPanel11 = new JPanel(); jPanel11.setLayout(new BoxLayout(jPanel11, BoxLayout.Y_AXIS)); jPanel11.add(getJCheckBox2(), null); jPanel11.add(getJCheckBox11(), null); jPanel11.add(jLabel, null); } return jPanel11; } COM: <s> this method initializes j panel11 </s>
funcom_train/37821400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDescription(String s) { if (s.isEmpty()) { commandHint.setText(""); //$NON-NLS-1$ } else commandHint .setText("<html><body style=\"background-color: #ffffff;\">" //$NON-NLS-1$ + s + "</body></html>"); //$NON-NLS-1$ commandHint.setCaretPosition(0); } COM: <s> show a am0 statement description </s>
funcom_train/22318881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(String prefix, Properties props) { Set entries = props.entrySet(); for (Iterator i = entries.iterator(); i.hasNext();) { Map.Entry e = (Map.Entry) i.next(); setProperty(prefix + (String) e.getKey(), (String) e.getValue()); } } COM: <s> insert another properties map with a prefix on all names </s>
funcom_train/50585353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String convert(final java.io.File file) { String str = readToStr(file, "Cp1252"); if (isHTML(file)) { str = convertHTML(str); } else if (isRTF(file)) { str = convertRTF( convertNCR(str)); } str = compositeToPrecomposed(str); if (isRTF(file)) { str = convertToRTF(str); } return str; } COM: <s> converts ncr to unicode </s>
funcom_train/3883017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAggregationlevelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GeneralType_aggregationlevel_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GeneralType_aggregationlevel_feature", "_UI_GeneralType_type"), ImsMdRootv1p1Package.Literals.GENERAL_TYPE__AGGREGATIONLEVEL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the aggregationlevel feature </s>
funcom_train/32947594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLowerBound( float lowerBound ) throws PropertyVetoException { if ( lowerBound < upperBound ) { this.lowerBound = lowerBound; } else { throw new PropertyVetoException( "lower bound must be smaller than value of upper bound", new PropertyChangeEvent( this, "lowerBound", new Float( this.lowerBound ), new Float( lowerBound ) ) ); } } COM: <s> sets the lower bound </s>
funcom_train/50299710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDesc(int key, String desc) { PresetsPanelData data=(PresetsPanelData)presets.get(key); if (key<presetCount) { if (desc!=null) { desc=desc.toUpperCase(); if (desc.indexOf(",")>=0) { // Make sure that we don't have commas in name! StringTokenizer t=new StringTokenizer(desc,","); desc=""; while (t.hasMoreTokens()) desc+=t.nextToken(); } if (desc.length()>20) desc=desc.substring(0,20); data.desc=desc; } } } COM: <s> changes the preset description </s>
funcom_train/49267341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateWithNewLocation(Location location) { //set the current location positionOverlay.setLocation(location); //set the current target location positionOverlay.setTargetLocation(this.sysC.getNextTargetLocation()); mapView.invalidate(); // Recenter the map. Double geoLat = location.getLatitude()*1E6; Double geoLng = location.getLongitude()*1E6; GeoPoint point = new GeoPoint(geoLat.intValue(), geoLng.intValue()); //move to location mc.animateTo(point); } COM: <s> p if the location has changed center the map around the current position </s>
funcom_train/8064707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFig(Fig f) { if (!this.figs.contains(f)) return; Rectangle oldBounds = getBounds(); this.figs.remove(f); f.setGroup(null); calcBounds(); firePropChange("bounds", oldBounds, getBounds()); } COM: <s> remove a fig from the group </s>
funcom_train/10516866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String selectionString(File basedir, File[] files, FileSelector selector) { StringBuffer buf = new StringBuffer(); for (int x = 0; x < files.length; x++) { if (selector.isSelected(basedir,filenames[x],files[x])) { buf.append('T'); } else { buf.append('F'); } } return buf.toString(); } COM: <s> worker method for the two convenience methods above </s>
funcom_train/30238790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CodeFile generateClassFile(Interface klass) throws GenerationException{ try { //String name = getNameTranslator().name(klass); CodeFile cf = new CodeFile(klass); cf.setFileContents(generateClass(klass)); return cf; } catch (ObjectInitializeFailed e) { logger.debug(e); throw new GenerationException(e); } } COM: <s> generate the source code for a single class </s>
funcom_train/22208835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTextValues() { try { // map prefix "xtm" to XTM 1.0 namespace PrefixResolver pr = new XTMPrefixResolver((Node) domDocument.getDocumentElement()); iterateTextValueTable(pr); } catch (Exception ex) { ex.printStackTrace(); fail("Unexpected exception: " + ex.toString()); } } COM: <s> tries a number of xpath queries returning strings and checks </s>
funcom_train/44222552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doImport() { // // Run the actual importing process. // this.importer.run(); this.importSuccess = importer.get_importSuccess(); // // Renew the server toolbar. // if (this.importTask.equals(BrainmapImporter.IMPORT_MAPS)) { this.atlasMapper.get_atlasServerToolbar().renew(); } this.destroy(); } COM: <s> import the brain map into the system </s>
funcom_train/50721150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close(){ try{ this.inFromCamera.close(); } catch( Exception exc ){ LOGGER.warning( "Error while closing camera input stream: " + exc.getMessage() ); } // end catch try{ this.outToCamera.close(); } catch( Exception exc ){ LOGGER.warning( "Error while closing camera output stream: " + exc.getMessage() ); } // end catch } COM: <s> closes the serial port associated with this camera </s>
funcom_train/8662421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInnerAccessFlags() { InnerClassesAttribute ica = (InnerClassesAttribute)getAttribute(InnerClassesAttribute.tag); if (ica == null) return -1; String name = getName(); int n = ica.tableLength(); for (int i = 0; i < n; ++i) if (name.equals(ica.innerClass(i))) return ica.accessFlags(i); return -1; } COM: <s> returns access and property flags of this nested class </s>
funcom_train/42240533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupListeners(IObservableCollection itemsThatNeedLabels) { this.items = itemsThatNeedLabels; if (items instanceof IObservableSet) { ((IObservableSet) items).addSetChangeListener(listener); } else if (items instanceof IObservableList) { ((IObservableList) items).addListChangeListener(listener); } for (Object object : items) { addListenerTo(object); } } COM: <s> this needs to be called after all calls to put are made </s>
funcom_train/3172622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(Gedcom gedcom) { Entity[] fams = gedcom.getEntities(Gedcom.FAM,""); for(int i=0; i<fams.length; i++) { analyzeFam((Fam)fams[i]); println(); println("====="); println(); } } COM: <s> main for argument gedcom </s>
funcom_train/29287988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createConditionName(Composite parent) { // Condition Name final Label label = new Label(parent, SWT.NONE); label.setText(Messages.getString("org.isistan.flabot.edit.ucmeditor.dialogs.EditDependencyDialog.conditionName")); //$NON-NLS-1$ textName = new Text(parent, SWT.BORDER); textName.setText(modifyCondition.getName()); textName.setLayoutData(new GridData( GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL)); } COM: <s> creates the label and text box for the condition name </s>
funcom_train/2586087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDescription() { SpreadsheetDate d1 = new SpreadsheetDate(15, 4, 2000); assertEquals(null, d1.getDescription()); d1.setDescription("XYZ"); assertEquals("XYZ", d1.getDescription()); d1.setDescription(null); assertEquals(null, d1.getDescription()); } COM: <s> some checks for the set description method </s>
funcom_train/3561692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataVector(Object[][] data, Object[] columnNames, Object[] indexes) { Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent( new TableFillEvent(Toolkit.getDefaultToolkit(), this, data, columnNames, indexes)); } COM: <s> sets the data vector </s>
funcom_train/16668815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BitSet getHashFingerprint(IAtomContainer ac, int searchDepth, int hashsize) { final ArrayList<IFeature> paths = this.findPathes(ac, searchDepth); final BitSet bs = new BitSet(hashsize); for (int i = 0; i < paths.size(); i++) { final int hash = paths.get(i).hashCode(); bs.set(new java.util.Random(hash).nextInt(hashsize - 1)); } return bs; } COM: <s> returns a hashed fingerprint </s>
funcom_train/43122692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRandomClass() { if (randomClassName == null) { // set a reasonable default if (randomClassName == null) { randomClassName = "java.security.SecureRandom"; } } try { Class randomClass = Class.forName(randomClassName); randomSource = (java.util.Random) randomClass.newInstance(); } catch (Exception e) { } if (randomSource == null) randomSource = new java.security.SecureRandom(); } COM: <s> create the random generator using the configured class name and </s>
funcom_train/2559115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setOverride(Type type, Object value, OutputNode node) throws Exception { NodeMap<OutputNode> map = node.getAttributes(); if(map == null) { throw new PersistenceException("No attributes for %s", node); } return strategy.write(type, value, map, session); } COM: <s> this is used to attach elements or attributes to the given </s>
funcom_train/45622863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStdOutImportancePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ExecType_stdOutImportance_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ExecType_stdOutImportance_feature", "_UI_ExecType_type"), MSBPackage.eINSTANCE.getExecType_StdOutImportance(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the std out importance feature </s>
funcom_train/19912813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getUnselectedText() { JTextComponent comp = getTextComponent(); String selected = comp.getSelectedText(); if (selected != null) return comp.getText().substring(0, comp.getText().length() - comp.getSelectedText().length()); return comp.getText(); } COM: <s> this method will only return the beginning of the textfield until the </s>
funcom_train/2761836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Converter getDynamicConverter(Class fromType, Class toType) { Iterator dynConvIter = _dynamicConverters.iterator(); while (dynConvIter.hasNext()) { DynamicConverterSet dynConvSet = (DynamicConverterSet) dynConvIter .next(); Converter conv = dynConvSet.getConverter(fromType, toType); if (conv != null) { conv.init(this, fromType, toType); addConverter(conv); return conv; } } return null; } COM: <s> returns a dynamic converter created from the dynamic converter set </s>
funcom_train/28501438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTTS_rate(float tts_rate) { ProgressLogger.getInstance().debug("Enter setTTS_pitch(float)"); TTS_rate = tts_rate; try { synthProp.setSpeakingRate(TTS_rate); } catch (Exception e) { ProgressLogger.getInstance().error( "failed to set TTS speaking rate", e); e.printStackTrace(); } ProgressLogger.getInstance().debug("Exit setTTS_pitch(float)"); } COM: <s> used to change current rate </s>
funcom_train/8685628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClassLoader replaceContextLoader() { ClassLoader origContextClassLoader = Thread.currentThread().getContextClassLoader(); if (getScriptClassLoader() == null) { setScriptClassLoader(getClass().getClassLoader()); } Thread.currentThread().setContextClassLoader(getScriptClassLoader()); return origContextClassLoader; } COM: <s> replace the current context classloader with the </s>
funcom_train/10591406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFieldTag(String tag) { // by default do not make field if (fieldTags == null) { return false; } Iterator i = fieldTags.iterator(); while (i.hasNext()) { if (tag.equals(i.next())) { return true; } } return false; } COM: <s> check if tag is a candidate for making into a field </s>
funcom_train/13209504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintPieceHighlighted(Piece[] pieceList, CuatroState state, Graphics g) { int highlight = state.getHighlight(); if (highlight != CuatroBasic.NULL) { drawPart(HIGHLIGHT_X, HIGHLIGHT_Y, pieceList[highlight], g); } } COM: <s> paint the piece that is highlighted </s>
funcom_train/45515687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUnderline(boolean active, boolean overwrite) { MutableAttributeSet attrUnderline = new SimpleAttributeSet(); StyleConstants.setUnderline(attrUnderline, active); int length = TEXT_AREA.getSelectionEnd() - TEXT_AREA.getSelectionStart(); ((StyledDocument) TEXT_AREA.getDocument()).setCharacterAttributes( TEXT_AREA.getSelectionStart(), length, attrUnderline, overwrite); } COM: <s> sets the current selection underline </s>
funcom_train/14401064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decorate(Object pElement, IDecoration pDecoration) { if (pElement instanceof ITreeElement && !(pElement instanceof IWbemQuery)) { ITreeElement treeElement = (ITreeElement) pElement; if (treeElement.isBusy()) { pDecoration.addOverlay(CustomImages.IMAGE_IN_PROCESS .getDescriptor()); } if (!treeElement.isAvailable()) { pDecoration.addOverlay(CustomImages.IMAGE_WARNING .getDescriptor(), IDecoration.BOTTOM_LEFT); } } } COM: <s> this method adds an overlay to the passed code idecoration code </s>
funcom_train/7618478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(Font f) { Font oldFont; toolkit.lockAWT(); try { oldFont = font; setFontImpl(f); } finally { toolkit.unlockAWT(); } firePropertyChange("font", oldFont, font); //$NON-NLS-1$ } COM: <s> sets the font for this component </s>
funcom_train/22114292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToProblem(ProblemMetricInfo pmi) { this.aids.addAll(pmi.getProblemEntities()); this.probFlag |= pmi.getProblemType(); this.alertCount += pmi.getAlertCount(); this.overCount += pmi.getOverCount(); this.underCount += pmi.getUnderCount(); } COM: <s> accumulate the problems from another entity </s>
funcom_train/45605924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("PostalCodePort".equals(portName)) { setPostalCodePortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/45740721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand2 () { if (backCommand2 == null) {//GEN-END:|49-getter|0|49-preInit // write pre-init user code here backCommand2 = new Command ("Back", Command.BACK, 0);//GEN-LINE:|49-getter|1|49-postInit // write post-init user code here }//GEN-BEGIN:|49-getter|2| return backCommand2; } COM: <s> returns an initiliazed instance of back command2 component </s>
funcom_train/32206920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void aimAtTarget() { int targetX = (int) target.getX() + 50; int targetY = (int) target.getY() + 20; tank.aimTower(targetX, targetY); double turretRotation = tank.getTowerRotation(); tank.setRotation((float) Math.toDegrees(turretRotation)); destX = target.getX() - 100; destY = target.getY() - 100; } COM: <s> rotates the tank and its turret so it points towards this drivers </s>
funcom_train/7901637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Target executeAction(String actionName, Map parameterMap) throws ForceTargetException, NoSuchActionException, AuthorizationException { Map originalParameters = PandoraContext.getInstance().getParameterMap(); try { PandoraContext.getInstance().setParameterMap(parameterMap); return executeAction(actionName); } finally { PandoraContext.getInstance().setParameterMap(originalParameters); } } COM: <s> executes an action of the same controller with the specified set of parameters </s>
funcom_train/26018630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeOldestThan(long timeStamp){ // Find spot from which to remove int spot = numberOfAssemblers-1; for (int i=0;i<numberOfAssemblers;i++){ if (timeStamp <=assemblers[i].getTimeStamp()){ spot = i; } } // remove all assemblers with oldest timeStamp to the left for (int i=numberOfAssemblers;i>spot;i--){ assemblers[i-1] = assemblers[i]; } numberOfAssemblers -=spot+1; } COM: <s> remove oldest frame assembler than given time stamp </s>
funcom_train/46702605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Appendable printIndexCondition(final MetaIndex index, final Appendable out) throws IOException { String prefix = " WHERE "; for (MetaColumn column : MetaIndex.COLUMNS.of(index)) { if (!column.hasDefaultValue()) { out.append(prefix); out.append(MetaColumn.NAME.of(column)); out.append(" IS NOT NULL"); prefix = " AND "; } } return out; } COM: <s> create an partial index for exclude null values </s>
funcom_train/28340225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IDataAdaptor createChild(String strLabel) { // Take care of the underlying DOM objects Element domElem = this.m_domDocRoot.createElement(strLabel); this.getDomElem().appendChild(domElem); // Now build the top level objects XmlDataAdaptor daNode = new XmlDataAdaptor(domElem); this.m_lstChildren.add(daNode); return daNode; } COM: <s> create a new empty code xml data adaptor code object and add it </s>
funcom_train/25197267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runTest(int t1, int t2) throws Exception { p.push(new TInteger(t2, null)); p.push(new TInteger(t1, null)); new Minus("-").execute(p, null, null); assertEquals(t2 - t1, p.popInteger(null).getInt()); assertNull(p.popUnchecked()); } COM: <s> run a test case </s>
funcom_train/47253096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCheckVariarMetSeleccion() { if (checkVariarMetSeleccion == null) { checkVariarMetSeleccion = new JCheckBox(); checkVariarMetSeleccion.setBounds(new Rectangle(42, 405, 207, 24)); checkVariarMetSeleccion.setText("Variar método de selecci�n"); } return checkVariarMetSeleccion; } COM: <s> this method initializes check variar met seleccion </s>
funcom_train/22581476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFactory() throws Exception { byte[] data = new byte[RecordFile.BLOCK_SIZE]; BlockIo test = new BlockIo(0, data); test.writeShort(0, (short) (Magic.BLOCK + Magic.USED_PAGE)); DataPage page = DataPage.getDataPageView(test); page.setFirst((short) 1000); assertEquals("first", 1000, page.getFirst()); } COM: <s> test factory method </s>
funcom_train/24537812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test1() { CodeExpressionRef exp = createExpression(bp1, false, false, false, getPriority(-1,false)); try { method.updateExpressionOrder(); } catch (CodeGenException e) { e.printStackTrace(); } assertEquals("Failed to add low priority expression to bp1",exp,getExp(4)) ; } COM: <s> add element with low priority to bp1 </s>
funcom_train/40299352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void wasDisconnected() { linkState = L2CAP_LINK_CLOSED; hciDriver.unregisterL2CAPLink(this); for (int i = 0; i < channels.length; i++) { if (channels[i] != null) { channels[i].channelState = L2CAPChannel.CLOSED; channels[i] = null; } } } COM: <s> called by hcitransport when an disconnect complete event was received </s>
funcom_train/12188261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnnamedBinding() throws Exception { try { doTest(new IntegrationTestHelper().getPipelineFactory(), name + ".unnamed_binding.xml", name + ".unnamed_binding.xml"); fail("Should have had a processing exception for the " + "unnamed binding"); } catch (XMLPipelineException e) { // Correct behaviour System.out.println("Unnamed binding exception: " + e); } } COM: <s> test that bindings that have no name cause a fatal error </s>
funcom_train/11620194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _populateIceAgentImpl(String agent, AgentImpl agentObj) { int slashIndex = agent.indexOf('/'); agentObj.setType(TYPE_DESKTOP); agentObj.setAgent(AGENT_ICE_BROWSER); agentObj.setAgentVersion(_getVersion(agent, slashIndex)); agentObj.setPlatform(_getJavaOS(agent, slashIndex)); } COM: <s> returns the agent entry for the ice brwoser </s>
funcom_train/3096101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double successPercentage(){ if(this.successCount==0 && this.failureCount==0){ try{ this.validate(); }catch(Exception e){} } if(this.successCount ==0)return 0d; return (this.successCount)/(this.successCount+this.failureCount); } COM: <s> return the relative count of succes divided by overall validations in double precision </s>
funcom_train/37250349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (attributes != null) { Attr attrNode = (Attr)attributes.getNamedItem("xml:base"); if (attrNode != null) { return attrNode.getNodeValue(); } } return this.ownerNode.getBaseURI(); } COM: <s> dom level 3 wd experimental </s>
funcom_train/38479932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FormattedField makeStringField(int pLength, boolean pMandatory) { FormattedField tField = new FormattedField(String.class, pLength); if (pMandatory) { markMandatory(tField); } // tField.setMargin(new Insets(2,2,2,2)); // tut leider nicht :-( return tField; } COM: <s> creates a string field </s>
funcom_train/10616549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCtor() { String name = "testCtor123^%$#&^ &^$"; Permission test = new RealPermission(name); assertEquals(name, test.getName()); assertEquals("(" + test.getClass().getName() + " " + name + ")", test .toString()); } COM: <s> test that a permission object is created with the specified name and is </s>
funcom_train/47019644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand1() { if (backCommand1 == null) {//GEN-END:|27-getter|0|27-preInit // write pre-init user code here backCommand1 = new Command(getLocalizedString("Back"), Command.EXIT, 1);//GEN-LINE:|27-getter|1|27-postInit // write post-init user code here }//GEN-BEGIN:|27-getter|2| return backCommand1; } COM: <s> returns an initiliazed instance of back command1 component </s>
funcom_train/28343093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processSubsequences() throws GenerationException { Iterator<AcceleratorNode> iterHware = this.m_lstSeq.iterator(); while (iterHware.hasNext()) { AcceleratorSeq smfSeq = (AcceleratorSeq)iterHware.next(); ProxyTree pxySeq = new ProxyTree(smfSeq); this.addChild(pxySeq); } } COM: <s> creates code proxy tree code nodes for hardware objects representing </s>
funcom_train/3325738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toHRString() { if (cubeVoid) return ""; StringBuffer res = new StringBuffer(); for (int i = 0; i < varVals.length; i++) { switch (varVals[i]) { case C_OFF : res.append(f.getVHDLVarName(i)+"'"); break; case C_ON : res.append(f.getVHDLVarName(i)); break; } } return res.toString(); } COM: <s> return a human readable string representation of this cube </s>
funcom_train/7842734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFirstTerm() throws Exception { CQLParser parser = new CQLParser(); CQLNode rootNode=parser.parse("dog"); assertEquals("dog", Utilities.getFirstTerm(rootNode).getTerm()); rootNode=parser.parse("dog or cat and mouse"); assertEquals("dog", Utilities.getFirstTerm(rootNode).getTerm()); } COM: <s> test of get first term method of class org </s>
funcom_train/1710872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLineWidth(int lineWidth) { if(lineWidth!=lastLW || 1==1){ pageObjects.addElement(null); //pageAT.add(null); objectType.addElement(LINEWIDTH); if(lw==null) lw=new Vector_Int(defaultSize); lw.addElement(lineWidth); x_coord=checkSize(x_coord,currentItem); y_coord=checkSize(y_coord,currentItem); x_coord[currentItem]=0; y_coord[currentItem]=0; currentItem++; lastLW=lineWidth; } } COM: <s> store line width info </s>
funcom_train/47832984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNotAvailableLowLevelEvent() { EventDefinition evNotAvailable = new EventDefinition(); evNotAvailable .setClassname("org.soa.monitor.runtime.core.EventDefinition"); evNotAvailable.setName("NotAvailable"); RuntimeMonitorEngine.getInstance().getInventory().addEventDefinition( evNotAvailable); } COM: <s> add the not available event to the reasoning component gateway </s>
funcom_train/28749980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSampleid(Long newVal) { if ((newVal != null && this.sampleid != null && (newVal.compareTo(this.sampleid) == 0)) || (newVal == null && this.sampleid == null && sampleid_is_initialized)) { return; } this.sampleid = newVal; sampleid_is_modified = true; sampleid_is_initialized = true; } COM: <s> setter method for sampleid </s>
funcom_train/22277824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent event) { DragSession dragSession; Point absPoint; if (Math.abs(event.x - origX) > 3 || Math.abs(event.y - origY) > 3) { new DragSession(this, image(), event.x - 6, event.y - 6, event.x, event.y, dataType(), data); } } COM: <s> overridden to support creating a color drag session </s>
funcom_train/48621242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getDownloadCountByPersonName(List<Long> personNameIds) { Query q = hbCrudDAO.getSessionFactory().getCurrentSession().getNamedQuery("getDownloadCountByPersonNames"); q.setParameterList("personNameIds", personNameIds); Long count = (Long)q.uniqueResult(); if( count == null ) { count = Long.valueOf(0l); } return count; } COM: <s> get the download counts for a set of person names </s>
funcom_train/16707152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double reducenorm(double[] abcl2kExpnorm, double[] abcl1) { double abcl2knorm = 1; for (int i = 0; i < I; i++) { abcl2kExpnorm[i] -= cube(abcl1[i]); if (abcl2kExpnorm[i] < 0) { abcl2kExpnorm[i] = 0; } abcl2knorm *= abcl2kExpnorm[i]; } return cuberoot(abcl2knorm); } COM: <s> this function is supposed to do two things remove the current element </s>
funcom_train/2877990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String redeployAction() throws RemoteException, SmartFrogRuntimeException { String newname= makeName(currentRetries); int count=currentRetries+1; sfReplaceAttribute(ATTR_COUNT,new Integer(count)); sfCreateNewChild(newname, (ComponentDescription) action.copy(), null); return newname; } COM: <s> clone and redeploy the action </s>
funcom_train/10628300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValueOfNegScalePos() { long a = -98374823947823578L; int scale = 12; BigDecimal aNumber = BigDecimal.valueOf(a, scale); String result = "-98374.823947823578"; assertTrue("incorrect value", aNumber.toString().equals(result)); } COM: <s> create a big decimal from a negative long value scale is positive </s>
funcom_train/20044390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _setFormula1() { requiredMethod("getFormula1()"); oObj.setFormula1("$Sheet1.$C$" + Thread.activeCount()); tRes.tested("setFormula1()", !Formula1.equals( oObj.getFormula1() ) ); } COM: <s> test sets new value of formula1 gets formula1 again and compares </s>
funcom_train/3298182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MsnMessage addLine(String line) { // Message Prototype: // BPR 12182 myname@msn.com PHH StringTokenizer st = new StringTokenizer(line); st.nextToken(); //skip CMD_BUDDY_PHONE_NUMBER st.nextToken(); // skip Magic Code account = st.nextToken(); type = st.nextToken(); // Possibly not set if (st.hasMoreTokens()) { phoneNumber = SpecialCharacters.getInstance() .decode(st.nextToken(), true); } return this; } COM: <s> adds a feature to the line attribute of the buddy phone message object </s>
funcom_train/17676707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SelectExp createSE(JdbcStorageManager sm, SelectExp root) { SelectExp rhSe = root; if (parent != null) { rhSe = parent.createSEImp(sm, rhSe, root, valueJoinToParent, true); } return appendJoins(sm, rhSe, true, false, root, false); } COM: <s> create a select exp for this instance using the supplied root exp </s>
funcom_train/21482658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean extractReplicateUpdates(Properties properties) { boolean replicateUpdates; String replicateUpdatesString = PropertyUtil.extractAndLogProperty(REPLICATE_UPDATES, properties); if (replicateUpdatesString != null) { replicateUpdates = PropertyUtil.parseBoolean(replicateUpdatesString); } else { replicateUpdates = true; } return replicateUpdates; } COM: <s> extracts the value of replicate updates from the properties </s>
funcom_train/28169307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endOverlay() { view.getComponent().requestFocus(); if (editWidget != null) { editWidget.setVisible(false); view.getComponent().remove(editWidget); Rectangle bounds = editWidget.getBounds(); view.getComponent().repaint(bounds.x, bounds.y, bounds.width, bounds.height); } } COM: <s> removes the overlay </s>
funcom_train/48497733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReleaseDTO selectReleaseByIteration (int iteration) { // First get the data from the release table SelectReleaseQuery select = new SelectReleaseQuery (super.getDataSource(), selectReleaseOfIteration, 5); List result = select.execute(new Object[] {new Integer(iteration)}); if (result != null && result.size() > 0) { // A project can only be added to 1 release ReleaseDTO release = (ReleaseDTO)result.get(0); return release; } else return null; } COM: <s> knowing the id of an iteration to which release those this iteration belong </s>
funcom_train/4516225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChildCount(boolean filterIsActive) { if (!filterIsActive) { return super.getChildCount(); } if (children == null) { return 0; } int count = 0; Enumeration<?> enumTemp = children.elements(); while (enumTemp.hasMoreElements()) { MyTreeNode node = (MyTreeNode) enumTemp.nextElement(); if (node.isVisible()) { count++; } } return count; } COM: <s> get child count </s>
funcom_train/21170800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumSlotUsed() { int i, count = 0; for (i = 0; i < this.numVCCount; i++) { count += data[i].size(); } if (IConstants.CURRENT_VC_COUNT * IConstants.NUM_FLIT_PER_BUFFER < count) System.out.println("\n\nBuf Over Use\n\n"); return count; } COM: <s> returns total no </s>
funcom_train/18079131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String load(String path){ StringBuffer textContentFile = new StringBuffer(300); try{ ClassLoader cl = this.getClass().getClassLoader(); templateStream = cl.getResourceAsStream(path); reader = new BufferedReader(new InputStreamReader(templateStream)); String line = ""; while((line = reader.readLine()) != null ){ textContentFile.append(line + "\n"); } reader.close(); }catch(Exception e){ e.printStackTrace(); return null; } return textContentFile.toString(); } COM: <s> read text file and return content this file as string </s>
funcom_train/29311645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFromIni(String filename, ProMSplash splash) { try { Properties ini = new Properties(); FileInputStream is = new FileInputStream(filename); Enumeration i; ini.load(is); is.close(); i = ini.propertyNames(); while (i.hasMoreElements()) { String key = (String) i.nextElement(); loadPlugin(ini.getProperty(key), key, splash); } } catch (FileNotFoundException ex) { } catch (IOException ex) { } } COM: <s> load plugins from ini file </s>
funcom_train/51210213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkEventValid(Event<? extends EventType> event, boolean soFar) { if (!memoryStreamMode) return true; EventType eventType = event.getType(); if (SettingsEvent.DFS_DataFile == eventType || SettingsEvent.DFS_DoNotCacheData == eventType || SettingsEvent.DFS_ShowOnlyTailData == eventType || SettingsEvent.DFS_Load == eventType) { synchronized(this) { if (memoryStreamMode) return false; } } return true; } COM: <s> validates or not settings event </s>
funcom_train/5395746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testViewXML() { System.out.println("viewXML"); String filename = ""; PrintStream ps = null; FastInfosetCompressProcess instance = new FastInfosetCompressProcess(); instance.viewXML(filename, ps); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of view xml method of class org </s>
funcom_train/35316491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof EllipticCurve) { EllipticCurve curve = (EllipticCurve) obj; if ((field.equals(curve.field)) && (a.equals(curve.a)) && (b.equals(curve.b))) { return true; } } return false; } COM: <s> compares this elliptic curve for equality with the </s>
funcom_train/21463913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDayActive(int newDay) { clearDayActive(); // Set the new one if (newDay <= 0) dd = new GregorianCalendar().get(Calendar.DAY_OF_MONTH); else dd = newDay; // Now shade the correct square Component square = labs[(leadGap + newDay - 1) / 7][(leadGap + newDay - 1) % 7]; square.setBackground(Color.red); square.repaint(); activeDay = newDay; } COM: <s> set just the day on the current month </s>
funcom_train/4745491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subscribe(String topic, String endpointAddress){ SOAPSubscription s = new SOAPSubscription(); s.setTopic(topic); try { s.setId(GenericSubscriptionProcessor.generateId()); EndpointReference epr = new EndpointReference(endpointAddress); s.setToEndpoint(epr); } catch (Exception ex){ Logger.getAnonymousLogger().severe("Error creating a subsription: " + ex.getMessage()); } DefaultSubscriberStore store = new DefaultSubscriberStore(); store.store(s); this.resetSubscriptionList(); } COM: <s> creates a new soapsubscription and stores it in database </s>
funcom_train/33282032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AttributesImpl readAttributes(final HtmlElement element) { final AttributesImpl attributes = new AttributesImpl(); for (final DomAttr entry : element.getAttributesMap().values()) { final String name = entry.getName(); final String value = entry.getValue(); attributes.addAttribute(null, name, name, null, value); } return attributes; } COM: <s> gets the attributes of the element in the form of a </s>
funcom_train/44898513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File resolveConfig(String filename) throws Exception { File file = new File(filename); if (file.getParent() == null) { file = new File("etc", filename); } if (!file.exists()) { throw new FileNotFoundException(file.toString()); } return file; } COM: <s> resolves the given filename supplying the prefix </s>
funcom_train/32056434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillCustomItems(Vector items){ VertexView v; Map map; for (int i = 0; i < colors.length; i++) { v = new VertexView( null, dummyGraph, dummyGraph.getGraphLayoutCache()); map = GraphConstants.createMap(); GraphConstants.setBounds(map, new Rectangle(point, size)); GraphConstants.setBackground(map, colors[i]); GraphConstants.setOpaque(map, true); v.setAttributes(map); items.add(v); } } COM: <s> fills table with the colors for selection </s>
funcom_train/3467337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fileFinished() throws java.io.IOException { // @BEGINPROTECT _3CD50A7A0117 this.setPrinter(null); this.setIndividualCodeHash(null); java.io.PrintWriter out = this.getOutput(); if (out != null) { out.close(); out = null; } // @ENDPROTECT } COM: <s> cleanup for example closing files and streams </s>
funcom_train/43191752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getAgentMainPane() { if (AgentMainPane == null) { AgentMainPane = new JTabbedPane(); AgentMainPane.addTab("Create", null, getAgentCreatePanel(), null); AgentMainPane.addTab("Green Pages Agents", null, getGreenPagesAgents(), null); AgentMainPane .addTab("Live Agents", null, getLifeAgentPanel(), null); } return AgentMainPane; } COM: <s> this method initializes agent main pane </s>
funcom_train/18028845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidPoints() { System.out.println("validPoints"); QDataSet ds = null; QDataSet expResult = null; QDataSet result = DataSetUtil.validPoints(ds); 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 valid points method of class data set util </s>
funcom_train/11401034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Catalog getCatalog() { Catalog catalog = staticCatalog; if (useStaticCatalog == null) { useStaticCatalog = getUseStaticCatalog() ? Boolean.TRUE : Boolean.FALSE; } if (catalog == null || !useStaticCatalog.booleanValue()) { catalog = getPrivateCatalog(); if (useStaticCatalog.booleanValue()) { staticCatalog = catalog; } } return catalog; } COM: <s> get a catalog instance </s>
funcom_train/14241726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertSuccessor(MMessage m, MMessage s, int p) { Vector v = new Vector(m.getMessages3()); if (v.size() > p) v.insertElementAt(s, p); else v.add(s); m.setMessages3(v); } COM: <s> inserts message s as the pth successor of message m </s>
funcom_train/27943780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int execUpdate( java.lang.String strSQL ) { if( bDriverOK ) { try { java.sql.Statement stmt = conn.createStatement(); int nRowsAffcted = stmt.executeUpdate( strSQL ); return nRowsAffcted; } catch( java.sql.SQLException e ) { System.err.println( "JDatabase.execUpdate() - SQLException: " + e ); } } return -1; } COM: <s> executes a sql query that no returns a recordset </s>
funcom_train/45483909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean login(String nickname) throws ChatMemberIsAlreadyRegisteredException { if (this.chatMemberModelInterface != null) { throw new ChatMemberIsAlreadyRegisteredException(); } try { ChatMemberModelInterface chatMemberModelInterface = new ChatMemberModel(nickname); boolean result = this.chatServerModelInterface.registerChatClient(chatMemberModelInterface); if (result) this.chatMemberModelInterface = chatMemberModelInterface; return result; } catch (RemoteException e) { return false; } } COM: <s> this method registers the user </s>
funcom_train/22655167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getContext() { LogEventModel logEventModel = this; String context = logEventModel.getLogEventModelName(); while(true){ if(logEventModel.getPreviousLogEventModel()!= null){ logEventModel = logEventModel.getPreviousLogEventModel(); context = logEventModel.getLogEventModelName() + InsightConstants.TEXT_SEPARATOR + context; }else{ break; } } return context + InsightConstants.TEXT_INDENT; } COM: <s> method for constructing the context text while displaying the status </s>
funcom_train/47833799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countSubNodes(int noOfNodes) { if (this != null) { noOfNodes = noOfNodes + 1; } // visit next node if (this.getChildren().size() > 0) { for (ASTNode child : this.getChildren()) { if (child != null) { noOfNodes = child.countSubNodes(noOfNodes); } } } return noOfNodes; } COM: <s> returns the number of node sub nodes </s>
funcom_train/50368944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkInclusion(URI uri){ if(inclPattern==null)return; String[]chk=inclPattern.split(" +"); String test=uri.toString().toLowerCase(); for(String pattern: chk){ if(test.contains(pattern.toLowerCase())){ return; } } //not allowed throw new IllegalArgumentException("Registration not allowed, URL does not contain one of '"+inclPattern+"'"); } COM: <s> checks if the given uri is allowed to register </s>
funcom_train/4758297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharSequence getText(Document doc) { Segment text = new Segment(); try { doc.getText(start, length, text); } catch (BadLocationException ex) { Logger.getLogger(Token.class.getName()).log(Level.SEVERE, null, ex); } finally { return text; } } COM: <s> get the text of the token from this document </s>
funcom_train/3124561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMaxLabelNum() { AbstNodeModel node; for (int i = 0; i < m_arraySingleNodeModels.size(); i++) { node = (AbstNodeModel) m_arraySingleNodeModels.elementAt(i); int labelValue = Integer.parseInt(node.getLabel()); maxLabelNum = Math.max(maxLabelNum, labelValue); } } COM: <s> goes through the m array single node models to find the highest value </s>
funcom_train/15462338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SecretKeySpec createKey() throws NoSuchAlgorithmException { KeyGenerator kgen = KeyGenerator.getInstance(algorithm); kgen.init(128); // 192 and 256 bits may not be available // Generate the secret key specs. SecretKey skey = kgen.generateKey(); byte[] raw = skey.getEncoded(); SecretKeySpec skeySpec = new SecretKeySpec(raw, algorithm); return skeySpec; } COM: <s> generate the secret key used to crypt an object </s>
funcom_train/512257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean shouldPkValueBeGenerated(Property toCheck, Introspector<T> intro) { boolean back = true; if (intro.getPkFields().contains(toCheck)) { final PrimaryKeyInfo info = intro.getPrimaryKeyInfo(toCheck); if (info != null) { // is a pk field // Only pk wher he @GeneratedValue tag is present will not be // generatet if (info.getGenValue() != null) { back = false; } } } return back; } COM: <s> check if the property is a autogenerated pk class the table strategy </s>