file_name stringlengths 6 86 | file_path stringlengths 45 249 | content stringlengths 47 6.26M | file_size int64 47 6.26M | language stringclasses 1 value | extension stringclasses 1 value | repo_name stringclasses 767 values | repo_stars int64 8 14.4k | repo_forks int64 0 1.17k | repo_open_issues int64 0 788 | repo_created_at stringclasses 767 values | repo_pushed_at stringclasses 767 values |
|---|---|---|---|---|---|---|---|---|---|---|---|
T6937244A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javap/6937244/T6937244A.java | /*
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6937244
* @summary fields display with JVMS names, not Java names
*/
import java.io.*;
import java.util.*;
public class T6937244A {
public static void main(String[] args) throws Exception {
new T6937244A().run();
}
void run() throws Exception {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
String[] args = { "Test" };
int rc = com.sun.tools.javap.Main.run(args, pw);
pw.close();
String out = sw.toString();
System.err.println(out);
if (rc != 0)
throw new Exception("unexpected exit from javap: " + rc);
int count = 0;
for (String line: out.split("[\r\n]+")) {
if (line.contains("implements")) {
verify(line, "implements java.util.List<java.lang.String>");
count++;
}
if (line.contains("field")) {
verify(line, "java.util.List<java.lang.String> field");
count++;
}
if (line.contains("method")) {
verify(line, "java.util.List<java.lang.String> method(java.util.List<java.lang.String>) throws java.lang.Exception");
count++;
}
}
// final backstop check
if (out.contains("/"))
throw new Exception("unexpected \"/\" in output");
if (count != 3)
throw new Exception("wrong number of matches found: " + count);
}
void verify(String line, String expect) throws Exception {
if (!line.contains(expect)) {
System.err.println("line: " + line);
System.err.println("expect: " + expect);
throw new Exception("expected string not found in line");
}
}
}
abstract class Test implements List<String> {
public List<String> field;
public List<String> method(List<String> arg) throws Exception { return null; }
}
| 3,025 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6937244.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javap/6937244/T6937244.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6937244
* @summary fields display with JVMS names, not Java names
*/
import java.io.*;
public class T6937244 {
public static void main(String[] args) throws Exception {
new T6937244().run();
}
void run() throws Exception {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
String[] args = { "java.lang.String" };
int rc = com.sun.tools.javap.Main.run(args, pw);
pw.close();
String out = sw.toString();
System.err.println(out);
if (rc != 0)
throw new Exception("unexpected exit from javap: " + rc);
for (String line: out.split("[\r\n]+")) {
if (line.contains("CASE_INSENSITIVE_ORDER")) {
if (line.matches("\\s*\\Qpublic static final java.util.Comparator<java.lang.String> CASE_INSENSITIVE_ORDER;\\E\\s*"))
return;
throw new Exception("declaration not shown as expected");
}
}
throw new Exception("declaration of CASE_INSENSITIVE_ORDER not found");
}
}
| 2,155 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T4111861.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javap/4111861/T4111861.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.*;
/*
* @test
* @bug 4111861
* @summary static final field contents are not displayed
*/
public class T4111861 {
public static void main(String... args) throws Exception {
new T4111861().run();
}
void run() throws Exception {
File testSrc = new File(System.getProperty("test.src", "."));
File a_java = new File(testSrc, "A.java");
javac("-d", ".", a_java.getPath());
String out = javap("-classpath", ".", "-constants", "A");
String a = read(a_java);
if (!filter(out).equals(filter(read(a_java)))) {
System.out.println(out);
throw new Exception("unexpected output");
}
}
String javac(String... args) throws Exception {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
int rc = com.sun.tools.javac.Main.compile(args, pw);
if (rc != 0)
throw new Exception("javac failed, rc=" + rc);
return sw.toString();
}
String javap(String... args) throws Exception {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
int rc = com.sun.tools.javap.Main.run(args, pw);
if (rc != 0)
throw new Exception("javap failed, rc=" + rc);
return sw.toString();
}
String read(File f) throws IOException {
StringBuilder sb = new StringBuilder();
BufferedReader in = new BufferedReader(new FileReader(f));
try {
String line;
while ((line = in.readLine()) != null) {
sb.append(line);
sb.append('\n');
}
} finally {
in.close();
}
return sb.toString();
}
// return those lines beginning "public static final"
String filter(String s) throws IOException {
StringBuilder sb = new StringBuilder();
BufferedReader in = new BufferedReader(new StringReader(s));
try {
String line;
while ((line = in.readLine()) != null) {
if (line.indexOf("public static final") > 0) {
sb.append(line.trim());
sb.append('\n');
}
}
} finally {
in.close();
}
return sb.toString();
}
}
| 3,398 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javap/4111861/A.java | class A {
public static final int i = 42;
public static final boolean b = true;
public static final float f = 1.0f;
public static final double d = 1.0d;
public static final short s = 1;
public static final long l = 1l;
public static final char cA = 'A';
public static final char c0 = '\u0000';
public static final char cn = '\n';
public static final char cq1 = '\'';
public static final char cq2 = '"';
public static final java.lang.String t1 = "abc \u0000 \f\n\r\t'\"";
}
| 521 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestInterface.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testInterface/TestInterface.java | /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4682448 4947464 5029946
* @summary Verify that the public modifier does not show up in the
* documentation for public methods, as recommended by the JLS.
* If A implements I and B extends A, B should be in the list of
* implementing classes in the documentation for I.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestInterface
* @run main TestInterface
*/
public class TestInterface extends JavadocTester {
//Test information.
private static final String BUG_ID = "4682448-4947464-5029946";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
};
//Input for string search tests.
private static final String[][] TEST = {
{BUG_ID + FS + "pkg" + FS + "Interface.html",
"<pre>int method()</pre>"},
{BUG_ID + FS + "pkg" + FS + "Interface.html",
"<pre>static final int field</pre>"},
// Make sure known implementing class list is correct and omits type parameters.
{BUG_ID + FS + "pkg" + FS + "Interface.html",
"<dl>" + NL + "<dt>All Known Implementing Classes:</dt>" + NL +
"<dd><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child" +
"</a>, <a href=\"../pkg/Parent.html\" title=\"class in pkg\">Parent" +
"</a></dd>" + NL + "</dl>"},
// Make sure "All Implemented Interfaces": has substituted type parameters
{BUG_ID + FS + "pkg" + FS + "Child.html",
"<dl>" + NL + "<dt>All Implemented Interfaces:</dt>" + NL +
"<dd><a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" +
"Interface</a><T></dd>" + NL + "</dl>"
},
//Make sure Class Tree has substituted type parameters.
{BUG_ID + FS + "pkg" + FS + "Child.html",
"<ul class=\"inheritance\">" + NL + "<li>java.lang.Object</li>" + NL +
"<li>" + NL + "<ul class=\"inheritance\">" + NL +
"<li><a href=\"../pkg/Parent.html\" title=\"class in pkg\">" +
"pkg.Parent</a><T></li>" + NL + "<li>" + NL +
"<ul class=\"inheritance\">" + NL + "<li>pkg.Child<T></li>" + NL +
"</ul>" + NL + "</li>" + NL + "</ul>" + NL + "</li>" + NL + "</ul>"
},
//Make sure "Direct Know Subclasses" omits type parameters
{BUG_ID + FS + "pkg" + FS + "Parent.html",
"<dl>" + NL + "<dt>Direct Known Subclasses:</dt>" + NL +
"<dd><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child" +
"</a></dd>" + NL + "</dl>"
},
//Make sure "Specified By" has substituted type parameters.
{BUG_ID + FS + "pkg" + FS + "Child.html",
"<dt><strong>Specified by:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg/Interface.html#method()\">method</a>" +
"</code> in interface <code>" +
"<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" +
"Interface</a><<a href=\"../pkg/Child.html\" title=\"type parameter in Child\">" +
"T</a>></code></dd>"
},
//Make sure "Overrides" has substituted type parameters.
{BUG_ID + FS + "pkg" + FS + "Child.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg/Parent.html#method()\">method</a>" +
"</code> in class <code><a href=\"../pkg/Parent.html\" " +
"title=\"class in pkg\">Parent</a><<a href=\"../pkg/Child.html\" " +
"title=\"type parameter in Child\">T</a>></code></dd>"
},
};
private static final String[][] NEGATED_TEST = {
{BUG_ID + FS + "pkg" + FS + "Interface.html",
"public int method()"},
{BUG_ID + FS + "pkg" + FS + "Interface.html",
"public static final int field"},
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestInterface tester = new TestInterface();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 5,572 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Child.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testInterface/pkg/Child.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class Child<T> extends Parent<T> {
public int method() {
return 1;
}
}
| 1,168 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Interface.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testInterface/pkg/Interface.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public interface Interface<E> {
/**
* The public modifier of this interface field should not show up
* in the documentation.
*/
public final int field = 1;
/**
* The public modifier of this interface method should not show up in the
* documentation.
*
* @return some dummy integer.
*/
public int method();
}
| 1,439 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Parent.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testInterface/pkg/Parent.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class Parent<E> implements Interface<E> {
public int method() {
return 1;
}
}
| 1,175 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
WindowTitles.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/WindowTitles/WindowTitles.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4530730
* @summary stddoclet: With frames off, window titles have "()" appended
* @author dkramer
* @run main WindowTitles
*/
import com.sun.javadoc.*;
import java.util.*;
import java.io.*;
// If needing regular expression pattern matching,
// see /java/pubs/dev/linkfix/src/LinkFix.java
/**
* Runs javadoc and runs regression tests on the resulting HTML.
* It reads each file, complete with newlines, into a string to easily
* find strings that contain newlines.
*/
public class WindowTitles
{
private static final String BUGID = "4530730";
private static final String BUGNAME = "WindowTitles";
private static final String FS = System.getProperty("file.separator");
private static final String PS = System.getProperty("path.separator");
private static final String LS = System.getProperty("line.separator");
private static final String TMPDIR_STRING1 = "." + FS + "docs1" + FS;
private static final String TMPDIR_STRING2 = "." + FS + "docs2" + FS;
// Subtest number. Needed because runResultsOnHTML is run twice, and subtestNum
// should increment across subtest runs.
public static int subtestNum = 0;
public static int numSubtestsPassed = 0;
// Entry point
public static void main(String[] args) {
// Directory that contains source files that javadoc runs on
String srcdir = System.getProperty("test.src", ".");
// Test for all cases except the split index page
runJavadoc(new String[] {"-d", TMPDIR_STRING1,
"-use",
"-sourcepath", srcdir,
"p1", "p2"});
runTestsOnHTML(testArray);
// Test only for the split-index case (and run on only one package)
System.out.println(""); // blank line
runJavadoc(new String[] {"-d", TMPDIR_STRING2,
"-splitindex",
"-sourcepath", System.getProperty("test.src", "."),
"p1"});
runTestsOnHTML(testSplitIndexArray);
printSummary();
}
/** Run javadoc */
public static void runJavadoc(String[] javadocArgs) {
if (com.sun.tools.javadoc.Main.execute(javadocArgs) != 0) {
throw new Error("Javadoc failed to execute");
}
}
/**
* Assign value for [ stringToFind, filename ]
* NOTE: The standard doclet uses platform-specific line separators (LS)
*/
private static final String[][] testArray = {
{ "<title>Overview</title>",
TMPDIR_STRING1 + "overview-summary.html" },
{ "<title>Class Hierarchy</title>",
TMPDIR_STRING1 + "overview-tree.html" },
{ "<title>Overview List</title>",
TMPDIR_STRING1 + "overview-frame.html" },
{ "<title>p1</title>",
TMPDIR_STRING1 + "p1" + FS + "package-summary.html" },
{ "<title>p1</title>",
TMPDIR_STRING1 + "p1" + FS + "package-frame.html" },
{ "<title>p1 Class Hierarchy</title>",
TMPDIR_STRING1 + "p1" + FS + "package-tree.html" },
{ "<title>Uses of Package p1</title>",
TMPDIR_STRING1 + "p1" + FS + "package-use.html" },
{ "<title>C1</title>",
TMPDIR_STRING1 + "p1" + FS + "C1.html" },
{ "<title>All Classes</title>",
TMPDIR_STRING1 + "allclasses-frame.html" },
{ "<title>All Classes</title>",
TMPDIR_STRING1 + "allclasses-noframe.html" },
{ "<title>Constant Field Values</title>",
TMPDIR_STRING1 + "constant-values.html" },
{ "<title>Deprecated List</title>",
TMPDIR_STRING1 + "deprecated-list.html" },
{ "<title>Serialized Form</title>",
TMPDIR_STRING1 + "serialized-form.html" },
{ "<title>API Help</title>",
TMPDIR_STRING1 + "help-doc.html" },
{ "<title>Index</title>",
TMPDIR_STRING1 + "index-all.html" },
{ "<title>Uses of Class p1.C1</title>",
TMPDIR_STRING1 + "p1" + FS + "class-use" + FS + "C1.html" },
};
/**
* Assign value for [ stringToFind, filename ] for split index page
*/
private static final String[][] testSplitIndexArray = {
{ "<title>C-Index</title>",
TMPDIR_STRING2 + "index-files" + FS + "index-1.html" },
};
public static void runTestsOnHTML(String[][] testArray) {
for (int i = 0; i < testArray.length; i++) {
subtestNum += 1;
// Read contents of file into a string
String fileString = readFileToString(testArray[i][1]);
// Get string to find
String stringToFind = testArray[i][0];
// Find string in file's contents
if (findString(fileString, stringToFind) == -1) {
System.out.println("\nSub-test " + (subtestNum)
+ " for bug " + BUGID + " (" + BUGNAME + ") FAILED\n"
+ "when searching for:\n"
+ stringToFind);
} else {
numSubtestsPassed += 1;
System.out.println("\nSub-test " + (subtestNum) + " passed:\n" + stringToFind);
}
}
}
public static void printSummary() {
if ( numSubtestsPassed == subtestNum ) {
System.out.println("\nAll " + numSubtestsPassed + " subtests passed");
} else {
throw new Error("\n" + (subtestNum - numSubtestsPassed) + " of " + (subtestNum)
+ " subtests failed for bug " + BUGID + " (" + BUGNAME + ")\n");
}
}
// Read the file into a String
public static String readFileToString(String filename) {
try {
File file = new File(filename);
if ( !file.exists() ) {
System.out.println("\nFILE DOES NOT EXIST: " + filename);
}
BufferedReader in = new BufferedReader(new FileReader(file));
// Create an array of characters the size of the file
char[] allChars = new char[(int)file.length()];
// Read the characters into the allChars array
in.read(allChars, 0, (int)file.length());
in.close();
// Convert to a string
String allCharsString = new String(allChars);
return allCharsString;
} catch (FileNotFoundException e) {
System.err.println(e);
return "";
} catch (IOException e) {
System.err.println(e);
return "";
}
}
public static int findString(String fileString, String stringToFind) {
return fileString.indexOf(stringToFind);
}
}
| 8,287 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/WindowTitles/p1/C1.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p1;
import java.io.Serializable;
public class C1 implements Serializable {
}
| 1,139 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/WindowTitles/p2/C2.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p2;
public class C2 {
}
| 1,085 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
AuthorDD.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/AuthorDD/AuthorDD.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4651598
* @summary Javadoc wrongly inserts </DD> tags when using multiple @author tags
* @author dkramer
* @run main AuthorDD
*/
import com.sun.javadoc.*;
import java.util.*;
import java.io.*;
/**
* Runs javadoc and runs regression tests on the resulting HTML.
* It reads each file, complete with newlines, into a string to easily
* find strings that contain newlines.
*/
public class AuthorDD
{
private static final String BUGID = "4651598";
private static final String BUGNAME = "AuthorDD";
private static final String FS = System.getProperty("file.separator");
private static final String PS = System.getProperty("path.separator");
private static final String NL = System.getProperty("line.separator");
// Subtest number. Needed because runResultsOnHTML is run twice, and subtestNum
// should increment across subtest runs.
public static int subtestNum = 0;
public static int numSubtestsPassed = 0;
// Entry point
public static void main(String[] args) {
// Directory that contains source files that javadoc runs on
String srcdir = System.getProperty("test.src", ".");
// Test for all cases except the split index page
runJavadoc(new String[] {"-d", BUGID,
"-author",
"-version",
"-sourcepath", srcdir,
"p1"});
runTestsOnHTML(testArray);
printSummary();
}
/** Run javadoc */
public static void runJavadoc(String[] javadocArgs) {
if (com.sun.tools.javadoc.Main.execute(AuthorDD.class.getClassLoader(),
javadocArgs) != 0) {
throw new Error("Javadoc failed to execute");
}
}
/**
* Assign value for [ stringToFind, filename ]
* NOTE: The standard doclet uses the same separator "\n" for all OS's
*/
private static final String[][] testArray = {
// Test single @since tag:
{ "<dt><span class=\"strong\">Since:</span></dt>"+NL+" <dd>JDK 1.0</dd>",
BUGID + FS + "p1" + FS + "C1.html" },
// Test multiple @author tags:
{ "<dt><span class=\"strong\">Author:</span></dt>"+NL+" <dd>Doug Kramer, Jamie, Neal</dd>",
BUGID + FS + "p1" + FS + "C1.html" },
};
public static void runTestsOnHTML(String[][] testArray) {
for (int i = 0; i < testArray.length; i++) {
subtestNum += 1;
// Read contents of file into a string
String fileString = readFileToString(testArray[i][1]);
// Get string to find
String stringToFind = testArray[i][0];
// Find string in file's contents
if (findString(fileString, stringToFind) == -1) {
System.out.println("\nSub-test " + (subtestNum)
+ " for bug " + BUGID + " (" + BUGNAME + ") FAILED\n"
+ "when searching for:\n"
+ stringToFind);
} else {
numSubtestsPassed += 1;
System.out.println("\nSub-test " + (subtestNum) + " passed:\n" + stringToFind);
}
}
}
public static void printSummary() {
if ( numSubtestsPassed == subtestNum ) {
System.out.println("\nAll " + numSubtestsPassed + " subtests passed");
} else {
throw new Error("\n" + (subtestNum - numSubtestsPassed) + " of " + (subtestNum)
+ " subtests failed for bug " + BUGID + " (" + BUGNAME + ")\n");
}
}
// Read the file into a String
public static String readFileToString(String filename) {
try {
File file = new File(filename);
if ( !file.exists() ) {
System.out.println("\nFILE DOES NOT EXIST: " + filename);
}
BufferedReader in = new BufferedReader(new FileReader(file));
// Create an array of characters the size of the file
char[] allChars = new char[(int)file.length()];
// Read the characters into the allChars array
in.read(allChars, 0, (int)file.length());
in.close();
// Convert to a string
String allCharsString = new String(allChars);
return allCharsString;
} catch (FileNotFoundException e) {
System.err.println(e);
return "";
} catch (IOException e) {
System.err.println(e);
return "";
}
}
public static int findString(String fileString, String stringToFind) {
return fileString.indexOf(stringToFind);
}
}
| 5,868 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/AuthorDD/p1/C1.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p1;
/**
* This is the class documentation.
* Testing multiple @since and @version tags only to see if all
* instances of SimpleTaglet have the same bug
*
* @author Doug Kramer
* @author Jamie
* @author Neal
*
* @since JDK 1.0
*
* @version 1.1
* @version 1.2
* @version 1.3
*/
public class C1 {
}
| 1,372 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
JavascriptWinTitle.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4645058 4747738 4855054
* @summary Javascript IE load error when linked by -linkoffline
* Window title shouldn't change when loading left frames (javascript)
* @author dkramer
* @run main JavascriptWinTitle
*/
import com.sun.javadoc.*;
import java.util.*;
import java.io.*;
/**
* Runs javadoc and runs regression tests on the resulting HTML.
* It reads each file, complete with newlines, into a string to easily
* find strings that contain newlines.
*/
public class JavascriptWinTitle {
private static final String BUGID = "4645058";
private static final String BUGNAME = "JavascriptWinTitle";
private static final String FS = System.getProperty("file.separator");
private static final String PS = System.getProperty("path.separator");
private static final String LS = System.getProperty("line.separator");
private static final String TMPDEST_DIR1 = "." + FS + "docs1" + FS;
private static final String TMPDEST_DIR2 = "." + FS + "docs2" + FS;
// Subtest number. Needed because runResultsOnHTML is run twice,
// and subtestNum should increment across subtest runs.
public static int subtestNum = 0;
public static int numSubtestsPassed = 0;
// Entry point
public static void main(String[] args) {
// Directory that contains source files that javadoc runs on
String srcdir = System.getProperty("test.src", ".");
// Test for all cases except the split index page
runJavadoc(new String[] {"-d", TMPDEST_DIR1,
"-doctitle", "Document Title",
"-windowtitle", "Window Title",
"-overview", (srcdir + FS + "overview.html"),
"-linkoffline",
"http://java.sun.com/j2se/1.4/docs/api", srcdir,
"-sourcepath", srcdir,
"p1", "p2"});
runTestsOnHTML(testArray);
printSummary();
}
/** Run javadoc */
public static void runJavadoc(String[] javadocArgs) {
if (com.sun.tools.javadoc.Main.execute(javadocArgs) != 0) {
throw new Error("Javadoc failed to execute");
}
}
/**
* Assign value for [ stringToFind, filename ]
* NOTE: The standard doclet uses the same separator "\n" for all OS's
*/
private static final String[][] testArray = {
// Test the javascript "type" attribute is present:
{ "<script type=\"text/javascript\">",
TMPDEST_DIR1 + "overview-summary.html" },
// Test onload is absent:
{ "<body>",
TMPDEST_DIR1 + "overview-summary.html" },
// Test onload is present:
{ "<body>",
TMPDEST_DIR1 + FS + "p1" + FS + "package-summary.html" },
// Test that "onload" is not present in BODY tag:
{ "<body>",
TMPDEST_DIR1 + "overview-frame.html" },
// Test that "onload" is not present in BODY tag:
{ "<body>",
TMPDEST_DIR1 + "allclasses-frame.html" },
// Test that "onload" is not present in BODY tag:
{ "<body>",
TMPDEST_DIR1 + FS + "p1" + FS + "package-frame.html" },
// Test that win title javascript is followed by NOSCRIPT code.
{"<script type=\"text/javascript\"><!--" + LS +
" if (location.href.indexOf('is-external=true') == -1) {" + LS +
" parent.document.title=\"C (Window Title)\";" + LS +
" }" + LS + "//-->" + LS + "</script>",
TMPDEST_DIR1 + FS + "p1" + FS + "C.html"
}
};
public static void runTestsOnHTML(String[][] testArray) {
for (int i = 0; i < testArray.length; i++) {
subtestNum += 1;
// Read contents of file into a string
String fileString = readFileToString(testArray[i][1]);
// Get string to find
String stringToFind = testArray[i][0];
// Find string in file's contents
if (findString(fileString, stringToFind) == -1) {
System.out.println("\nSub-test " + (subtestNum)
+ " for bug " + BUGID + " (" + BUGNAME + ") FAILED\n"
+ "when searching for:\n"
+ stringToFind);
} else {
numSubtestsPassed += 1;
System.out.println("\nSub-test " + (subtestNum) + " passed:\n" + stringToFind);
}
}
}
public static void printSummary() {
if ( numSubtestsPassed == subtestNum ) {
System.out.println("\nAll " + numSubtestsPassed + " subtests passed");
} else {
throw new Error("\n" + (subtestNum - numSubtestsPassed) + " of " + (subtestNum)
+ " subtests failed for bug " + BUGID + " (" + BUGNAME + ")\n");
}
}
// Read the file into a String
public static String readFileToString(String filename) {
try {
File file = new File(filename);
if ( !file.exists() ) {
System.out.println("\nFILE DOES NOT EXIST: " + filename);
}
BufferedReader in = new BufferedReader(new FileReader(file));
// Create an array of characters the size of the file
char[] allChars = new char[(int)file.length()];
// Read the characters into the allChars array
in.read(allChars, 0, (int)file.length());
in.close();
// Convert to a string
String allCharsString = new String(allChars);
return allCharsString;
} catch (FileNotFoundException e) {
System.err.println(e);
return "";
} catch (IOException e) {
System.err.println(e);
return "";
}
}
public static int findString(String fileString, String stringToFind) {
return fileString.indexOf(stringToFind);
}
}
| 7,254 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/JavascriptWinTitle/p1/C.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p1;
public class C {
}
| 1,084 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/JavascriptWinTitle/p2/C2.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p2;
public class C2 {
}
| 1,085 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestOverridenPrivateMethodsWithPackageFlag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4634891
* @summary Determine if overriden methods are properly documented when
* -protected (default) visibility flag is used.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestOverridenPrivateMethodsWithPackageFlag
* @run main TestOverridenPrivateMethodsWithPackageFlag
*/
public class TestOverridenPrivateMethodsWithPackageFlag extends JavadocTester {
private static final String BUG_ID = "4634891";
private static final String[][] TEST = {
//The public method should be overriden
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" +
"publicMethod</a></code> in class <code>" +
"<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
//The public method in different package should be overriden
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" +
"publicMethod</a></code> in class <code>" +
"<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
//The package private method should be overriden since the base and sub class are in the same
//package.
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">" +
"packagePrivateMethod</a></code> in class <code>" +
"<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}
};
private static final String[][] NEGATED_TEST = {
//The private method in should not be overriden
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
//The private method in different package should not be overriden
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
//The package private method should not be overriden since the base and sub class are in
//different packages.
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">"},
};
private static final String[] ARGS =
new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "-package", "pkg1", "pkg2"};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestOverridenPrivateMethodsWithPackageFlag tester = new TestOverridenPrivateMethodsWithPackageFlag();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 4,538 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestOverridenMethodDocCopy.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java | /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4368820
* @summary Inherited comment should link directly to member, not just
* class
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestOverridenMethodDocCopy
* @run main TestOverridenMethodDocCopy
*/
public class TestOverridenMethodDocCopy extends JavadocTester {
//Test information.
private static final String BUG_ID = "4368820";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1", "pkg2"
};
//Input for string search tests.
private static final String[][] TEST = {
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<strong>Description copied from class: <code>" +
"<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy()\">" +
"BaseClass</a></code></strong>"
}
};
private static final String[][] NEGATED_TEST = NO_TEST;
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestOverridenMethodDocCopy tester = new TestOverridenMethodDocCopy();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 2,565 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestOverridenPrivateMethods.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethods.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4634891
* @summary Determine if overriden methods are properly documented when
* -protected (default) visibility flag is used.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestOverridenPrivateMethods
* @run main TestOverridenPrivateMethods
*/
public class TestOverridenPrivateMethods extends JavadocTester {
private static final String BUG_ID = "4634891";
private static final String[][] TEST = {
//The public method should be overriden
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
//The public method in different package should be overriden
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"}
};
private static final String[][] NEGATED_TEST = {
//The package private method should be overriden since the base and sub class are in the same
//package. However, the link should not show up because the package private methods are not documented.
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"},
//The private method in should not be overriden
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
//The private method in different package should not be overriden
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
//The package private method should not be overriden since the base and sub class are in
//different packages.
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"Overrides:</strong></dt><dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"}
};
private static final String[] ARGS =
new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1", "pkg2"};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestOverridenPrivateMethods tester = new TestOverridenPrivateMethods();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,936 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestOverridenPrivateMethodsWithPrivateFlag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4634891
* @summary Determine if overriden methods are properly documented when
* -protected (default) visibility flag is used.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestOverridenPrivateMethodsWithPrivateFlag
* @run main TestOverridenPrivateMethodsWithPrivateFlag
*/
public class TestOverridenPrivateMethodsWithPrivateFlag extends JavadocTester {
private static final String BUG_ID = "4634891";
private static final String[][] TEST = {
//The public method should be overriden
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
//The package private method should be overriden since the base and sub class are in the same
//package.
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"},
//The public method in different package should be overriden
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
};
private static final String[][] NEGATED_TEST = {
//The private method in should not be overriden
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
//The private method in different package should not be overriden
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
//The package private method should not be overriden since the base and sub class are in
//different packages.
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"<dt><strong>Overrides:</strong></dt>" + NL +
"<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"}
};
private static final String[] ARGS =
new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "-private", "pkg1", "pkg2"};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestOverridenPrivateMethodsWithPrivateFlag tester = new TestOverridenPrivateMethodsWithPrivateFlag();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,971 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestMultiInheritence.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/TestMultiInheritence.java | /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4933335
* @summary Make sure that all inherited methods from multiple extended
* interfaces are documented
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestMultiInheritence
* @run main TestMultiInheritence
*/
public class TestMultiInheritence extends JavadocTester {
//Test information.
private static final String BUG_ID = "4933335";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg3"
};
//Method foo() is inherited from BOTH I2 and I3
private static final String[][] TEST = {
{BUG_ID + FS + "pkg3" + FS + "I1.html",
"Methods inherited from interface pkg3." +
"<a href=\"../pkg3/I2.html\" title=\"interface in pkg3\">" +
"I2</a>"},
{BUG_ID + FS + "pkg3" + FS +"I1.html",
"Methods inherited from interface pkg3." +
"<a href=\"../pkg3/I3.html\" title=\"interface in pkg3\">" +
"I3</a>"},
{BUG_ID + FS + "pkg3" + FS + "I0.html",
"Methods inherited from interface pkg3." +
"<a href=\"../pkg3/I2.html\" title=\"interface in pkg3\">" +
"I2</a>"},
{BUG_ID + FS + "pkg3" + FS +"I0.html",
"Methods inherited from interface pkg3." +
"<a href=\"../pkg3/I3.html\" title=\"interface in pkg3\">" +
"I3</a>"},
};
//Method foo() is NOT inherited from I4 because it is overriden by
//I3.
private static final String[][] NEGATED_TEST = {
{BUG_ID + FS + "pkg3" + FS + "I1.html",
"Methods inherited from interface pkg3." +
"<a href=\"../pkg3/I4.html\" title=\"interface in pkg3\">" +
"I4</a>"},
{BUG_ID + FS + "pkg3" + FS + "I0.html",
"Methods inherited from interface pkg3." +
"<a href=\"../pkg3/I4.html\" title=\"interface in pkg3\">" +
"I4</a>"},
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestMultiInheritence tester = new TestMultiInheritence();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,641 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SubClass.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/pkg2/SubClass.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg2;
import pkg1.*;
public class SubClass extends BaseClass {
/*************************************************
* This method should override the same public
* method in the base class.
*
*/
public void publicMethod() {}
/*************************************************
* This method should not override the same package
* private method in the base class because they
* are in different packages.
*/
public void packagePrivateMethod() {}
/*************************************************
* This method should not override anything because
* the same method in the base class is private.
*
*/
public void privateMethod() {}
}
| 1,746 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
I2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/pkg3/I2.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg3;
public interface I2 {
public void foo();
}
| 1,120 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
I0.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/pkg3/I0.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg3;
public interface I0 extends I2, I3, I4 {}
| 1,109 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
I1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/pkg3/I1.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg3;
public interface I1 extends I2, I4, I3 {}
| 1,109 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
I3.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/pkg3/I3.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg3;
public interface I3 extends I4 {
public void foo();
}
| 1,131 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
I4.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/pkg3/I4.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg3;
public interface I4 {
public void foo();
}
| 1,120 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SubClass.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/pkg1/SubClass.java | /*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
public class SubClass extends BaseClass {
/*************************************************
* This method should override the same public
* method in the base class.
*
*/
public void publicMethod() {}
/*************************************************
* This method should override the same package
* private method in the base class because they
* are in the same package.
*/
public void packagePrivateMethod() {}
/*************************************************
* This method should not override anything because
* the same method in the base class is private.
*
*/
public void privateMethod() {}
public void overridenMethodWithDocsToCopy() {}
}
| 1,779 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
BaseClass.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testOverridenMethods/pkg1/BaseClass.java | /*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
public class BaseClass {
/*************************************************
* A public method that can be overriden.
*
*/
public void publicMethod() {}
/*************************************************
* A package private method that can only
* be overriden by sub classes in the same package.
*
*/
void packagePrivateMethod() {}
/*************************************************
* A private that cannot be overriden.
*
*/
private void privateMethod() {}
/**
* These comments will be copied to the overriden method.
*/
public void overridenMethodWithDocsToCopy() {}
}
| 1,701 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestMemberSummary.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java | /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4951228 6290760
* @summary Test the case where the overriden method returns a different
* type than the method in the child class. Make sure the
* documentation is inherited but the return type isn't.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestMemberSummary
* @run main TestMemberSummary
*/
public class TestMemberSummary extends JavadocTester {
//Test information.
private static final String BUG_ID = "4951228-6290760";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg","pkg2"
};
//Input for string search tests.
private static final String[][] TEST = {
// Check return type in member summary.
{BUG_ID + FS + "pkg" + FS + "PublicChild.html",
"<code><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>" + NL +
"<td class=\"colLast\"><code><strong><a href=\"../pkg/PublicChild.html#returnTypeTest()\">" +
"returnTypeTest</a></strong>()</code>"
},
// Check return type in member detail.
{BUG_ID + FS + "pkg" + FS + "PublicChild.html",
"<pre>public <a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">" +
"PublicChild</a> returnTypeTest()</pre>"
},
// Legacy anchor dimensions (6290760)
{BUG_ID + FS + "pkg2" + FS + "A.html",
"<a name=\"f(java.lang.Object[])\">" + NL +
"<!-- -->" + NL +
"</a><a name=\"f(T[])\">" + NL +
"<!-- -->" + NL +
"</a>"
},
};
private static final String[][] NEGATED_TEST = NO_TEST;
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestMemberSummary tester = new TestMemberSummary();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,335 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
PrivateParent.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testMemberSummary/pkg/PrivateParent.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
class PrivateParent {
/**
* Test to make sure the member summary inherits documentation
* properly.
*/
public PrivateParent returnTypeTest() {
return this;
}
}
| 1,262 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
PublicChild.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testMemberSummary/pkg/PublicChild.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class PublicChild extends PrivateParent {
public PublicChild returnTypeTest() {
return this;
}
}
| 1,187 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testMemberSummary/pkg2/A.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg2;
public interface A {
void f(Object x);
<T> void f(T[] x);
}
| 1,135 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestHref.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHref/TestHref.java | /*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4663254
* @summary Verify that spaces do not appear in hrefs and anchors.
* @author jamieh
* @library ../lib/
* @build JavadocTester TestHref
* @run main TestHref
*/
public class TestHref extends JavadocTester {
//Test information.
private static final String BUG_ID = "4663254";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-source", "1.5", "-sourcepath", SRC_DIR, "-linkoffline",
"http://java.sun.com/j2se/1.4/docs/api/", SRC_DIR, "pkg"
};
//Input for string search tests.
private static final String[][] TEST = {
//External link.
{BUG_ID + FS + "pkg" + FS + "C1.html",
"href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long, int)\""
},
//Member summary table link.
{BUG_ID + FS + "pkg" + FS + "C1.html",
"href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\""
},
//Anchor test.
{BUG_ID + FS + "pkg" + FS + "C1.html",
"<a name=\"method(int, int, java.util.ArrayList)\">" + NL +
"<!-- -->" + NL +
"</a>"
},
//Backward compatibility anchor test.
{BUG_ID + FS + "pkg" + FS + "C1.html",
"<a name=\"method(int, int, java.util.ArrayList)\">" + NL +
"<!-- -->" + NL +
"</a>"
},
//{@link} test.
{BUG_ID + FS + "pkg" + FS + "C2.html",
"Link: <a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
},
//@see test.
{BUG_ID + FS + "pkg" + FS + "C2.html",
"See Also:</span></dt><dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
},
//Header does not link to the page itself.
{BUG_ID + FS + "pkg" + FS + "C4.html",
"Class C4<E extends C4<E>></h2>"
},
//Signature does not link to the page itself.
{BUG_ID + FS + "pkg" + FS + "C4.html",
"public abstract class <span class=\"strong\">C4<E extends C4<E>></span>"
},
};
private static final String[][] NEGATED_TEST =
{
{WARNING_OUTPUT, "<a> tag is malformed"}
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestHref tester = new TestHref();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,849 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHref/pkg/C2.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import java.util.*;
/**
* Link: {@link pkg.C1#method(int, int, java.util.ArrayList)}
* @see pkg.C1#method(int, int, java.util.ArrayList)
*/
public class C2 {}
| 1,230 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C3.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHref/pkg/C3.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
/**
* <action>
*/
public class C3 {}
| 1,105 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C4.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHref/pkg/C4.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public abstract class C4<E extends C4<E>> {
}
| 1,113 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHref/pkg/C1.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import java.util.*;
/**
* @see java.lang.Object#wait(long, int)
*/
public class C1 {
public <E> void method(int param1, int param2, ArrayList<E> param3) {
}
}
| 1,238 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
VersionNumber.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/VersionNumber/VersionNumber.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4720849
* @summary com.sun.tools.doclets.standard.Standard contains hard-coded version number
* @author dkramer
* @run main VersionNumber
*/
import com.sun.javadoc.*;
import java.util.*;
import java.io.*;
/**
* Runs javadoc and runs regression tests on the resulting HTML.
* It reads each file, complete with newlines, into a string to easily
* find strings that contain newlines.
*/
public class VersionNumber {
private static final String BUGID = "4720849";
private static final String BUGNAME = "VersionNumber";
private static final String FS = System.getProperty("file.separator");
private static final String PS = System.getProperty("path.separator");
private static final String LS = System.getProperty("line.separator");
private static final String TMPDEST_DIR1 = "." + FS + "docs1" + FS;
private static final String TMPDEST_DIR2 = "." + FS + "docs2" + FS;
// Subtest number. Needed because runResultsOnHTML is run twice,
// and subtestNum should increment across subtest runs.
public static int subtestNum = 0;
public static int numSubtestsPassed = 0;
// Entry point
public static void main(String[] args) {
// Directory that contains source files that javadoc runs on
String srcdir = System.getProperty("test.src", ".");
// Test for all cases except the split index page
runJavadoc(new String[] {"-d", TMPDEST_DIR1,
"p1"});
runTestsOnHTML(testArray);
printSummary();
}
/** Run javadoc */
public static void runJavadoc(String[] javadocArgs) {
if (com.sun.tools.javadoc.Main.execute(javadocArgs) != 0) {
throw new Error("Javadoc failed to execute");
}
}
/**
* Assign value for [ stringToFind, filename ]
* NOTE: The standard doclet uses the same separator "\n" for all OS's
*/
private static final String[][] testArray = {
// Test the proper DOCTYPE element is present:
{
"<!-- Generated by javadoc (version",
TMPDEST_DIR1 + "p1" + FS + "C.html" },
};
public static void runTestsOnHTML(String[][] testArray) {
for (int i = 0; i < testArray.length; i++) {
subtestNum += 1;
// Read contents of file into a string
String fileString = readFileToString(testArray[i][1]);
// Get string to find
String stringToFind = testArray[i][0];
// Find string in file's contents
if (findString(fileString, stringToFind) == -1) {
System.out.println("\nSub-test " + (subtestNum)
+ " for bug " + BUGID + " (" + BUGNAME + ") FAILED\n"
+ "when searching for:\n"
+ stringToFind);
} else {
numSubtestsPassed += 1;
System.out.println("\nSub-test " + (subtestNum) + " passed:\n" + stringToFind);
}
}
}
public static void printSummary() {
if ( numSubtestsPassed == subtestNum ) {
System.out.println("\nAll " + numSubtestsPassed + " subtests passed");
} else {
throw new Error("\n" + (subtestNum - numSubtestsPassed) + " of " + (subtestNum)
+ " subtests failed for bug " + BUGID + " (" + BUGNAME + ")\n");
}
}
// Read the file into a String
public static String readFileToString(String filename) {
try {
File file = new File(filename);
if ( !file.exists() ) {
System.out.println("\nFILE DOES NOT EXIST: " + filename);
}
BufferedReader in = new BufferedReader(new FileReader(file));
// Create an array of characters the size of the file
char[] allChars = new char[(int)file.length()];
// Read the characters into the allChars array
in.read(allChars, 0, (int)file.length());
in.close();
// Convert to a string
String allCharsString = new String(allChars);
return allCharsString;
} catch (FileNotFoundException e) {
System.err.println(e);
return "";
} catch (IOException e) {
System.err.println(e);
return "";
}
}
public static int findString(String fileString, String stringToFind) {
return fileString.indexOf(stringToFind);
}
}
| 5,585 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/VersionNumber/p1/C.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p1;
public class C {
/**
* @param classparam C type included for "use"test
* @return String "Hi"
*/
public String publicMethod(C classparam) {
return "Hi";
}
}
| 1,259 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
LeadingSpaces.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testLeadingSpaces/LeadingSpaces.java | /*
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4232882
* @summary Javadoc strips all of the leading spaces when the comment
* does not begin with a star. This RFE allows users to
* begin their comment without a leading star without leading
* spaces striped
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build LeadingSpaces
* @run main LeadingSpaces
*/
public class LeadingSpaces extends JavadocTester {
private static final String BUG_ID = "4232882";
private static final String[][] TEST = {
{BUG_ID + FS + "LeadingSpaces.html",
" 1\n" +
" 2\n" +
" 3\n" +
" 4\n" +
" 5\n" +
" 6\n" +
" 7"}
};
private static final String[][] NEGATED_TEST = NO_TEST;
private static final String[] ARGS =
new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR,
SRC_DIR + FS + "LeadingSpaces.java"};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
LeadingSpaces tester = new LeadingSpaces();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
/**
This leading spaces in the <pre> block below should be
preserved.
<pre>
1
2
3
4
5
6
7
</pre>
*/
public void method(){}
}
| 2,766 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestConstantValuesPage.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testConstantValuesPage/TestConstantValuesPage.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4681599
* @summary Test to make sure that constant values page does not get
* generated when doclet has nothing to document.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestConstantValuesPage
* @run main TestConstantValuesPage
*/
public class TestConstantValuesPage extends JavadocTester {
private static final String BUG_ID = "4681599";
private static final String[][] TEST = NO_TEST;
private static final String[][] NEGATED_TEST = {
{NOTICE_OUTPUT, "constant-values.html..."}
};
private static final String[] ARGS =
new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "foo"};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestConstantValuesPage tester = new TestConstantValuesPage();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 2,259 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestReturnTag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testReturnTag/TestReturnTag.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4490068
* @summary Warn when a return tag is used on a method without a return type.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestReturnTag
* @run main TestReturnTag
*/
public class TestReturnTag extends JavadocTester {
//Test information.
private static final String BUG_ID = "4490068";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, SRC_DIR + FS + "TestReturnTag.java"
};
//Input for string search tests.
private static final String[][] TEST = {
{WARNING_OUTPUT,
"warning - @return tag cannot be used in method with void return type."}
};
private static final String[][] NEGATED_TEST = NO_TEST;
/**
* Trigger warning message when return tag is used on a void method.
*
* @return I really don't return anything.
*/
public void method() {}
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestReturnTag tester = new TestReturnTag();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 2,526 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestSourceTab.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSourceTab/TestSourceTab.java | /*
* Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4510979
* @summary Test to make sure that the source documentation is indented properly
* when -linksourcetab is used.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestSourceTab
* @run main TestSourceTab
*/
import java.io.*;
public class TestSourceTab extends JavadocTester {
private static final String BUG_ID = "4510979";
private static final String TMP_SRC_DIR = "tmpSrc";
private static final String OUTPUT_DIR1 = BUG_ID + "-tabLengthEight";
private static final String OUTPUT_DIR2 = BUG_ID + "-tabLengthFour";
private static final String[][] TEST = NO_TEST;
private static final String[][] NEGATED_TEST = NO_TEST;
//Run Javadoc on a source file with that is indented with a single tab per line
private static final String[] ARGS1 =
new String[] {
"-d", OUTPUT_DIR1, "-sourcepath", TMP_SRC_DIR,
"-notimestamp", "-linksource", TMP_SRC_DIR + FS + "SingleTab" + FS + "C.java"
};
//Run Javadoc on a source file with that is indented with a two tab per line
//If we double the tabs and decrease the tab length by a half, the output should
//be the same as the one generated above.
private static final String[] ARGS2 =
new String[] {
"-d", OUTPUT_DIR2, "-sourcepath", TMP_SRC_DIR,
"-notimestamp", "-sourcetab", "4", TMP_SRC_DIR + FS + "DoubleTab" + FS + "C.java"
};
//Files to diff
private static final String[][] FILES_TO_DIFF = {
{OUTPUT_DIR1 + FS + "src-html" + FS + "C.html",
OUTPUT_DIR2 + FS + "src-html" + FS + "C.html"
},
{OUTPUT_DIR1 + FS + "C.html",
OUTPUT_DIR2 + FS + "C.html"
}
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) throws IOException {
TestSourceTab tester = new TestSourceTab();
run(tester, ARGS1, TEST, NEGATED_TEST);
run(tester, ARGS2, TEST, NEGATED_TEST);
tester.runDiffs(FILES_TO_DIFF);
}
TestSourceTab() throws IOException {
initTabs(new File(SRC_DIR), new File(TMP_SRC_DIR));
}
void initTabs(File from, File to) throws IOException {
for (File f: from.listFiles()) {
File t = new File(to, f.getName());
if (f.isDirectory()) {
initTabs(f, t);
} else if (f.getName().endsWith(".java")) {
write(t, read(f).replace("\\t", "\t"));
}
}
}
String read(File f) throws IOException {
StringBuilder sb = new StringBuilder();
BufferedReader in = new BufferedReader(new FileReader(f));
try {
String line;
while ((line = in.readLine()) != null) {
sb.append(line);
sb.append("\n");
}
} finally {
in.close();
}
return sb.toString();
}
void write(File f, String s) throws IOException {
f.getParentFile().mkdirs();
Writer out = new FileWriter(f);
try {
out.write(s);
} finally {
out.close();
}
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 4,499 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSourceTab/SingleTab/C.java | /*
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* <pre>
*\tThis source
* \tis indented
* \twith tabs.
* </pre>
*/
public class C {
\t//This source
\t//is indented
\t//with tabs.
}
| 1,202 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSourceTab/DoubleTab/C.java | /*
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* <pre>
* \t\tThis source
* \t\tis indented
* \t\twith tabs.
* </pre>
*/
public class C {
\t\t//This source
\t\t//is indented
\t\t//with tabs.
}
| 1,215 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestPackageDeprecation.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6492694
* @summary Test package deprecation.
* @author bpatel
* @library ../lib/
* @build JavadocTester TestPackageDeprecation
* @run main TestPackageDeprecation
*/
public class TestPackageDeprecation extends JavadocTester {
//Test information.
private static final String BUG_ID = "6492694";
//Javadoc arguments.
private static final String[] ARGS1 = new String[]{
"-d", BUG_ID + "-1", "-source", "1.5", "-sourcepath", SRC_DIR, "-use", "pkg", "pkg1",
SRC_DIR + FS + "C2.java", SRC_DIR + FS + "FooDepr.java"
};
private static final String[] ARGS2 = new String[]{
"-d", BUG_ID + "-2", "-source", "1.5", "-sourcepath", SRC_DIR, "-use", "-nodeprecated",
"pkg", "pkg1", SRC_DIR + FS + "C2.java", SRC_DIR + FS + "FooDepr.java"
};
//Input for string search tests.
private static final String[][] TEST1 = {
{BUG_ID + "-1" + FS + "pkg1" + FS + "package-summary.html",
"<div class=\"deprecatedContent\"><span class=\"strong\">Deprecated.</span>" + NL +
"<div class=\"block\"><i>This package is Deprecated.</i></div>"
},
{BUG_ID + "-1" + FS + "deprecated-list.html",
"<li><a href=\"#package\">Deprecated Packages</a></li>"
}
};
private static final String[][] TEST2 = NO_TEST;
private static final String[][] NEGATED_TEST1 = NO_TEST;
private static final String[][] NEGATED_TEST2 = {
{BUG_ID + "-2" + FS + "overview-summary.html", "pkg1"},
{BUG_ID + "-2" + FS + "allclasses-frame.html", "FooDepr"}
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestPackageDeprecation tester = new TestPackageDeprecation();
run(tester, ARGS1, TEST1, NEGATED_TEST1);
run(tester, ARGS2, TEST2, NEGATED_TEST2);
if ((new java.io.File(BUG_ID + "-2" + FS + "pkg1" + FS +
"package-summary.html")).exists()) {
throw new Error("Test Fails: packages summary should not be" +
"generated for deprecated package.");
} else {
System.out.println("Test passes: package-summary.html not found.");
}
if ((new java.io.File(BUG_ID + "-2" + FS + "FooDepr.html")).exists()) {
throw new Error("Test Fails: FooDepr should not be" +
"generated as it is deprecated.");
} else {
System.out.println("Test passes: FooDepr.html not found.");
}
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,892 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackageDeprecation/C2.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Another test class.
*
* @author Bhavesh Patel
*/
public class C2 {
public static enum ModalExclusionType {
/**
* Test comment.
*/
NO_EXCLUDE,
/**
* Another comment.
*/
APPLICATION_EXCLUDE
};
/**
* A string constant.
*/
public static final String CONSTANT1 = "C2";
/**
* A sample method.
*
* @param param some parameter.
*/
public void method(String param) {
}
}
| 1,554 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
FooDepr.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackageDeprecation/FooDepr.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.util.*;
/**
* Test Deprecated class
* @deprecated This class is Deprecated.
*/
public class FooDepr {
public void method(Vector<Object> o){}
}
| 1,214 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackageDeprecation/pkg/A.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class A {
/** Test constant. */
public static final String DEMO= "y";
public static final String THIS_IS_OK= "(x)";
public String DEMO_STRING = "<Hello World>";
public A() {
}
}
| 1,271 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
package-info.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackageDeprecation/pkg1/package-info.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Test pkg1 used.
* @deprecated This package is Deprecated.
*/
package pkg1;
| 1,136 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Foo2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackageDeprecation/pkg1/Foo2.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
public interface Foo2 {}
| 1,092 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ClassUseTest1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackageDeprecation/pkg1/ClassUseTest1.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
public class ClassUseTest1 <T extends Foo & Foo2> {
public <T extends Foo & Foo2> T method(T t) {
return null;
}
}
| 1,199 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Foo.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackageDeprecation/pkg1/Foo.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
import java.util.*;
/**
* Test Deprecated class
* @deprecated This class is Deprecated.
*/
public class Foo {
public void method(Vector<Object> o){}
}
| 1,225 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestTagInheritence.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/TestTagInheritence.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4496223 4496270 4618686 4720974 4812240 6253614 6253604
* @summary <DESC>
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestTagInheritence
* @run main TestTagInheritence
*/
public class TestTagInheritence extends JavadocTester {
private static final String BUG_ID = "4496223-4496270-4618686-4720974-4812240-6253614-6253604";
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", "firstSentence", "firstSentence2"
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
String[][] tests = new String[42][2];
//Test bad inheritDoc tag warning.
tests[0][0]= WARNING_OUTPUT;
tests[0][1] = "warning - @inheritDoc used but testBadInheritDocTag() " +
"does not override or implement any method.";
//Test valid usage of inheritDoc tag.
for (int i = 1; i < tests.length-2; i++) {
tests[i][0] = BUG_ID + FS + "pkg" + FS + "TestTagInheritence.html";
tests[i][1] = "Test " + i + " passes";
}
//First sentence test (6253614)
tests[tests.length - 2][0] =BUG_ID + FS + "firstSentence" + FS +
"B.html";
tests[tests.length - 2][1] = "<div class=\"block\">First sentence.</div>";
//Another first sentence test (6253604)
tests[tests.length - 1][0] =BUG_ID + FS + "firstSentence2" + FS +
"C.html";
tests[tests.length - 1][1] = "<div class=\"block\">First sentence.</div>";
TestTagInheritence tester = new TestTagInheritence();
run(tester, ARGS, tests, NO_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,057 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestTagInheritence.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/pkg/TestTagInheritence.java | /*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import java.lang.*;
import java.io.*;
public class TestTagInheritence extends TestAbstractClass implements TestInterface{
//This method below tests tag inheritence from a class.
public String testAbstractClass_method1(int p1, int p2) throws java.io.IOException,
java.lang.NullPointerException {
return null;
}
/**
* This method tests @inheritDoc with a class. Here is the inherited comment:<br>
* {@inheritDoc}
* @param p1 {@inheritDoc}
* @param p2 {@inheritDoc}
* @return {@inheritDoc}
* @throws java.io.IOException {@inheritDoc}
* @throws java.lang.NullPointerException {@inheritDoc}
*/
public String testAbstractClass_method2(int p1, int p2) throws java.io.IOException,
java.lang.NullPointerException {
return null;
}
public String testInterface_method1(int p1, int p2) throws java.io.IOException,
java.lang.NullPointerException
{
return null;
}
/**
* This method tests @inheritDoc with an inteface. Here is the inherited comment:<br>
* {@inheritDoc}
* @param p1 {@inheritDoc}
* @param p2 {@inheritDoc}
* @return {@inheritDoc}
* @throws java.io.IOException {@inheritDoc}
* @throws java.lang.NullPointerException {@inheritDoc}
*/
public String testInterface_method2(int p1, int p2) throws java.io.IOException,
java.lang.NullPointerException {
return null;
}
/**
* Here is the documentation that I should inherit from
* the interface implemented by my superclass.
* {@inheritDoc}
*/
public void methodInTestInterfaceForAbstractClass() {}
/**
* {@inheritDoc}
*/
public void testSuperSuperMethod() {}
/**
* Test inheritDoc warning message:
* {@inheritDoc}
*/
public void testBadInheritDocTag () {}
/**
* {@inheritDoc}
* @param <X> {@inheritDoc}
* @param <Y> {@inheritDoc}
* @param p1 {@inheritDoc}
* @param p2 {@inheritDoc}
* @return {@inheritDoc}
* @throws java.io.IOException {@inheritDoc}
* @throws java.lang.NullPointerException {@inheritDoc}
*/
public <X,Y> String testSuperSuperMethod(int p1, int p2) {
return null;
}
public <X,Y> String testSuperSuperMethod2(int p1, int p2)
throws java.io.IOException, java.lang.NullPointerException {
return null;
}
}
| 3,396 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestAbstractClass.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/pkg/TestAbstractClass.java | /*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.zip.*;
public abstract class TestAbstractClass extends TestSuperSuperClass
implements TestInterfaceForAbstractClass {
/**
* Test 1 passes.
* @param p1 Test 2 passes.
* @param p2 Test 3 passes.
* @return a string.
* @throws java.io.IOException Test 4 passes.
* @throws java.lang.NullPointerException Test 5 passes.
* @see java.lang.String
* @see java.util.Vector
*/
public String testAbstractClass_method1(int p1, int p2) throws java.io.IOException,
java.lang.NullPointerException {
return null;
}
/**
* Test 6 passes.
* @param p1 Test 7 passes.
* @param p2 Test 8 passes.
* @return a string.
* @throws java.io.IOException Test 9 passes.
* @throws java.lang.NullPointerException Test 10 passes
* @see java.lang.String
* @see java.util.Vector
*/
public String testAbstractClass_method2(int p1, int p2) throws java.io.IOException,
java.lang.NullPointerException {
return null;
}
/**
* Test 31 passes.
* @param <Q> Test 33 passes.
* @param x2 Test 35 passes.
* @throws java.io.IOException Test 37 passes.
* @throws java.util.zip.ZipException Test 39 passes.
*/
public <P,Q> String testSuperSuperMethod2(int x1, int x2) {
return null;
}
}
| 2,417 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestSuperSuperClass.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/pkg/TestSuperSuperClass.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class TestSuperSuperClass {
/**
* Test 23 passes.
* @param <P> Test 24 passes.
* @param <Q> Test 25 passes.
* @param x1 Test 26 passes.
* @param x2 Test 27 passes.
* @return Test 28 passes.
* @throws java.io.IOException Test 29 passes.
* @throws java.lang.NullPointerException Test 30 passes.
*/
public <P,Q> String testSuperSuperMethod(int x1, int x2) {
return null;
}
/**
* @param <P> Test 32 passes.
* @param x1 Test 34 passes.
* @return Test 36 passes.
* @throws java.lang.NullPointerException Test 38 passes.
*/
public <P,Q> String testSuperSuperMethod2(int x1, int x2) {
return null;
}
}
| 1,780 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestInterfaceForAbstractClass.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/pkg/TestInterfaceForAbstractClass.java | /*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public interface TestInterfaceForAbstractClass extends TestSuperSuperInterface {
/**
* Test 21 passes.
*/
public void methodInTestInterfaceForAbstractClass();
}
| 1,251 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestSuperSuperInterface.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/pkg/TestSuperSuperInterface.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public interface TestSuperSuperInterface {
/**
* Test 22 passes.
*/
public void testSuperSuperMethod();
}
| 1,191 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestInterface.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/pkg/TestInterface.java | /*
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import java.util.*;
import java.lang.*;
import java.io.*;
public interface TestInterface {
/**
* Test 11 passes.
* @param p1 Test 12 passes.
* @param p2 Test 13 passes.
* @return a string.
* @throws java.io.IOException Test 14 passes.
* @throws java.lang.NullPointerException Test 15 passes.
* @see java.lang.String
* @see java.util.Vector
*/
public String testInterface_method1(int p1, int p2) throws java.io.IOException,
java.lang.NullPointerException;
/**
* Test 16 passes.
* @param p1 Test 17 passes.
* @param p2 Test 18 passes.
* @return a string.
* @throws java.io.IOException Test 19 passes.
* @throws java.lang.NullPointerException Test 20 passes.
* @see java.lang.String
* @see java.util.Vector
*/
public String testInterface_method2(int p1, int p2) throws java.io.IOException,
java.lang.NullPointerException;
}
| 1,959 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/firstSentence2/C.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package firstSentence2;
public class C extends B {
/**
* {@inheritDoc}
*
* <p>Fifth sentence. Sixth sentence.
*/
public void m() {}
}
| 1,216 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/firstSentence2/A.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package firstSentence2;
public class A {
/**
* First sentence. Second sentence.
*/
public void m() {}
}
| 1,176 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
B.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/firstSentence2/B.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package firstSentence2 ;
public class B extends A {
/**
* {@inheritDoc}
*
* <p>Third sentence. Fourth sentence.
*/
public void m() {}
}
| 1,218 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/firstSentence/A.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package firstSentence;
public class A {
/**
* First sentence. Second sentence.
*/
public void m() {}
}
| 1,175 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
B.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagInheritence/firstSentence/B.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package firstSentence;
public class B extends A {
/**
* {@inheritDoc} Third sentence. Fourth sentence.
*/
public void m() {}
}
| 1,199 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestParamTaglet.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java | /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4802275 4967243
* @summary Make sure param tags are still printed even though they do not
* match up with a real parameters.
* Make sure inheritDoc cannot be used in an invalid param tag.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestParamTaglet
* @run main TestParamTaglet
*/
public class TestParamTaglet extends JavadocTester {
//Test information.
private static final String BUG_ID = "4802275-4967243";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
};
//Input for string search tests.
private static final String[][] TEST = {
//Regular param tags.
{BUG_ID + FS + "pkg" + FS + "C.html",
"<span class=\"strong\">Parameters:</span></dt><dd><code>param1</code> - testing 1 2 3.</dd>" +
"<dd><code>param2</code> - testing 1 2 3."
},
//Param tags that don't match with any real parameters.
{BUG_ID + FS + "pkg" + FS + "C.html",
"<span class=\"strong\">Parameters:</span></dt><dd><code><I>p1</I></code> - testing 1 2 3.</dd>" +
"<dd><code><I>p2</I></code> - testing 1 2 3."
},
//{@inherit} doc misuse does not cause doclet to throw exception.
// Param is printed with nothing inherited.
//XXX: in the future when Configuration is available during doc inheritence,
//print a warning for this mistake.
{BUG_ID + FS + "pkg" + FS + "C.html",
"<code><I>inheritBug</I></code> -"
},
};
private static final String[][] NEGATED_TEST = NO_TEST;
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestParamTaglet tester = new TestParamTaglet();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,271 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testParamTaglet/pkg/C.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class C extends Parent {
/**
* @param param1 testing 1 2 3.
* @param param2 testing 1 2 3.
*/
public void regularParams(int param1, int param2) {}
/**
* @param <I>p1</I> testing 1 2 3.
* @param <I>p2</I> testing 1 2 3.
* @param <I>inheritBug</I> {@inheritDoc}
*/
public void nonMatchingParams(int param1, int param2) {}
}
| 1,449 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Parent.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testParamTaglet/pkg/Parent.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class Parent {
/**
* Just a dummy method that is here for inheritDoc testing purposes.
*/
public void nonMatchingParams(int param1, int param2) {}
}
| 1,241 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestWarnBadParamNames.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testWarnBadParamNames/TestWarnBadParamNames.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4693440
* @summary Test to make sure that warning is printed when bad paramenter
* name is used with param.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestWarnBadParamNames
* @run main TestWarnBadParamNames
*/
public class TestWarnBadParamNames extends JavadocTester {
private static final String BUG_ID = "4693440";
private static final String[][] TEST = {
{WARNING_OUTPUT, "warning - @param argument \"int\" is not a parameter name."},
{WARNING_OUTPUT, "warning - @param argument \"IDontExist\" is not a parameter name."},
{WARNING_OUTPUT, "warning - Parameter \"arg\" is documented more than once."},
};
private static final String[][] NEGATED_TEST = NO_TEST;
private static final String[] ARGS = new String[] {
"-d", BUG_ID, SRC_DIR + FS + "C.java"
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestWarnBadParamNames tester = new TestWarnBadParamNames();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 2,439 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testWarnBadParamNames/C.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class C {
/**
* @param int arg
* @param IDontExist
* @param arg this is a valid comment for parameter arg.
* @param arg this is an invalid comment for a parameter arg
* because it has already been documented above.
*/
public void method(int arg) {}
}
| 1,359 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestTypeParameters.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java | /*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4927167 4974929 7010344
* @summary When the type parameters are more than 10 characters in length,
* make sure there is a line break between type params and return type
* in member summary. Also, test for type parameter links in package-summary and
* class-use pages. The class/annotation pages should check for type
* parameter links in the class/annotation signature section when -linksource is set.
* @author jamieh
* @library ../lib/
* @build JavadocTester TestTypeParameters
* @run main TestTypeParameters
*/
public class TestTypeParameters extends JavadocTester {
//Test information.
private static final String BUG_ID = "4927167-4974929-7010344";
//Javadoc arguments.
private static final String[] ARGS1 = new String[]{
"-d", BUG_ID, "-use", "-source", "1.5", "-sourcepath", SRC_DIR,
"pkg"
};
private static final String[] ARGS2 = new String[]{
"-d", BUG_ID, "-linksource", "-source", "1.5", "-sourcepath", SRC_DIR,
"pkg"
};
//Input for string search tests.
private static final String[][] TEST1 = {
{BUG_ID + FS + "pkg" + FS + "C.html",
"<td class=\"colFirst\"><code><W extends java.lang.String,V extends " +
"java.util.List> <br>java.lang.Object</code></td>"
},
{BUG_ID + FS + "pkg" + FS + "C.html",
"<code><T> java.lang.Object</code>"
},
{BUG_ID + FS + "pkg" + FS + "package-summary.html",
"C</a><E extends <a href=\"../pkg/Parent.html\" " +
"title=\"class in pkg\">Parent</a>>"
},
{BUG_ID + FS + "pkg" + FS + "class-use" + FS + "Foo4.html",
"<a href=\"../../pkg/ClassUseTest3.html\" title=\"class in pkg\">" +
"ClassUseTest3</a><T extends <a href=\"../../pkg/ParamTest2.html\" " +
"title=\"class in pkg\">ParamTest2</a><java.util.List<? extends " +
"<a href=\"../../pkg/Foo4.html\" title=\"class in pkg\">Foo4</a>>>>"
},
//Nested type parameters
{BUG_ID + FS + "pkg" + FS + "C.html",
"<a name=\"formatDetails(java.util.Collection, java.util.Collection)\">" + NL +
"<!-- -->" + NL +
"</a>"
},
};
private static final String[][] TEST2 = {
{BUG_ID + FS + "pkg" + FS + "ClassUseTest3.html",
"public class <a href=\"../src-html/pkg/ClassUseTest3.html#line.28\">" +
"ClassUseTest3</a><T extends <a href=\"../pkg/ParamTest2.html\" " +
"title=\"class in pkg\">ParamTest2</a><java.util.List<? extends " +
"<a href=\"../pkg/Foo4.html\" title=\"class in pkg\">Foo4</a>>>>"
}
};
private static final String[][] NEGATED_TEST = NO_TEST;
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestTypeParameters tester = new TestTypeParameters();
run(tester, ARGS1, TEST1, NEGATED_TEST);
run(tester, ARGS2, TEST2, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 4,489 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Foo4.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTypeParams/pkg/Foo4.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class Foo4 {}
| 1,087 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTypeParams/pkg/C.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import java.util.*;
public class C <E extends Parent> {
/**
* Test case one. This should not cause a line break in the member summary.
*/
public <T> Object shortTypeParamList(T param){ return null; }
/**
* Test case two. This should cause a line break in the member summary.
*/
public <W extends String, V extends List> Object longTypeParamList(W param1,
V param2){ return null; }
public static void formatDetails(Collection<Map<String,String>> job,
Collection<String> include) {}
}
| 1,617 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ParamTest2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTypeParams/pkg/ParamTest2.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class ParamTest2<E> {
}
| 1,097 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ClassUseTest3.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTypeParams/pkg/ClassUseTest3.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import java.util.*;
public class ClassUseTest3 <T extends ParamTest2<List<? extends Foo4>>> {
public ClassUseTest3(Set<Foo4> p) {}
public <T extends ParamTest2<List<? extends Foo4>>> ParamTest2<List<? extends Foo4>> method(T t) {
return null;
}
public void method(Set<Foo4> p) {}
}
| 1,376 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Parent.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTypeParams/pkg/Parent.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class Parent {}
| 1,089 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestTagMisuse.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTagMisuse/TestTagMisuse.java | /*
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 0000000
* @summary Determine if proper warning messages are printed when know.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestTagMisuse
* @run main TestTagMisuse
*/
public class TestTagMisuse extends JavadocTester {
private static final String BUG_ID = "no-bug-id";
private static final String[][] TEST = {
{WARNING_OUTPUT, "warning - Tag @param cannot be used in field documentation."},
{WARNING_OUTPUT, "warning - Tag @throws cannot be used in field documentation."},
{WARNING_OUTPUT, "warning - Tag @return cannot be used in constructor documentation."},
{WARNING_OUTPUT, "warning - Tag @throws cannot be used in inline documentation."},
};
private static final String[][] NEGATED_TEST = NO_TEST;
private static final String[] ARGS = new String[] {
"-d", BUG_ID, SRC_DIR + FS + "TestTagMisuse.java"
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestTagMisuse tester = new TestTagMisuse();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
/**
* {@throws blah}
* Here is a bad field tag:
* @throws foo
* @param foo.
*/
public int field;
/**
* Here is a bad constructor tag:
* @return blah
*/
public TestTagMisuse(){}
}
| 2,721 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
MetaTag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/MetaTag/MetaTag.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.text.SimpleDateFormat;
import java.util.Date;
import com.sun.tools.doclets.formats.html.ConfigurationImpl;
import com.sun.tools.doclets.internal.toolkit.Configuration;
/*
* @test
* @bug 4034096 4764726 6235799
* @summary Add support for HTML keywords via META tag for
* class and member names to improve API search
* @author dkramer
* @library ../lib/
* @build JavadocTester
* @build MetaTag
* @run main MetaTag
*/
public class MetaTag extends JavadocTester {
//Test information.
private static final String BUG_ID = "4034096-4764726-6235799";
private static final String OUTPUT_DIR = "docs-" + BUG_ID;
private static final SimpleDateFormat m_dateFormat = new SimpleDateFormat("yyyy-MM-dd");
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", OUTPUT_DIR,
"-sourcepath", SRC_DIR,
"-keywords",
"-doctitle", "Sample Packages",
"p1", "p2"
};
private static final String[] ARGS_NO_TIMESTAMP_NO_KEYWORDS = new String[] {
"-d", OUTPUT_DIR + "-2",
"-sourcepath", SRC_DIR,
"-notimestamp",
"-doctitle", "Sample Packages",
"p1", "p2"
};
//Input for string search tests.
private static final String[][] TEST = {
{ OUTPUT_DIR + FS + "p1" + FS + "C1.html",
"<meta name=\"keywords\" content=\"p1.C1 class\">" },
{ OUTPUT_DIR + FS + "p1" + FS + "C1.html",
"<meta name=\"keywords\" content=\"field1\">" },
{ OUTPUT_DIR + FS + "p1" + FS + "C1.html",
"<meta name=\"keywords\" content=\"field2\">" },
{ OUTPUT_DIR + FS + "p1" + FS + "C1.html",
"<meta name=\"keywords\" content=\"method1()\">" },
{ OUTPUT_DIR + FS + "p1" + FS + "C1.html",
"<meta name=\"keywords\" content=\"method2()\">" },
{ OUTPUT_DIR + FS + "p1" + FS + "package-summary.html",
"<meta name=\"keywords\" content=\"p1 package\">" },
{ OUTPUT_DIR + FS + "overview-summary.html",
"<meta name=\"keywords\" content=\"Overview, Sample Packages\">" },
//NOTE: Hopefully, this regression test is not run at midnight. If the output
//was generated yesterday and this test is run today, the test will fail.
{OUTPUT_DIR + FS + "overview-summary.html",
"<meta name=\"date\" "
+ "content=\"" + m_dateFormat.format(new Date()) + "\">"},
};
private static final String[][] NEGATED_TEST = NO_TEST;
private static final String[][] TEST2 = NO_TEST;
private static final String[][] NEGATED_TEST2 = {
//No keywords when -keywords is not used.
{ OUTPUT_DIR + "-2" + FS + "p1" + FS + "C1.html",
"<META NAME=\"keywords\" CONTENT=\"p1.C1 class\">" },
{ OUTPUT_DIR + "-2" + FS + "p1" + FS + "C1.html",
"<META NAME=\"keywords\" CONTENT=\"field1\">" },
{ OUTPUT_DIR + "-2" + FS + "p1" + FS + "C1.html",
"<META NAME=\"keywords\" CONTENT=\"field2\">" },
{ OUTPUT_DIR + "-2" + FS + "p1" + FS + "C1.html",
"<META NAME=\"keywords\" CONTENT=\"method1()\">" },
{ OUTPUT_DIR + "-2" + FS + "p1" + FS + "C1.html",
"<META NAME=\"keywords\" CONTENT=\"method2()\">" },
{ OUTPUT_DIR + "-2" + FS + "p1" + FS + "package-summary.html",
"<META NAME=\"keywords\" CONTENT=\"p1 package\">" },
{ OUTPUT_DIR + "-2" + FS + "overview-summary.html",
"<META NAME=\"keywords\" CONTENT=\"Overview Summary, Sample Packages\">" },
//The date metatag should not show up when -notimestamp is used.
//NOTE: Hopefully, this regression test is not run at midnight. If the output
//was generated yesterday and this test is run today, the test will fail.
{OUTPUT_DIR + "-2" + FS + "overview-summary.html",
"<META NAME=\"date\" "
+ "CONTENT=\"" + m_dateFormat.format(new Date()) + "\">"},
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
MetaTag tester = new MetaTag();
Configuration config = ConfigurationImpl.getInstance();
boolean defaultKeywordsSetting = config.keywords;
boolean defaultTimestampSetting = config.notimestamp;
run(tester, ARGS, TEST, NEGATED_TEST);
//Variable needs to be reset because Configuration is a singleton.
config.keywords = defaultKeywordsSetting;
config.notimestamp = defaultTimestampSetting;
run(tester, ARGS_NO_TIMESTAMP_NO_KEYWORDS, TEST2, NEGATED_TEST2);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 6,015 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/MetaTag/p1/C1.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p1;
public class C1 {
public C1() {
}
public C1(Object obj) {
}
public int field1 = 0;
public int field2 = 0;
public int method1() {
return 0;
}
/**
* Overload of method1() to demonstrate how all
* overloads are combined into a single meta keyword
*/
public int method1(String s) {
return 0;
}
public int method2(String s1, String s2) {
return 0;
}
}
| 1,510 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/MetaTag/p2/C2.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p2;
public class C2 {
}
| 1,085 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestTitleInHref.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTitleInHref/TestTitleInHref.java | /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4714257
* @summary Test to make sure that the title attribute shows up in links.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestTitleInHref
* @run main TestTitleInHref
*/
public class TestTitleInHref extends JavadocTester {
private static final String BUG_ID = "4714257";
private static final String[][] TEST = {
//Test to make sure that the title shows up in a class link.
{BUG_ID + FS + "pkg" + FS + "Links.html", "<a href=\"../pkg/Class.html\" title=\"class in pkg\">"},
//Test to make sure that the title shows up in an interface link.
{BUG_ID + FS + "pkg" + FS + "Links.html", "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">"},
//Test to make sure that the title shows up in cross link shows up
{BUG_ID + FS + "pkg" + FS + "Links.html", "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/io/File.html?is-external=true\" title=\"class or interface in java.io\"><code>This is a cross link to class File</code></a>"},
};
private static final String[][] NEGATED_TEST = NO_TEST;
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR,
"-linkoffline", "http://java.sun.com/j2se/1.4/docs/api",
SRC_DIR, "pkg"
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestTitleInHref tester = new TestTitleInHref();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 2,883 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Links.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTitleInHref/pkg/Links.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
/**
* {@link Class This is a link to a class}.<br>
* {@link Interface This is a link to an interface}.
* {@link java.io.File This is a cross link to class File}.
*/
public class Links{}
| 1,257 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Class.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTitleInHref/pkg/Class.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class Class {}
| 1,088 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Interface.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTitleInHref/pkg/Interface.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public interface Interface {}
| 1,096 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestDocRootLink.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testDocRootLink/TestDocRootLink.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6553182
* @summary This test verifies the -Xdocrootparent option.
* @author Bhavesh Patel
* @library ../lib/
* @build JavadocTester TestDocRootLink
* @run main TestDocRootLink
*/
public class TestDocRootLink extends JavadocTester {
private static final String BUG_ID = "6553182";
private static final String[][] TEST1 = {
{BUG_ID + FS + "pkg1" + FS + "C1.html",
"<a href=\"../../technotes/guides/index.html\">"
},
{BUG_ID + FS + "pkg1" + FS + "package-summary.html",
"<a href=\"../../technotes/guides/index.html\">"
}
};
private static final String[][] NEGATED_TEST1 = {
{BUG_ID + FS + "pkg1" + FS + "C1.html",
"<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">"
},
{BUG_ID + FS + "pkg1" + FS + "package-summary.html",
"<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">"
}
};
private static final String[][] TEST2 = {
{BUG_ID + FS + "pkg2" + FS + "C2.html",
"<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">"
},
{BUG_ID + FS + "pkg2" + FS + "package-summary.html",
"<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">"
}
};
private static final String[][] NEGATED_TEST2 = {
{BUG_ID + FS + "pkg2" + FS + "C2.html",
"<a href=\"../../technotes/guides/index.html\">"
},
{BUG_ID + FS + "pkg2" + FS + "package-summary.html",
"<a href=\"../../technotes/guides/index.html\">"
}
};
private static final String[] ARGS1 =
new String[]{
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"
};
private static final String[] ARGS2 =
new String[]{
"-d", BUG_ID, "-Xdocrootparent", "http://download.oracle.com/javase/7/docs", "-sourcepath", SRC_DIR, "pkg2"
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestDocRootLink tester = new TestDocRootLink();
run(tester, ARGS1, TEST1, NEGATED_TEST1);
run(tester, ARGS2, TEST2, NEGATED_TEST2);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,619 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testDocRootLink/pkg2/C2.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg2;
/**
* Class 1. This is a test.
* Refer <a href="{@docRoot}/../technotes/guides/index.html">Here</a>. Lets see if this works
* or not.
*/
public class C2 {}
| 1,227 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testDocRootLink/pkg1/C1.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
/**
* Class 1. This is a test.
* Refer <a href="{@docRoot}/../technotes/guides/index.html">Here</a>. Lets see if this works
* or not.
*/
public class C1 {}
| 1,227 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6735320.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/T6735320/T6735320.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6735320
* @summary javadoc throws exception if serialField value is missing
* @library ../lib/
* @build JavadocTester T6735320
* @run main T6735320
*/
public class T6735320 extends JavadocTester {
private static final String BUG_ID = "6735320";
private static final String[] ARGS = new String[]{
"-d", BUG_ID + ".out",
SRC_DIR + FS + "SerialFieldTest.java"
};
public String getBugId() {
return BUG_ID;
}
public String getBugName() {
return getClass().getName();
}
public static void main(String... args) {
T6735320 tester = new T6735320();
if (tester.runJavadoc(ARGS) != 0) {
throw new AssertionError("non-zero return code from javadoc");
}
if (tester.getErrorOutput().contains("StringIndexOutOfBoundsException")) {
throw new AssertionError("javadoc threw StringIndexOutOfBoundsException");
}
}
}
| 2,014 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SerialFieldTest.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/T6735320/SerialFieldTest.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.ObjectStreamField;
import java.io.Serializable;
public class SerialFieldTest implements Serializable {
/**
* @serialField
*/
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("i", int.class),
};
}
| 1,334 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestNonFrameWarning.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testNonFrameWarning/TestNonFrameWarning.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 7001086
* @summary Test Non-frame warning.
* @author Bhavesh Patel
* @library ../lib/
* @build JavadocTester TestNonFrameWarning
* @run main TestNonFrameWarning
*/
public class TestNonFrameWarning extends JavadocTester {
private static final String BUG_ID = "7001086";
private static final String[][] TEST = {
{BUG_ID + FS + "index.html",
"<p>This document is designed to be viewed using the frames feature. " +
"If you see this message, you are using a non-frame-capable web client. " +
"Link to <a href=\"pkg/package-summary.html\">Non-frame version</a>.</p>"
}
};
private static final String[] ARGS = new String[]{
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestNonFrameWarning tester = new TestNonFrameWarning();
run(tester, ARGS, TEST, NO_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 2,336 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testNonFrameWarning/pkg/C.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
/**
* Source file for C
*/
public class C {
}
| 1,114 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestSerializedForm.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSerializedForm/TestSerializedForm.java | /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.lang.*;
import java.io.*;
/*
* @test
* @bug 4341304 4485668 4966728
* @summary Test that methods readResolve and writeReplace show
* up in serialized-form.html the same way that readObject and writeObject do.
* If the doclet includes readResolve and writeReplace in the serialized-form
* documentation that same way the it includes readObject and writeObject, the
* test passes. This also tests that throws tag information is correctly shown
* in the serialized form page.
* Make sure see tags work in serialized form.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestSerializedForm
* @run main TestSerializedForm
*/
public class TestSerializedForm extends JavadocTester implements Serializable {
private static final String BUG_ID = "4341304-4485668-4966728";
private static final String[][] TEST = {
{BUG_ID + FS + "serialized-form.html",
"protected java.lang.Object readResolve()"},
{BUG_ID + FS + "serialized-form.html",
"protected java.lang.Object writeReplace()"},
{BUG_ID + FS + "serialized-form.html",
"protected java.lang.Object readObjectNoData()"},
{BUG_ID + FS + "serialized-form.html",
"See Also"},
};
private static final String[][] NEGATED_TEST = NO_TEST;
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR,
SRC_DIR + FS + "TestSerializedForm.java"
};
/**
* @serial
* @see TestSerializedForm
*/
public final int SERIALIZABLE_CONSTANT = 1;
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestSerializedForm tester = new TestSerializedForm();
int actualExitCode = run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
/**
* @throws IOException when there is an I/O error.
* @serial
*/
private void readObject(ObjectInputStream s) {}
/**
* @throws IOException when there is an I/O error.
* @serial
*/
private void writeObject(ObjectOutputStream s) {}
/**
* @throws IOException when there is an I/O error.
* @serialData This is a serial data comment.
*/
protected Object readResolve(){return null;}
/**
* @throws IOException when there is an I/O error.
* @serialData This is a serial data comment.
*/
protected Object writeReplace(){return null;}
/**
* @throws IOException when there is an I/O error.
* @serialData This is a serial data comment.
*/
protected Object readObjectNoData() {
return null;
}
}
| 4,030 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
UnderlineTaglet.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testLegacyTaglet/UnderlineTaglet.java | /*
* Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import com.sun.tools.doclets.Taglet;
import com.sun.javadoc.*;
import java.util.Map;
/**
* A sample Inline Taglet representing {@underline ...}. This tag can be used in any kind of
* {@link com.sun.javadoc.Doc}. The text is simple underlined. For
* example, "@underline UNDERLINE ME" would be shown as: <u>UNDERLINE ME</u>.
*
* @author Jamie Ho
* @since 1.4
*/
public class UnderlineTaglet implements Taglet {
private String NAME = "underline";
/**
* Return the name of this custom tag.
*/
public String getName() {
return NAME;
}
/**
* Will return false since this is an inline tag.
* @return false since this is an inline tag.
*/
public boolean inField() {
return false;
}
/**
* Will return false since this is an inline tag.
* @return false since this is an inline tag.
*/
public boolean inConstructor() {
return true;
}
/**
* Will return false since this is an inline tag.
* @return false since this is an inline tag.
*/
public boolean inMethod() {
return false;
}
/**
* Will return false since this is an inline tag.
* @return false since this is an inline tag.
*/
public boolean inOverview() {
return false;
}
/**
* Will return false since this is an inline tag.
* @return false since this is an inline tag.
*/
public boolean inPackage() {
return false;
}
/**
* Will return false since this is an inline tag.
* @return false since this is an inline tag.
*/
public boolean inType() {
return false;
}
/**
* Will return true since this is an inline tag.
* @return true since this is an inline tag.
*/
public boolean isInlineTag() {
return true;
}
/**
* Register this Taglet.
* @param tagletMap the map to register this tag to.
*/
public static void register(Map tagletMap) {
UnderlineTaglet tag = new UnderlineTaglet();
Taglet t = (Taglet) tagletMap.get(tag.getName());
if (t != null) {
tagletMap.remove(tag.getName());
}
tagletMap.put(tag.getName(), tag);
}
/**
* Given the <code>Tag</code> representation of this custom
* tag, return its string representation.
* @param tag he <code>Tag</code> representation of this custom tag.
*/
public String toString(Tag tag) {
return "<u>" + tag.text() + "</u>";
}
/**
* This method should not be called since arrays of inline tags do not
* exist. Method {@link #tostring(Tag)} should be used to convert this
* inline tag to a string.
* @param tags the array of <code>Tag</code>s representing of this custom tag.
*/
public String toString(Tag[] tags) {
return null;
}
}
| 3,935 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testLegacyTaglet/C.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This is an {@underline underline}.
* @todo Finish this class.
*/
public class C {}
| 1,145 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ToDoTaglet.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testLegacyTaglet/ToDoTaglet.java | /*
* Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import com.sun.tools.doclets.Taglet;
import com.sun.javadoc.*;
import java.util.Map;
/**
* A sample Taglet representing @todo. This tag can be used in any kind of
* {@link com.sun.javadoc.Doc}. It is not an inline tag. The text is displayed
* in yellow to remind the developer to perform a task. For
* example, "@todo Fix this!" would be shown as:
* <DL>
* <DT>
* <B>To Do:</B>
* <DD><table cellpadding=2 cellspacing=0><tr><td bgcolor="yellow">Fix this!
* </td></tr></table></DD>
* </DL>
*
* @author Jamie Ho
* @since 1.4
*/
public class ToDoTaglet implements Taglet {
private static final String NAME = "todo";
private static final String HEADER = "To Do:";
/**
* Return the name of this custom tag.
*/
public String getName() {
return NAME;
}
/**
* Will return true since <code>@todo</code>
* can be used in field documentation.
* @return true since <code>@todo</code>
* can be used in field documentation and false
* otherwise.
*/
public boolean inField() {
return true;
}
/**
* Will return true since <code>@todo</code>
* can be used in constructor documentation.
* @return true since <code>@todo</code>
* can be used in constructor documentation and false
* otherwise.
*/
public boolean inConstructor() {
return true;
}
/**
* Will return true since <code>@todo</code>
* can be used in method documentation.
* @return true since <code>@todo</code>
* can be used in method documentation and false
* otherwise.
*/
public boolean inMethod() {
return true;
}
/**
* Will return true since <code>@todo</code>
* can be used in method documentation.
* @return true since <code>@todo</code>
* can be used in overview documentation and false
* otherwise.
*/
public boolean inOverview() {
return true;
}
/**
* Will return true since <code>@todo</code>
* can be used in package documentation.
* @return true since <code>@todo</code>
* can be used in package documentation and false
* otherwise.
*/
public boolean inPackage() {
return true;
}
/**
* Will return true since <code>@todo</code>
* can be used in type documentation (classes or interfaces).
* @return true since <code>@todo</code>
* can be used in type documentation and false
* otherwise.
*/
public boolean inType() {
return true;
}
/**
* Will return false since <code>@todo</code>
* is not an inline tag.
* @return false since <code>@todo</code>
* is not an inline tag.
*/
public boolean isInlineTag() {
return false;
}
/**
* Register this Taglet.
* @param tagletMap the map to register this tag to.
*/
public static void register(Map tagletMap) {
ToDoTaglet tag = new ToDoTaglet();
Taglet t = (Taglet) tagletMap.get(tag.getName());
if (t != null) {
tagletMap.remove(tag.getName());
}
tagletMap.put(tag.getName(), tag);
}
/**
* Given the <code>Tag</code> representation of this custom
* tag, return its string representation.
* @param tag the <code>Tag</code> representation of this custom tag.
*/
public String toString(Tag tag) {
return "<DT><B>" + HEADER + "</B><DD>"
+ "<table cellpadding=2 cellspacing=0><tr><td bgcolor=\"yellow\">"
+ tag.text()
+ "</td></tr></table></DD>\n";
}
/**
* Given an array of <code>Tag</code>s representing this custom
* tag, return its string representation.
* @param tags the array of <code>Tag</code>s representing of this custom tag.
*/
public String toString(Tag[] tags) {
if (tags.length == 0) {
return null;
}
String result = "\n<DT><B>" + HEADER + "</B><DD>";
result += "<table cellpadding=2 cellspacing=0><tr><td bgcolor=\"yellow\">";
for (int i = 0; i < tags.length; i++) {
if (i > 0) {
result += ", ";
}
result += tags[i].text();
}
return result + "</td></tr></table></DD>\n";
}
}
| 5,364 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestLegacyTaglet.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testLegacyTaglet/TestLegacyTaglet.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4638723
* @summary Test to ensure that the refactored version of the standard
* doclet still works with Taglets that implement the 1.4.0 interface.
* @author jamieh
* @library ../lib/
* @compile ../lib/JavadocTester.java
* @compile TestLegacyTaglet.java
* @compile ToDoTaglet.java
* @compile UnderlineTaglet.java
* @run main TestLegacyTaglet
*/
public class TestLegacyTaglet extends JavadocTester {
private static final String BUG_ID = "4638723";
private static final String[] ARGS =
new String[] {"-d", BUG_ID, "-sourcepath", SRC_DIR,
"-tagletpath", SRC_DIR, "-taglet", "ToDoTaglet",
"-taglet", "UnderlineTaglet", SRC_DIR + FS + "C.java"};
private static final String[][] TEST = new String[][] {
{BUG_ID + FS + "C.html", "This is an <u>underline</u>"},
{BUG_ID + FS + "C.html",
"<DT><B>To Do:</B><DD><table cellpadding=2 cellspacing=0><tr>" +
"<td bgcolor=\"yellow\">Finish this class.</td></tr></table></DD>"}};
private static final String[][] NEGATED_TEST = NO_TEST;
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestLegacyTaglet tester = new TestLegacyTaglet();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 2,667 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestDocErrorReporter.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testDocErrorReporter/TestDocErrorReporter.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4927928
* @summary Make sure that option validation errors and sent to the
* DocErrorReporter.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestDocErrorReporter
* @run main TestDocErrorReporter
*/
public class TestDocErrorReporter extends JavadocTester {
//Test information.
private static final String BUG_ID = "4927928";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "-encoding", "xyz",
SRC_DIR + FS + "TestDocErrorReporter.java"
};
//Input for string search tests.
private static final String[][] TEST = NO_TEST;
private static final String[][] NEGATED_TEST = NO_TEST;
//Input for Javadoc return code test.
private static final int EXPECTED_EXIT_CODE = 1;
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestDocErrorReporter tester = new TestDocErrorReporter();
int actualExitCode = run(tester, ARGS, TEST, NEGATED_TEST);
tester.checkExitCode(EXPECTED_EXIT_CODE, actualExitCode);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 2,522 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testUnnamedPackage/C.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This is a class in the unnamed package.
*/
public class C {}
| 1,121 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestUnnamedPackage.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testUnnamedPackage/TestUnnamedPackage.java | /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4904075 4774450 5015144
* @summary Reference unnamed package as "Unnamed", not empty string.
* Generate a package summary for the unnamed package.
* @author jamieh
* @library ../lib/
* @build JavadocTester
* @build TestUnnamedPackage
* @run main TestUnnamedPackage
*/
public class TestUnnamedPackage extends JavadocTester {
//Test information.
private static final String BUG_ID = "4904075-4774450-5015144";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, SRC_DIR + FS + "C.java"
};
//Input for string search tests.
private static final String[][] TEST = {
{BUG_ID + FS + "package-summary.html",
"<h1 title=\"Package\" class=\"title\">Package <Unnamed></h1>"
},
{BUG_ID + FS + "package-summary.html",
"This is a package comment for the unnamed package."
},
{BUG_ID + FS + "package-summary.html",
"This is a class in the unnamed package."
},
{BUG_ID + FS + "package-tree.html",
"<h1 class=\"title\">Hierarchy For Package <Unnamed></h1>"
},
{BUG_ID + FS + "index-all.html",
"title=\"class in <Unnamed>\""
},
{BUG_ID + FS + "C.html", "<a href=\"package-summary.html\">"}
};
private static final String[][] NEGATED_TEST = {
{ERROR_OUTPUT, "BadSource"},
};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
TestUnnamedPackage tester = new TestUnnamedPackage();
run(tester, ARGS, TEST, NEGATED_TEST);
tester.printSummary();
}
/**
* {@inheritDoc}
*/
public String getBugId() {
return BUG_ID;
}
/**
* {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}
| 3,071 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.