__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/42086522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateNodesWithUniformDistribution() { BigInteger no = new BigInteger(new Integer(noNodes).toString()); interval = maxID.divide(no); nodes[0] = new BigInteger("0"); for (int i = 1; i < noNodes; i++) nodes[i] = nodes[i-1].add(interval); } COM: <s> generates nodes with a uniform distribution </s>
funcom_train/46376681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTexture(Texture texture) { TextureState ts = (TextureState) quad.getRenderState(RenderState.RS_TEXTURE); if (ts == null) { ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState(); quad.setRenderState(ts); } ts.setTexture(texture); } COM: <s> specify a new texture for this object </s>
funcom_train/44146800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyFile(String input_file, String output_file) throws IOException { // a reader for the header file BufferedReader lr = new BufferedReader(new FileReader(input_file)); BufferedWriter lw = new BufferedWriter(new FileWriter(output_file)); String line; // iterate over all lines in a file and write them to the other while ((line = lr.readLine()) != null) { lw.write(line, 0, line.length()); lw.newLine(); System.out.println(line + "\n"); } lr.close(); lw.flush(); lw.close(); } COM: <s> copy a file from one file to another </s>
funcom_train/50819228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBean(String key, Object bean) { if (key == null || key.length() <= 0 || ! Character.isJavaIdentifierStart(key.charAt(0))) { ConfigError.configError( "Invalid bean name '" + key + "'", LOG); } else { // allow for null beans - this means we shouldn't use it. this.beans.put(key, bean); } } COM: <s> add a single object into the script context </s>
funcom_train/44778796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { Identifier id = (Identifier) o; if (myString == null) { try { int otherInt = id.getNumber(); return (myInt < otherInt ? -1 : (myInt == otherInt ? 0 : 1)); } catch (NumberFormatException nfe) { // do nothing } } return toString().compareTo(id.toString()); } COM: <s> compares this object with the specified object for order </s>
funcom_train/20746307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tearDown() throws Exception { ExternalSystemFactory.getInstance().setFactoryClass( IProjectSystem.class, (String)null); // we do not have to tear down anything here. // If we where creating some data structures in the database, we would // clear them here super.tearDown(); } COM: <s> tears down the fixture </s>
funcom_train/37065704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint( Graphics gx ) { Graphics2D g = (Graphics2D) gx.create(); Component c = getContext().getComponent(); int width = c.getWidth(); int height = c.getHeight(); g.setColor(Color.BLACK); //g.fillRect(0,0, width,height); environment.render((Graphics2D) g); environment.tick(); //colliderPass(); environment.processEntityListChanges(); } COM: <s> paint the next frame erase the old line and paint the new line </s>
funcom_train/11737572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDowngrade() throws InterruptedException { for (ChangeLog changeLog : logs) { WriteLock wLock = locking.acquireWriteLock(changeLog); verifyBlocked(startReaderThread(locking, state.getId())); ReadLock rLock = wLock.downgrade(); verifyNotBlocked(startReaderThread(locking, state.getId())); rLock.release(); } } COM: <s> checks if a downgraded write lock allows other threads to read again </s>
funcom_train/35104895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compile(String lines) { Compiler compiler = new Compiler(lines, this.currentDir); Program program = null; try { compiler.compile(); program = compiler.link(); } catch (CompilerException e) { this.eventManager.sendEvent(EventManager.EVENT.COMPILER_ERROR, e.getMessage()); this.eventManager.sendEvent(EventManager.EVENT.EMULATOR_CLEAR); return; } this.program = program; // Add old breakpoints to this program /* for (Integer lineNumber: this.breakpoints.values()) this.program.toggleBreakpoint(lineNumber.intValue()); */ this.reset(); } COM: <s> compile the sourcecode </s>
funcom_train/47311870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PolygonGroup getGroup(String name) { // check for this group if (this.name != null && this.name.equals(name)) { return this; } for (int i = 0; i < objects.size(); i++) { Object obj = objects.elementAt(i); if (obj instanceof PolygonGroup) { PolygonGroup subgroup = ((PolygonGroup) obj).getGroup(name); if (subgroup != null) { return subgroup; } } } // group not found return null; } COM: <s> gets the polygon group in this group with the specified </s>
funcom_train/12174246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHorizontalSpace(Element element, String attribute) { int leftMargin = getPixelLength(styles.getStyleValue( StylePropertyDetails.MARGIN_LEFT)); int rightMargin = getPixelLength(styles.getStyleValue( StylePropertyDetails.MARGIN_RIGHT)); int hspace = (leftMargin + rightMargin) / 2; if (hspace != 0) { element.setAttribute(attribute, String.valueOf(hspace)); } } COM: <s> create the hspace attribute from the left and right margin values </s>
funcom_train/11728521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void populate(String[] values) throws RepositoryException { for (int i = 0; i < values.length; i++) { Node node = testRootNode.addNode(nodeNames[i], testNodeType); node.setProperty(propertyName1, values[i]); } superuser.save(); } COM: <s> populates the workspace with child nodes under code testroot code with </s>
funcom_train/12119596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC811(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.attiInModificaJButton_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c811 atti modifica jbutton </s>
funcom_train/49789227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InternetApplication loadAndInfer(IProvidesInferenceEngine provider, final String modelFile) throws ModelLoadException, FileNotFoundException, InferenceException, IOException { InternetApplication root = (InternetApplication) loader.loadModelDirectly(modelFile); return infer(provider, root, false, new IModelReloader() { @Override public EObject reload() throws InferenceException { try { return loader.loadModelDirectly(modelFile); } catch (ModelLoadException e) { throw new InferenceException(e); } } }); } COM: <s> load a model file and perform inference on it </s>
funcom_train/35327123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodType primArgsAsBoxes() { MethodType ct = primArgsAsBoxes; if (ct != null) return ct; MethodType t = erasedType; ct = canonicalize(erasedType, RAW_RETURN, WRAP); if (ct == null) ct = t; // no prims to box return primArgsAsBoxes = ct; } COM: <s> turn all primitive argument types to corresponding wrapper types </s>
funcom_train/44340906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object variable, Object bindInfVar, Object value, Object bindInfVal) { if (((Boolean) bindInfVar).booleanValue()) varsOfObj1.put(variable, value); else varsOfObj2.put(variable, value); } COM: <s> associate the value val to the variable var in this binding context </s>
funcom_train/18448947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onHelpClick() { if (Help.show(this, helpContext)) return; if (whatsThis == null) { List<MWhatsThis.Info> all = MWhatsThis.getAll(this); if (all.isEmpty()) return; // nothing to show whatsThis = new MWhatsThis(this); setGlassPane(whatsThis); whatsThis.setVisible(true); } else { MFrame.clearGlassPane(this); whatsThis = null; } } COM: <s> invoked when the i help i button is clicked </s>
funcom_train/19591465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTarget(Node target) { if (target.getChildren() != null) { for(int i = 0; i < target.getChildren().size(); i++) { processTarget(this, target.getChild(i)); } } copyNode(target, this); UserDataManager.getInstance().bind(this, target); } COM: <s> code set target code sets the shared data </s>
funcom_train/16489150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void synchronize() { SwingUtilities.invokeLater(new Runnable() { public void run() { if (UIManager.getLookAndFeel() instanceof SubstanceLookAndFeel) { SubstanceSkin currentSkin = SubstanceLookAndFeel .getCurrentSkin(getRootPane()); setFrameIcon(new ImageIcon(SubstanceImageCreator .getBigHexaMarker(6, currentSkin .getMainActiveColorScheme()))); setTitle(currentSkin.getDisplayName()); } } }); } COM: <s> synchronizes the frame icon with the current theme </s>
funcom_train/4237281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() { System.out.println("equals"); OrdenPlatilloPK object = new OrdenPlatilloPK(5, 6); OrdenPlatilloPK instance = new OrdenPlatilloPK(5, 6); boolean expResult = true; boolean result = instance.equals(object); assertEquals(expResult, result); } COM: <s> test of equals method of class data </s>
funcom_train/31955760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(short[] s, int start, int len) throws IOException { int i = start; try { for (; i < start + len; i += 1) { if (count - pos < 2) { fillBuf(2); } s[i] = (short) (buf[pos] << 8 | (buf[pos + 1] & 0xFF)); pos += 2; } } catch (EOFException e) { return eofCheck(e, i, start, 2); } return 2 * len; } COM: <s> read a short array </s>
funcom_train/43245104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNOKTwoRelationship() { System.out.println("setNOKTwoRelationship"); String nOKTwoRelationship = ""; EmergencyContactDG2Object instance = new EmergencyContactDG2Object(); instance.setNOKTwoRelationship(nOKTwoRelationship); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set noktwo relationship method of class org </s>
funcom_train/10599326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map match(String pattern, Map objectModel, Parameters parameters) throws PatternException { if (pattern == null) { throw new PatternException("A pattern is needed at " + SitemapParameters.getLocation(parameters)); } final String match = getMatchString(objectModel, parameters); if (match == null) { return null; } return WildcardMatcherHelper.match(pattern, match); } COM: <s> match the prepared pattern against the result of </s>
funcom_train/7237655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringOfHalfWords() { String s = new String(); for (int i = 0; i < bits.length; i++) { if (i!=0) s += ", "; long tmp = bits[i]; tmp &= 0xFFFFFFFFL; s += (tmp + "UL"); s += ", "; tmp = bits[i]>>>32; tmp &= 0xFFFFFFFFL; s += (tmp + "UL"); } return s; } COM: <s> dump a comma separated list of the words making up the bit set </s>
funcom_train/22548886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getNeedsPush() throws BadPacketException { parseResults(); switch (_data.getPushFlag()) { case UNDEFINED: throw new BadPacketException(); case TRUE: return true; case FALSE: return false; default: Assert.that(false, "Bad value for push flag: " + _data.getPushFlag()); return false; } } COM: <s> returns true if thiss push flag is set i </s>
funcom_train/36602548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayOriginTriad(float unitLengthScalar) { redLines.addLine(Vector3f.ZERO, Vector3f.UNIT_X.mult(unitLengthScalar)); greenLines.addLine(Vector3f.ZERO, Vector3f.UNIT_Y.mult(unitLengthScalar)); blueLines.addLine(Vector3f.ZERO, Vector3f.UNIT_Z.mult(unitLengthScalar)); displayOriginTriad = true; } COM: <s> display the origin by three lines red green and blue </s>
funcom_train/25587351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOptionsSaveCommand() { if (optionsSaveCommand == null) {//GEN-END:|49-getter|0|49-preInit // write pre-init user code here optionsSaveCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|49-getter|1|49-postInit // write post-init user code here }//GEN-BEGIN:|49-getter|2| return optionsSaveCommand; } COM: <s> returns an initiliazed instance of options save command component </s>
funcom_train/36948467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IRubyModelStatus getRubyModelStatus() { IStatus status = this.getStatus(); if (status instanceof IRubyModelStatus) { return (IRubyModelStatus)status; } // A regular IStatus is created only in the case of a CoreException. // See bug 13492 Should handle RubyModelExceptions that contains CoreException more gracefully return new RubyModelStatus(this.nestedCoreException); } COM: <s> returns the ruby model status object for this exception </s>
funcom_train/17502633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasPrintedPackageIndex(String pkgname) { String[] list = printedPackageHeaders.toArray(new String[] {}); for (int i = 0; i < list.length; i++) { if (pkgname.startsWith(list[i])) { return true; } } return false; } COM: <s> return true if the given package name has been printed </s>
funcom_train/12117378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onReset() { console.clear(); String header = "**** JIVES v " + Jives.getVersion() + " - JiveScript v " + JiveScriptEngine.getJIVESCRIPT_VERSION() + " Console ****"; console.output(centerOutput(header)); long maxMemory = Runtime.getRuntime().maxMemory() >> 20; long freeMemory = Runtime.getRuntime().freeMemory() >> 20; String memstats = maxMemory + " MB memory " + freeMemory + " MB free"; console.output(centerOutput(memstats)); console.output(""); } COM: <s> reset the console and the jive script engine </s>
funcom_train/28878192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeActionListener(ActionListener _l) { boolean found = false; for (Enumeration enum1 = ac_.elements(); enum1.hasMoreElements();) { Vector _prop = (Vector) ac_.get(enum1.nextElement()); if ((_prop != null) && (!_prop.contains(_l))) { found = true; _prop.remove(_l); } } return found; } COM: <s> unregisters the specified listeners for all the actions </s>
funcom_train/36473758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImage( String url ) { try { Image img = StyleSheet.getImage(url, this, false); if (img != null) { setImage( img ); } } catch (IOException e) { //#debug error de.enough.polish.util.Debug.debug("error", "de.enough.polish.ui.IconItem", 447, "unable to load image [" + url + "]", e); } } COM: <s> loads the specified image </s>
funcom_train/34967096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsIPBanned() { /*System.out.println("isIPBanned"); String ip = ""; BanListDAO instance = null; boolean expResult = true; boolean result = instance.isIPBanned(ip); 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 is ipbanned method of class jhub </s>
funcom_train/13676491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getErrorMessage(String key) { if (key == null) { return "KEY NULL!!!!!!!!"; } try { return m_ErrorMessages.getString(key); } catch (MissingResourceException mrex) { return ("#UNDEFINED=" + key + "#"); } }//getErrorMessage COM: <s> returns the error message for the given key in the </s>
funcom_train/36014337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatementDecl(MethodInfo methodInfo) { StringBuilder sb = new StringBuilder(128); sb.append(this.getTestObject()); sb.append("."); if (this.testMethod.isEmpty()) this.setTestMethod(methodInfo.getName() + "PostCheck"); sb.append(this.getTestMethod()); sb.append('('); if (!this.needGenerateParas()){ sb.append(this.getParameters()); sb.append(");"); } return sb.toString(); } COM: <s> get the java code from the information it contains </s>
funcom_train/11101954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKeySet() throws Exception { Set keySet = weakHashtable.keySet(); assertEquals(3, keySet.size()); assertTrue(keySet.contains(keyOne)); assertTrue(keySet.contains(keyTwo)); assertTrue(keySet.contains(keyThree)); } COM: <s> tests public set key set </s>
funcom_train/19912973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCompletionValue(String value, String description) { if (value == null || value.length() == 0) { throw new IllegalArgumentException( "Value must not be null nor empty."); } if (!values.contains(value)) { this.values.add(value); this.descriptions.add(description); } else throw new IllegalStateException("The value: \"" + value + "\" is already inserted."); } COM: <s> this method adds a value for completement </s>
funcom_train/7351080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComponentSerializer getSerializer(Class type) { String typeStr = type.getName(); ComponentSerializer ser = (ComponentSerializer) _serializers.get(typeStr); if (ser == null) { // no serializer found // check for array if (type.isArray()) { ser = new ArraySerializer(type); addSerializer(typeStr, ser); } else { ser = getAndRegisterType(type, typeStr); } } return ser; } COM: <s> get a serializer for a type </s>
funcom_train/34282628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRtf() { StringBuffer sb = new StringBuffer(); sb.append("{"); // Header sb.append("\\rtf1\\ansi\\ansicpg1252"); sb.append("\\deff0"); // First font in font table is the default sb.append("\\deflang1033"); sb.append("\\viewkind4"); // "Normal" view sb.append("\\uc\\pard\\f0"); sb.append("\\fs20"); // Font size in half-points (default 24) sb.append(getFontTableRtf()).append('\n'); sb.append(getColorTableRtf()).append('\n'); // Content sb.append(document); sb.append("}"); //System.err.println("*** " + sb.length()); return sb.toString(); } COM: <s> returns the rtf document created by this generator </s>
funcom_train/3392257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void navLinkIndex() { navCellStart(); printHyperLink(relativePath + (configuration.splitindex? DirectoryManager.getPath("index-files") + fileseparator: "") + (configuration.splitindex? "index-1.html" : "index-all.html"), "", configuration.getText("doclet.Index"), true, "NavBarFont1"); navCellEnd(); } COM: <s> print link for generated class index </s>
funcom_train/1574230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToReadyState() { OutputManager.run(new SafeRunnable() { public void run() { Simulation sim = controller.getSimulation(); getContributionsItems(); getStartOrPauseSimAction().setEnabled(true); getStepSimAction().setEnabled(true); // getGisAction().setEnabled(sim.getEnvironmentManager().getGisEnv() != // null); if ( sim.getRemoteControl().hasParameters() ) { showParameterView(); } } }); } COM: <s> sets the to ready state </s>
funcom_train/42124082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enforceObservationConstraints(double observationDoubles[]) { for (int i = 0; i < NUMOBS; ++ i) { if (observationDoubles[i] > maxs[i]) observationDoubles[i] = maxs[i]; if (observationDoubles[i] < mins[i]) observationDoubles[i] = mins[i]; } } COM: <s> enforces observation constraints if anything falls outside the </s>
funcom_train/48114207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean podcastSetAsCurrentDownloading(long rowId) { ContentValues args = new ContentValues(); args.put(KEY_ID, ACTIVE_DOWNLOAD); return mDb.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0; } COM: <s> change a favorite as the active downloading podcast </s>
funcom_train/21846126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateStartPos(Fragment frag, int pos, int delta) { for (int i = frags.length - 1; i >= 0; i--) { Fragment f = frags[i]; if (f.valid) { if (f.startPos >= pos) { if (f != frag) { f.startPos += delta; } } else { break; // reached lowest position } } } } COM: <s> update starting positions of all fragments that have higher start positions </s>
funcom_train/13775233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntExpArray subarrayByMask(boolean[] mask) { int size = Math.min(_data.length, mask.length); List<IntExp> sub_data = new ArrayList<IntExp>(); for (int i = 0; i < size; i++) { if (mask[i]) { sub_data.add(_data[i]); } } return new IntExpArray(constrainer(), sub_data); } COM: <s> the function returns subarray of the array according to the mask array </s>
funcom_train/27784231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Company company) throws PersistenceException { _logMsg.setMethodName("save"); if (company == null) { if(_log.isErrorEnabled()) { _logMsg.setMessage("null Company"); _log.error(_logMsg); } throw new PersistenceException("Null company"); } SqlDataMap companyMap = createSqlDataMap(company); _dao.save(TABLE_NAME, companyMap); } COM: <s> saves a company to the database </s>
funcom_train/18319618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertyValue(Object id, Object value) { try { Class type = getPropertyType((String) id); String setter = ClassHelper.createSetterName((String) id); ClassHelper.invoke(element, setter, new Class[]{type}, new Object[]{value}); } catch (SystemException e) { System.err.println(e.getStackTrace()); } } COM: <s> sets the property with the given id if possible to value </s>
funcom_train/1301146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNominalValueIndex(NominalFeatureAttribute nominalFeatureAttribute, String value) { int result = -1; final Set<String> values = nominalValuesMap.get(nominalFeatureAttribute); int index = 0; for (String v : values) { if (value.equals(v)) { result = index; break; } ++index; } return result; } COM: <s> get the index of the value within its nominals </s>
funcom_train/41424792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextToken(char delim) throws ParseException { int startIdx = ptr; while (true) { char la = lookAhead(0); if (la == delim) break; else if (la == '\0') throw new ParseException("EOL reached", 0); consume(1); } return String.valueOf(buffer, startIdx, ptr - startIdx); } COM: <s> get the next token from the buffer </s>
funcom_train/38513707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addActionToGroup(BaseAction pAction) { if (pAction == null) return; String key = pAction.getGroup(); if (!groupMap.containsKey(key)) { List newList = new ArrayList(); groupMap.put(key, newList); } List list = (List)groupMap.get(key); list.add(pAction); groupMap.put(key, list); } COM: <s> inserts action into a group list </s>
funcom_train/49675195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser( String username, String password, boolean purgeCache ) throws SQLException { // TODO: we could implement some sort of time-based caching in which the user- and group objects are cached for a // certain time before re-fetching them from the database User u = database.getUser( username ); if( !u.password.equals( password ) ) return null; return u; } COM: <s> return a user object containing all usable information for the specified user </s>
funcom_train/20324919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deletePressed(boolean addToHistory) { if (lastSelected == null) { JOptionPane.showMessageDialog(null, "Cannot delete as no node is selected."); } else { JOptionPane.showMessageDialog(null, "Deleting word '" + lastSelected.getWord() + "' from the visualisation."); removeNodeFromSystem(lastSelected.getWord(), lastSelected.isNodeOpen(), true, true, addToHistory); lastSelected = null; } } COM: <s> is called if the delete button is pressed </s>
funcom_train/16614695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDuration(String name) { long result = 0; if (!startTimes.containsKey(name)) { return result; } else if (!stopTimes.containsKey(name)) { throw new RuntimeException("Timer named " + name + " was not stopped!"); } else { result = ((Long) stopTimes.get(name)).longValue() - ((Long) startTimes.get(name)).longValue(); } return result; } COM: <s> retrieve the duration of a previously stopped timer </s>
funcom_train/2928185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFilterAcceptAll () { TypeFilter filter = new TypeFilter (Element.class); assertEquals("Concrete type is expected to be accepted", true, filter.filter(elem)); assertEquals("Supertype is expected to be accepted", true, filter.filter(untypedElement)); assertEquals("Custom type is expected to be accepted", true, filter.filter(otherTypedElement)); } COM: <s> this tests initializes the filter with type element </s>
funcom_train/22284764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Properties props, String name, String description) { // lookup key if appropriate /* if (keyResource != null && marimba.util.StringResources.isKey(name)) { String tmp = keyResource.getString(marimba.util.StringResources.stripKey(name)); if (tmp != null) name = tmp; } */ // create menu AppMenu menu = AppMenu.create(props, keyResource, fm, hash, name, description); add(menu); } COM: <s> add a menu to the menubar </s>
funcom_train/37077533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { Rectangle clipBounds = g.getClipBounds(); Point lowPixel = new Point(clipBounds.x, 0); Point highPixel = new Point(clipBounds.x + clipBounds.width, 0); int low = getPositionForPixel(lowPixel); int high = getPositionForPixel(highPixel); paint(g, new RangeHolder(low, high)); } COM: <s> paints this tier within the clipping bounds of the graphic </s>
funcom_train/11296805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isFloatingPointNumber(Object val) { if (val instanceof Float || val instanceof Double) { return true; } if (val instanceof String) { String string = (String) val; return string.indexOf('.') != -1 || string.indexOf('e') != -1 || string.indexOf('E') != -1; } return false; } COM: <s> test if the passed value is a floating point number i </s>
funcom_train/48877488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized void save(Customer customer, Connection connection) throws SQLException { if(customer.isDirty()) { if(customer.isAlreadyInDB()) { update(customer, connection); } else{ insert(customer, connection); } customer.setDirty(false); } Cache.getInstance().touch(customer.getID()); } //save COM: <s> package method that is called by the public save method above or by </s>
funcom_train/19150002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDateString() { dateString.delete(0, dateString.length()); dateString.append(CalendarHelper.getMonth(calendar)).append("/"); dateString.append(calendar.get(Calendar.DATE)).append("/"); dateString.append(calendar.get(Calendar.YEAR)); return dateString.toString(); } COM: <s> returns the date in a string in the format m d yyyy </s>
funcom_train/16684549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { StringWriter str = new StringWriter(); StreamResult res = new StreamResult(str); try { writeXmlTo(res); } catch (Exception ex) { System.err.println("Error building signal " + ex.toString()); return null; } return str.toString(); } COM: <s> returns xml representation of signal </s>
funcom_train/6266603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logMessage(String message) { // String tname = Thread.currentThread().getName(); checkLogFile(); String logInfo = message; if (printWriter == null) { System.out.println(logInfo); } else { printWriter.println(logInfo); } if (sipStack.isLoggingEnabled()) { logWriter.logDebug(" ]]>"); logWriter.logDebug("</debug>"); logWriter.logDebug(logInfo); logWriter.logDebug("<debug>"); logWriter.logDebug("<![CDATA[ "); } } COM: <s> log a message into the log file </s>
funcom_train/12662861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List listHostnameKeys() { Pattern pattern = Pattern.compile("^node\\.(.*)\\.hostname$"); List list = new ArrayList(); for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) { String key = (String) iter.next(); Matcher matcher = pattern.matcher(key); if (matcher.find()) { String hostname = matcher.group(1); list.add(hostname); } } return list; } COM: <s> lists the property keys that match the code node </s>
funcom_train/3687371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrefix(String prefix, String uri) throws NamespaceException { try { workspace.getNamespaceRegistry().getPrefix(uri); // throws exception if not found namespaces.put(prefix, uri); } catch (Exception e) { throw new NamespaceException(e.getMessage()); } } COM: <s> within the scope of this ticket rename a persistently registered </s>
funcom_train/42325975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hideCursorInFrame(){ int[] pixels = new int[16 * 16]; Image image = Toolkit.getDefaultToolkit().createImage( new MemoryImageSource(16, 16, pixels, 0, 16)); Cursor transapprentCursor = Toolkit.getDefaultToolkit().createCustomCursor (image, new Point(0, 0), "invisibleCursor"); app.frame.setCursor(transapprentCursor); } COM: <s> hides the mousecursor in multiple mice mode </s>
funcom_train/37837900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapping(String oldImg, int oldIndex, String newImg, int newIndex) { newTilesets.add(newImg); HashMap<Integer, TileInfo> mapping = mappings.get(oldImg); if (mapping == null) { mapping = new HashMap<Integer, TileInfo>(); mappings.put(oldImg, mapping); } mapping.put(oldIndex, new TileInfo(newImg, newIndex)); } COM: <s> add a new translation mapping </s>
funcom_train/7867917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JSONObject generateCreator() { JSONObject obj = new JSONObject(); obj.put("name", "HARCreator.java"); obj.put("version", "0.2"); // obj.put("comment", ""); return obj; } COM: <s> generates the creator object </s>
funcom_train/50499336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirstPassword() { char[] tempPassword = passField.getPassword(); String retPassword = new String( tempPassword ); // From JDK documentaion: For stronger security, it is recommended that the returned character array be cleared after use by setting each character to zero. for ( int index = 0; index < tempPassword.length; index++ ) { tempPassword[ index ] = 'X'; } return retPassword; } COM: <s> return the value in the first password field </s>
funcom_train/10815654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debugOff() { Logger.getLogger("org.apache.pig").setLevel(pigContext.getDefaultLogLevel()); pigContext.getLog4jProperties().setProperty("log4j.logger.org.apache.pig", pigContext.getDefaultLogLevel().toString()); } COM: <s> set the logging level to the default </s>
funcom_train/18284496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBoolean(int parameterIndex, boolean x) throws DAOException { try { parms.put("" + parameterIndex, x ? "TRUE" : "FALSE"); this.preparedStatement.setBoolean(parameterIndex, x); } catch (SQLException e) { _log.error("Exception in setBoolean() method", e); this.setTransactionRollbackOnly(); } } COM: <s> sets the designated parameter to boolean value </s>
funcom_train/35281162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int hash = 37; hash += 37 * hash + Float.floatToIntBits(x); hash += 37 * hash + Float.floatToIntBits(y); hash += 37 * hash + Float.floatToIntBits(z); hash += 37 * hash + Float.floatToIntBits(w); return hash; } COM: <s> code hash code code returns a unique code for this vector object based </s>
funcom_train/4859610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SiebelDataBean connectSiebel(String envName, String username, String password) throws Exception { if(envName == null) throw new Exception("Please specify an environment to connect to."); if(!environments.containsKey(envName)) throw new Exception("Environment '" + envName + "' is not defined."); Environment env = environments.get(envName); return env.connectSiebel(username, password); } COM: <s> connect to siebel in the specified environment </s>
funcom_train/34594757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringCellValue() throws DIFDataException { if (getCellType().equals(CellType.BLANK)) return ""; else if (getCellType().equals(CellType.DATE)) { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); return fmt.format(getDateCellValue()); } return String.valueOf(value); } COM: <s> returns the value of this cell expressed as a numeric </s>
funcom_train/25305608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillParameters(SvaModel model) { if (model != null && model.getParametersMap() != null) { ArrayList<SvaParameter> coll = new ArrayList<SvaParameter>(model.getParametersMap().values()); model.setParameters(coll); model.getParametersMap().clear(); } } COM: <s> sets the parameters array list parameters from the store hash map parameters map </s>
funcom_train/41165884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoMultipleChoiceE1 entity) { EntityManagerHelper.log("deleting CoMultipleChoiceE1 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoMultipleChoiceE1.class, entity.getMultipleChoiceE1Id()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co multiple choice e1 entity </s>
funcom_train/802713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAccessionNumberPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MzDataType_accessionNumber_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MzDataType_accessionNumber_feature", "_UI_MzDataType_type"), MzdataPackage.Literals.MZ_DATA_TYPE__ACCESSION_NUMBER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the accession number feature </s>
funcom_train/5735673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean abort() throws LoginException { if (debug) System.out.println("\t\t[LdapLoginModule] " + "aborted authentication"); if (succeeded == false) { return false; } else if (succeeded == true && commitSucceeded == false) { // Clean out state succeeded = false; cleanState(); x500Principal = null; userPrincipal = null; authzPrincipal = null; } else { // overall authentication succeeded and commit succeeded, // but someone else's commit failed logout(); } return true; } COM: <s> abort user authentication </s>
funcom_train/39483082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBooleanNoArgIFEQ() { TestUtils.reset(); boolean b = Verify.getBoolean(); assert (TestUtils.getCounter() == 0); if (b) assert (TestUtils.getCounter() == 1); else assert (TestUtils.getCounter() == 0); TestUtils.incCounter(); } COM: <s> false first is required </s>
funcom_train/34963063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateMaxRecordLength(String record) throws IllegalRecordLengthException { if (doValidateMaxLength) { if (record != null && record.length() > getImportConfig().getMaxRecordLength()) { throw new IllegalRecordLengthException( "Max. record length violation, expected max. record length " + getImportConfig().getMaxRecordLength() + ", got " + record.length(), record); } } } COM: <s> validates the max </s>
funcom_train/12308204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Document doc) { Enumeration fields = doc.fields(); while (fields.hasMoreElements()) { Field field = (Field) fields.nextElement(); add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWithTermVector(), field.isStoreOffsetWithTermVector(), field.getOmitNorms()); } } COM: <s> adds field info for a document </s>
funcom_train/33967963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetNextPreviousItems() { FMDStoryList storyList = mAdapter.getStoryList(); if (storyList != null) { int pageNumber = storyList.getPageNumber(); int totalPages = storyList.getTotalPages(); setPreviousPageValue(pageNumber > 0); setNextPageValue(pageNumber < (totalPages - 1)); TextView view = (TextView) findViewById(R.id.fmd_storylist_current_page); String text = new String((pageNumber + 1) + " / " + totalPages); view.setText(text); } } COM: <s> reset the next previous page views </s>
funcom_train/48877754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RevenueSource create() throws DataException { String id = null; try { id = GUID.generate(); } catch(GUIDException guide) { throw new DataException("Could not generate a GUID", guide); } RevenueSource conversion = new Conversion(); conversion.setID(id); Cache cache = Cache.getInstance(); cache.put(id, conversion); return conversion; } COM: <s> creates a new conversion object and returns it </s>
funcom_train/32056617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGraphModelEventConstructor() { DefaultGraphModel model = new DefaultGraphModel(); Object str[] = { "junit" }; GraphModelEvent.GraphModelChange gmc = model.new GraphModelLayerEdit( str, 0); // class inside another class...can't find a way to instanciate //GraphModelChange gmc = new GraphModelChange(); GraphModelEvent gme = new GraphModelEvent("name", gmc); assertTrue(gme.getChange() instanceof GraphModelEvent.GraphModelChange); } COM: <s> test of the graph model event constructor of class graph model event </s>
funcom_train/18215962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Select createBugActivityQuery() { final Select query = new Select(); final Criterion partCriterion = doCreateSelectionCriterion(); query.addPart(partCriterion); query.addTarget(partCriterion, BugHistory.BUG_ID); query.addTarget(partCriterion, BugHistory.DATE); query.addTarget(partCriterion, BugHistory.FIELD_NAME); query.addTarget(partCriterion, BugHistory.NEW_VALUE); query.addTarget(partCriterion, BugHistory.OLD_VALUE); query.setOrder(BugHistory.DATE, true); //query.setSecondaryOrder(BugHistory.FIELD_NAME, true); return query; } COM: <s> creates the query for selecting the rows from the bugs activity table </s>
funcom_train/43245336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetECTwoStreetAddr1() { System.out.println("getECTwoStreetAddr1"); EmergencyContactDG4Object instance = new EmergencyContactDG4Object(); String expResult = ""; String result = instance.getECTwoStreetAddr1(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get ectwo street addr1 method of class org </s>
funcom_train/35069790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selFigurInEditor(boolean isRecord) { hideAllIcons(); flip.setVisible(true); sound.setVisible(true); rotateL.setVisible(true); rotateR.setVisible(true); delete.setVisible(true); if(isRecord) { // if we we are recording, text and hide should be shown text.setVisible(true); hide.setVisible(true); } else { // if not, not text.setVisible(false); hide.setVisible(false); } } COM: <s> this method selects a figure in the drawingpanel </s>
funcom_train/20677624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidTagName(String name) { if (checkTagNames == false) { return true; } if (name.regionMatches(true, 0, "x_", 0, 2)) { return true; } if (name.regionMatches(true, 0, "_", 0, 1)) { return true; } for (int i = 0; i < cftags.length; i++) { if (name.equalsIgnoreCase(cftags[i])) { return true; } } return false; } COM: <s> checks if tags name is valid one </s>
funcom_train/19765357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getPlayCommand() { if (playCommand == null) {//GEN-END:|20-getter|0|20-preInit // write pre-init user code here playCommand = new Command("play", Command.SCREEN, 0);//GEN-LINE:|20-getter|1|20-postInit // write post-init user code here }//GEN-BEGIN:|20-getter|2| return playCommand; } COM: <s> returns an initiliazed instance of play command component </s>
funcom_train/33518979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void uptadeXML() throws DBException { try { File file = new File(USER_PATH); if (!file.exists()) { file.createNewFile(); } xstream.toXML(usersMap, new FileOutputStream(USER_PATH)); } catch (IOException e) { throw new DBException(e.getMessage() + ": " + USER_PATH); } } COM: <s> this method is responsible for saving the users information </s>
funcom_train/13360748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttachmentProperties(Attachment attachment, List<AttachmentProperty> properties) throws AttachmentException { try { attachment.addProperties(properties); jdoManager.updateDataObject(attachment, Attachment.class); } catch (OACException oexp) { String msg = "Unable to add attachment properties: " + oexp.getMessage(); LOG.error(this.getClass(), msg); throw new AttachmentException(msg, oexp); } } COM: <s> method that adds a list of attachment propertys to a given attachment </s>
funcom_train/5063864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ICB getICB(int type, int subType, int instance) { ICBKey key = new ICBKey(type, subType); int Index = indexOf(key); if (Index >= 0) { if (instance > 1) { ListIterator iter = listIterator(Index); while (iter.hasNext() && (--instance > 0)) { iter.next(); } if (instance > 0) { // Couldn't find the instance that was requested return null; } else { return (ICB) iter.next(); } } else { return (ICB) get(Index); } } else { return null; } } COM: <s> returns an icb that matches the specified type subtype as well as the </s>
funcom_train/35838236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text) { String oldValue = sText; //set thte label of the model nodesummary object try { if (oNode != null) { oNode.setLabel(text, sAuthor); sText = text; firePropertyChange(TEXT_PROPERTY, oldValue, sText); repaint(); } } catch(Exception io) { io.printStackTrace(); // ProjectCompendium.APP.displayError("Error: (UINode.setText) Unable to update label.\n\n"+io.getMessage()); } } COM: <s> defines the single line of text this component will display </s>
funcom_train/18789505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMainEmail(String mainEmail) { if (((this.mainEmail != null) && !this.mainEmail.equals(mainEmail)) || ((this.mainEmail == null) && (mainEmail != null))) { this.mainEmail = mainEmail; setModified(true); } } COM: <s> sets the new value of the simple property main email </s>
funcom_train/32058180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsShowAllEdgesForVisibleVertices() { System.out.println("testIsShowAllEdgesForVisibleVertices"); GraphModel gm = null; CellViewFactory cvf = null; GraphLayoutCache cache = new GraphLayoutCache(gm, cvf); assertEquals("isShowAllEdgesForVisibleVertices", cache .isShowAllEdgesForVisibleVertices() == true, true); } COM: <s> this function tests is show all edges for visible vertices function of </s>
funcom_train/42181853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void show3DError() { ResourceBundle resource = ResourceBundle.getBundle(SweetHome3D.class.getName()); String message = resource.getString("3DError.message"); String title = resource.getString("3DError.title"); JOptionPane.showMessageDialog(null, message, title, JOptionPane.ERROR_MESSAGE); } COM: <s> displays in a 3 d error message </s>
funcom_train/8931297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(int i) { try { // Save the resource to the file system. // Resource savedResource = (Resource)editingDomain.getResourceSet().getResources().get(i); savedResource.save(Collections.EMPTY_MAP); } catch (Exception exception) { exception.printStackTrace(); } try { // Refresh the necessary state. // ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); } catch (Exception exception) { // Something went wrong that shouldn't. // exception.printStackTrace(); } } COM: <s> saves ith resource </s>
funcom_train/2876095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendQName(QName qname) { String prefix = qname.getPrefix(); if (prefix.length() == 0) { //make up a prefix prefix = PREFIX; } addNamespaceDeclaration(prefix, qname.getNamespaceURI()); appendChild(prefix + ":" + qname.getLocalPart()); } COM: <s> attach a qname to the text of a node setting up namespaces </s>
funcom_train/4779950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getUserPanel() { if (userPanel == null) { userLabel = new JLabel(); userLabel.setText(ResourceUtil.getString(type + ".user")); userLabel.setPreferredSize(new Dimension(100, 15)); userLabel.setHorizontalAlignment(SwingConstants.TRAILING); userPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); userPanel.add(userLabel); userPanel.add(getUserComboBox()); userPanel.setVisible(false); } return userPanel; } COM: <s> this method initializes j panel6 </s>
funcom_train/15837610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPnlMain() { if (jPnlMain == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(3); jPnlMain = new JPanel(); jPnlMain.setLayout(gridLayout); jPnlMain.add(getJPnlPasswordEntry(), null); jPnlMain.add(getJPnlKeyfileControl(), null); jPnlMain.add(getJScrollPane(), null); } return jPnlMain; } COM: <s> this method initializes j pnl main </s>
funcom_train/44705059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadTypeMap(List list) { Iterator pairs = list.iterator(); while ( pairs.hasNext() ) { List pair = (List) pairs.next(); String key = (String) pair.get(0); String loaderClass = (String) pair.get(1); s_typeMap.put(key, loaderClass); } } COM: <s> initializes the content type loader map </s>
funcom_train/24288968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateUI() { super.updateUI(); setFont(Font.decode("Dialog Plain 11")); //$NON-NLS-1$ if (weekPanel != null) { weekPanel.updateUI(); } if (initialized) { if ("Windows".equals(UIManager.getLookAndFeel().getID())) { //$NON-NLS-1$ setDayBordersVisible(false); setDecorationBackgroundVisible(true); setDecorationBordersVisible(false); } else { setDayBordersVisible(true); setDecorationBackgroundVisible(decorationBackgroundVisible); setDecorationBordersVisible(decorationBordersVisible); } } } COM: <s> updates the ui and sets the day button preferences </s>