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
BaseInterface.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testMemberInheritence/pkg/BaseInterface.java
/* * Copyright (c) 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.lang.annotation.*; public interface BaseInterface { public class NestedClassFromInterface{} public <A extends Annotation> A getAnnotation(Class<A> annotationClass); }
1,256
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/testMemberInheritence/pkg/SubClass.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. */ package pkg; import java.lang.annotation.*; public class SubClass extends BaseClass { public <C extends Annotation> C getAnnotation(Class<C> annotationClass) { return null; } public static void staticMethod(){} }
1,295
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/testMemberInheritence/pkg/BaseClass.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. */ package pkg; import java.lang.annotation.*; public class BaseClass implements BaseInterface { public int pubField = 1; public class pubInnerClass{} public void pubMethod() {} protected int proField = 1; protected class proInnerClass{} protected void proMethod() {} public <B extends Annotation> B getAnnotation(Class<B> annotationClass) { return null; } public static void staticMethod(){} }
1,484
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
X.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testMemberInheritence/diamond/X.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 diamond; public interface X extends A { /** * xDoc. */ void xMethod(); }
1,152
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/testMemberInheritence/diamond/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 diamond; public interface C extends B { /** * cDoc. */ void cMethod(); }
1,152
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
Z.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testMemberInheritence/diamond/Z.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 diamond; public interface Z extends X, C { /** * zDoc. */ void zMethod(); }
1,155
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/testMemberInheritence/diamond/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 diamond; //6256068 public interface A { /** * aDoc. */ void aMethod(); }
1,152
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/testMemberInheritence/diamond/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 diamond; public interface B extends A { /** * bDoc. */ void bMethod(); }
1,152
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/testMemberInheritence/inheritDist/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 inheritDist; public class C implements B { public void m1() {} }
1,130
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/testMemberInheritence/inheritDist/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 inheritDist; //6270645 public interface A { /** * m1-A */ void m1(); }
1,150
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/testMemberInheritence/inheritDist/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 inheritDist; public interface B extends A { /** * m1-B */ void m1(); }
1,150
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestSubTitle.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSubTitle/TestSubTitle.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 7010342 * @summary Test for correct sub title generation. * @author Bhavesh Patel * @library ../lib/ * @build JavadocTester * @build TestSubTitle * @run main TestSubTitle */ public class TestSubTitle extends JavadocTester { private static final String BUG_ID = "7010342"; private static final String[][] TEST = { {BUG_ID + FS + "pkg" + FS + "package-summary.html", "<div class=\"block\">This is the description of package pkg.</div>" }, {BUG_ID + FS + "pkg" + FS + "C.html", "<div class=\"subTitle\">pkg</div>" } }; private static final String[][] NEG_TEST = { {BUG_ID + FS + "pkg" + FS + "package-summary.html", "<p class=\"subTitle\">" + NL + "<div class=\"block\">This is the " + "description of package pkg.</div>" + NL + "</p>" }, {BUG_ID + FS + "pkg" + FS + "C.html", "<p class=\"subTitle\">pkg</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) { TestSubTitle tester = new TestSubTitle(); run(tester, ARGS, TEST, NEG_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,648
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/testSubTitle/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
C.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTaglets/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. */ /** * @foo my only method is {@link #method here} */ public class C { public void method(){} }
1,154
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestTaglets.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testTaglets/TestTaglets.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 4654308 4767038 * @summary Use a Taglet and include some inline tags such as {@link}. The * inline tags should be interpreted properly. * Run Javadoc on some sample source that uses {@inheritDoc}. Make * sure that only the first sentence shows up in the summary table. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestTaglets * @build taglets.Foo * @run main TestTaglets */ public class TestTaglets extends JavadocTester { //Test information. private static final String BUG_ID = "4654308-4767038"; private static final String OUTPUT_DIR = BUG_ID; //Javadoc arguments. private static final String[] ARGS_4654308 = new String[] { "-d", "4654308", "-tagletpath", SRC_DIR, "-taglet", "taglets.Foo", "-sourcepath", SRC_DIR, SRC_DIR + FS + "C.java" }; private static final String[] ARGS_4767038 = new String[] { "-d", "4767038", "-sourcepath", SRC_DIR, SRC_DIR + FS + "Parent.java", SRC_DIR + FS + "Child.java" }; //Input for string search tests. private static final String[][] TEST_4654308 = new String[][] { {"4654308" + FS + "C.html", "<span class=\"strong\">Foo:</span></dt>" + "<dd>my only method is <a href=\"C.html#method()\"><code>here" + "</code></a></dd></dl>"} }; private static final String[][] NEGATED_TEST_4654308 = NO_TEST; private static final String[][] TEST_4767038 = new String[][] { {"4767038" + FS + "Child.html", "This is the first sentence."} }; private static final String[][] NEGATED_TEST_4767038 = NO_TEST; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestTaglets tester = new TestTaglets(); run(tester, ARGS_4654308, TEST_4654308, NEGATED_TEST_4654308); tester.printSummary(); tester = new TestTaglets(); run(tester, ARGS_4767038, TEST_4767038, NEGATED_TEST_4767038); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
3,414
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/testTaglets/Child.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. */ public class Child extends Parent { /** * {@inheritDoc} */ public void method(){} }
1,155
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/testTaglets/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. */ public class Parent { /** * This is the first sentence. This is the second sentence. */ public void method(){} }
1,185
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/testTaglets/taglets/Foo.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. */ package taglets; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.javadoc.*; import java.util.*; public class Foo extends BaseTaglet { public Foo() { name = "foo"; } public static void register(Map tagletMap) { Foo tag = new Foo(); Taglet t = (Taglet) tagletMap.get(tag.getName()); if (t != null) { tagletMap.remove(tag.getName()); } tagletMap.put(tag.getName(), tag); } /** * {@inheritDoc} */ public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) { ArrayList inlineTags = new ArrayList(); inlineTags.add(new TextTag(tag.holder(), "<dt><span class=\"strong\">Foo:</span></dt><dd>")); inlineTags.addAll(Arrays.asList(tag.inlineTags())); inlineTags.add(new TextTag(tag.holder(), "</dd>")); return writer.commentTagsToOutput(tag, (Tag[]) inlineTags.toArray(new Tag[] {})); } }
2,124
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestSuperClassInSerialForm.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSuperclassInSerialForm/TestSuperClassInSerialForm.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 4671694 * @summary Test to make sure link to superclass is generated for * each class in serialized form page. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestSuperClassInSerialForm * @run main TestSuperClassInSerialForm */ public class TestSuperClassInSerialForm extends JavadocTester { private static final String BUG_ID = "4671694"; private static final String[][] TEST = { {BUG_ID + FS + "serialized-form.html", "<a href=\"pkg/SubClass.html\" title=\"class in pkg\">pkg.SubClass</a> extends <a href=\"pkg/SuperClass.html\" title=\"class in pkg\">SuperClass</a>"} }; private static final String[][] NEGATED_TEST = NO_TEST; 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) { TestSuperClassInSerialForm tester = new TestSuperClassInSerialForm(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,418
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
SuperClass.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSuperclassInSerialForm/pkg/SuperClass.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 SuperClass implements java.io.Serializable {}
1,125
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/testSuperclassInSerialForm/pkg/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 pkg; public class SubClass extends SuperClass implements java.io.Serializable {}
1,142
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestHeadings.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHeadings/TestHeadings.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 4905786 6259611 * @summary Make sure that headings use the TH tag instead of the TD tag. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestHeadings * @run main TestHeadings */ public class TestHeadings extends JavadocTester { //Test information. private static final String BUG_ID = "4905786-6259611"; //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "-header", "Test Files", "pkg1", "pkg2" }; //Input for string search tests. private static final String[][] TEST = { //Package summary {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<th class=\"colFirst\" scope=\"col\">" + "Class</th>" + NL + "<th class=\"colLast\" scope=\"col\"" + ">Description</th>" }, // Class documentation {BUG_ID + FS + "pkg1" + FS + "C1.html", "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>" + NL + "<th class=\"colLast\" scope=\"col\">Field and Description</th>" }, {BUG_ID + FS + "pkg1" + FS + "C1.html", "<h3>Methods inherited from class&nbsp;java.lang.Object</h3>" }, // Class use documentation {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html", "<th class=\"colFirst\" scope=\"col\">Package</th>" + NL + "<th class=\"colLast\" scope=\"col\">Description</th>" }, {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html", "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>" + NL + "<th class=\"colLast\" scope=\"col\">Field and Description</th>" }, // Deprecated {BUG_ID + FS + "deprecated-list.html", "<th class=\"colOne\" scope=\"col\">Method and Description</th>" }, // Constant values {BUG_ID + FS + "constant-values.html", "<th class=\"colFirst\" scope=\"col\">" + "Modifier and Type</th>" + NL + "<th scope=\"col\">Constant Field</th>" + NL + "<th class=\"colLast\" scope=\"col\">Value</th>" }, // Serialized Form {BUG_ID + FS + "serialized-form.html", "<h2 title=\"Package\">Package&nbsp;pkg1</h2>" }, {BUG_ID + FS + "serialized-form.html", "<h3>Class <a href=\"pkg1/C1.html\" title=\"class in pkg1\">" + "pkg1.C1</a> extends java.lang.Object implements Serializable</h3>" }, {BUG_ID + FS + "serialized-form.html", "<h3>Serialized Fields</h3>" }, // Overview Frame {BUG_ID + FS + "overview-frame.html", "<h1 title=\"Test Files\" class=\"bar\">Test Files</h1>" }, {BUG_ID + FS + "overview-frame.html", "<title>Overview List</title>" }, // Overview Summary {BUG_ID + FS + "overview-summary.html", "<title>Overview</title>" }, }; 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) { TestHeadings tester = new TestHeadings(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
4,691
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/testHeadings/pkg2/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 pkg2; import pkg1.*; import java.io.Serializable; /** * @serial This is the serial tag's comment. */ public class C2 implements Serializable { public C1 field; public static final String CONSTANT1 = "C2"; public C1 method(C1 param) { return param; } }
1,343
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/testHeadings/pkg1/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 pkg1; import pkg2.*; import java.io.Serializable; /** * @serial This is the serial tag's comment. */ public class C1 implements Serializable { public C2 field; public static final String CONSTANT1 = "C1"; public C2 method(C2 param) { return param; } /** * @deprecated don't use this anymore. */ public void deprecatedMethod() {} }
1,441
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestHelpOption.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHelpOption/TestHelpOption.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 4934778 4777599 6553182 * @summary Make sure that the -help option works properly. Make sure * the help link appears in the documentation. * @author jamieh * @library ../lib/ * @build JavadocTester TestHelpOption * @run main TestHelpOption */ public class TestHelpOption extends JavadocTester { //Test information. private static final String BUG_ID = "4934778-4777599-6553182"; //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-help", SRC_DIR + FS + "TestHelpOption.java" }; private static final String[] ARGS2 = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, SRC_DIR + FS + "TestHelpOption.java" }; private static final String[][] TEST = { {STANDARD_OUTPUT, "-d "}, {STANDARD_OUTPUT, "-use "}, {STANDARD_OUTPUT, "-version "}, {STANDARD_OUTPUT, "-author "}, {STANDARD_OUTPUT, "-docfilessubdirs "}, {STANDARD_OUTPUT, "-splitindex "}, {STANDARD_OUTPUT, "-windowtitle "}, {STANDARD_OUTPUT, "-doctitle "}, {STANDARD_OUTPUT, "-header "}, {STANDARD_OUTPUT, "-footer "}, {STANDARD_OUTPUT, "-bottom "}, {STANDARD_OUTPUT, "-link "}, {STANDARD_OUTPUT, "-linkoffline "}, {STANDARD_OUTPUT, "-excludedocfilessubdir "}, {STANDARD_OUTPUT, "-group "}, {STANDARD_OUTPUT, "-nocomment "}, {STANDARD_OUTPUT, "-nodeprecated "}, {STANDARD_OUTPUT, "-noqualifier "}, {STANDARD_OUTPUT, "-nosince "}, {STANDARD_OUTPUT, "-notimestamp "}, {STANDARD_OUTPUT, "-nodeprecatedlist "}, {STANDARD_OUTPUT, "-notree "}, {STANDARD_OUTPUT, "-noindex "}, {STANDARD_OUTPUT, "-nohelp "}, {STANDARD_OUTPUT, "-nonavbar "}, {STANDARD_OUTPUT, "-serialwarn "}, {STANDARD_OUTPUT, "-tag "}, {STANDARD_OUTPUT, "-taglet "}, {STANDARD_OUTPUT, "-tagletpath "}, {STANDARD_OUTPUT, "-Xdocrootparent "}, {STANDARD_OUTPUT, "-charset "}, {STANDARD_OUTPUT, "-helpfile "}, {STANDARD_OUTPUT, "-linksource "}, {STANDARD_OUTPUT, "-sourcetab "}, {STANDARD_OUTPUT, "-keywords "}, {STANDARD_OUTPUT, "-stylesheetfile "}, {STANDARD_OUTPUT, "-docencoding "}, }; private static final String[][] NEGATED_TEST = NO_TEST; private static final String[][] TEST2 = { {BUG_ID + FS + "TestHelpOption.html", "<li><a href=\"help-doc.html\">Help</a></li>" }, }; private static final String[][] NEGATED_TEST2 = NO_TEST; //The help option should not crash the doclet. private static final int EXPECTED_EXIT_CODE = 0; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestHelpOption tester = new TestHelpOption(); int actualExitCode = run(tester, ARGS, TEST, NEGATED_TEST); tester.checkExitCode(EXPECTED_EXIT_CODE, actualExitCode); run(tester, ARGS2, TEST2, NEGATED_TEST2); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
4,485
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
Bar.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testBaseClass/Bar.java
/* * Copyright (c) 1999, 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. */ import baz.*; /** First line of comments for Bar * Second line of comments for Bar */ public class Bar extends Foo { } // end class Bar
1,198
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestBaseClass.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testBaseClass/TestBaseClass.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 4197513 * @summary Javadoc does not process base class. * @author jamieh * @library ../lib/ * @build BaseClass * @build JavadocTester * @build TestBaseClass * @run main TestBaseClass */ public class TestBaseClass extends JavadocTester { private static final String BUG_ID = "4197513"; private static final String[][] TEST = NO_TEST; private static final String[][] NEGATED_TEST = NO_TEST; private static final String[] ARGS = new String[] { "-sourcepath", SRC_DIR, "-docletpath", SRC_DIR, "-doclet", "BaseClass", SRC_DIR + FS + "Bar.java", "baz"}; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestBaseClass tester = new TestBaseClass(); if (run(tester, ARGS, TEST, NEGATED_TEST) != 0) { throw new Error("Javadoc failed to execute."); } } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,243
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/testBaseClass/BaseClass.java
/* * Copyright (c) 1999, 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. */ /** * Regression test for: * Javadoc does not process base class. If user specifies few classes on the * command line and few packages, with a situation where one of the specified * classes(on the command line) extends a class from one of the packages, then * due to some anomaly in ordering in which all the class and package objects * get constructed, few classes were getting marked as "not included", even * thought they were included in this run and hence documentation for those * packages was wrong. The test case for which javadoc was failing is given * in bug# 4197513. * * @bug 4197513 * @summary Javadoc does not process base class. * @build BaseClass.java * @run shell BaseClassWrapper.sh * @author Atul M Dambalkar */ import com.sun.javadoc.*; public class BaseClass { public static boolean start(RootDoc root) throws Exception { if (!root.classNamed("baz.Foo").isIncluded()) { throw new Exception("Base class is not included: baz.Foo"); } return true; } }
2,076
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/testBaseClass/baz/Foo.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 baz; public class Foo {}
1,086
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestConstantValues.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/constantValues/TestConstantValues.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. */ public class TestConstantValues { /** * Test 1 passes ({@value}). */ public static final int TEST1PASSES = 500000; /** * Test 2 passes ({@value}). */ public static final String TEST2PASSES = "My String"; }
1,304
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestConstantValues2.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/constantValues/TestConstantValues2.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 interface TestConstantValues2 { /** * Test 3 passes ({@value}). */ public static final int TEST3PASSES = 500000; /** * Test 4 passes ({@value}). */ public static final String TEST4PASSES = "My String"; }
1,303
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/constantValues/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 class A { /** Test constant. */ public static final String DEMO= "y<abs(x)"; /** Connection URL for the JDBC Driver. */ public static final String THIS_IS_OK= "y < abs(x)"; public static final String DEMO_STRING = "<Hello World>"; public A() { } }
1,345
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestConstantValuesDriver.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/constantValues/TestConstantValuesDriver.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 4504730 4526070 5077317 * @summary Test the generation of constant-values.html. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestConstantValuesDriver * @run main TestConstantValuesDriver */ public class TestConstantValuesDriver extends JavadocTester { private static final String BUG_ID = "4504730-4526070-5077317"; private static final String[] ARGS = new String[] { "-d", BUG_ID, SRC_DIR + FS + "TestConstantValues.java", SRC_DIR + FS + "TestConstantValues2.java", SRC_DIR + FS + "A.java" }; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { String[][] tests = new String[5][2]; for (int i = 0; i < tests.length-1; i++) { tests[i][0] = BUG_ID + FS + "constant-values.html"; tests[i][1] = "TEST"+(i+1)+"PASSES"; } tests[tests.length-1][0] = BUG_ID + FS + "constant-values.html"; tests[tests.length-1][1] = "<code>\"&lt;Hello World&gt;\"</code>"; TestConstantValuesDriver tester = new TestConstantValuesDriver(); run(tester, ARGS, tests, NO_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } /** * @throws java.io.IOException Test 1 passes * @throws java.io.IOException Test 2 passes * @throws java.lang.NullPointerException comment three * @throws java.io.IOException Test 3 passes */ public void method(){} }
2,780
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestDupParamWarn.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testDupParamWarn/TestDupParamWarn.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 4745855 * @summary Test to ensure that the doclet does not print out bad * warning messages about duplicate param tags. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestDupParamWarn * @run main TestDupParamWarn */ public class TestDupParamWarn extends JavadocTester { private static final String BUG_ID = "4745855"; private static final String[] ARGS = new String[] {"-d", BUG_ID, "-sourcepath", SRC_DIR + FS, "pkg"}; private static final String[][] NEGATED_TEST = new String[][] {{WARNING_OUTPUT, "Parameter \"a\" is documented more than once."}}; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { run(new TestDupParamWarn(), ARGS, NO_TEST, NEGATED_TEST); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,150
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
Bar.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testDupParamWarn/pkg/Bar.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 Bar { /** * @param a blah. * @param b blah. */ void method(int a, int b); }
1,184
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/testDupParamWarn/pkg/Foo.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 Foo extends Bar { /** * @param a blah. * @param b blah. */ void method(int a, int b); }
1,196
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestGroupOption.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testGroupOption/TestGroupOption.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 4924383 * @summary Test to make sure the -group option does not cause a bad warning * to be printed. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestGroupOption * @run main TestGroupOption */ public class TestGroupOption extends JavadocTester { //Test information. private static final String BUG_ID = "4924383"; //Javadoc arguments. private static final String[] ARGS1 = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-group", "Package One", "pkg1", "-group", "Package Two", "pkg2", "-group", "Package Three", "pkg3", "pkg1", "pkg2", "pkg3" }; private static final String[] ARGS2 = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-group", "Package One", "pkg1", "-group", "Package One", "pkg2", "-group", "Package One", "pkg3", "pkg1", "pkg2", "pkg3" }; //Input for string search tests. private static final String[][] TEST1 = NO_TEST; private static final String[][] NEGATED_TEST1 = {{WARNING_OUTPUT, "-group"}}; private static final String[][] TEST2 = {{WARNING_OUTPUT, "-group"}}; private static final String[][] NEGATED_TEST2 = NO_TEST; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { //Make sure the warning is not printed when -group is used correctly. TestGroupOption tester = new TestGroupOption(); run(tester, ARGS1, TEST1, NEGATED_TEST1); tester.printSummary(); //Make sure the warning is printed when -group is not used correctly. tester = new TestGroupOption(); run(tester, ARGS2, TEST2, NEGATED_TEST2); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
3,107
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/testGroupOption/pkg2/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 pkg2; public class C {}
1,085
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/testGroupOption/pkg3/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 pkg3; public class C {}
1,085
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/testGroupOption/pkg1/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 pkg1; public class C {}
1,085
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestNotifications.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testNotifications/TestNotifications.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 4657239 4775743 * @summary Make sure a notification is printed when an output directory must * be created. * Make sure classname is not include in javadoc usage message. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestNotifications * @run main TestNotifications */ public class TestNotifications extends JavadocTester { //Test information. private static final String BUG_ID = "4657239"; //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" }; private static final String[] ARGS2 = new String[] { "-help" }; //Input for string search tests. private static final String[][] TEST = { {NOTICE_OUTPUT, "Creating destination directory: \"4657239"} }; private static final String[][] NEGATED_TEST = { {NOTICE_OUTPUT, "Creating destination directory: \"4657239"} }; private static final String[][] NEGATED_TEST2 = { {NOTICE_OUTPUT, "[classnames]"} }; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestNotifications tester = new TestNotifications(); // Notify that the destination directory must be created. run(tester, ARGS, TEST, NO_TEST); // No need to notify that the destination must be created because // it already exists. run(tester, ARGS, NO_TEST, NEGATED_TEST); //Make sure classname is not include in javadoc usage message. run(tester, ARGS2, NO_TEST, NEGATED_TEST2); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
3,000
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/testNotifications/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 {}
1,084
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestPackagePage.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackagePage/TestPackagePage.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 4492643 4689286 * @summary Test that a package page is properly generated when a .java file * passed to Javadoc. Also test that the proper package links are generated * when single or multiple packages are documented. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestPackagePage * @run main TestPackagePage */ public class TestPackagePage extends JavadocTester { private static final String BUG_ID = "4492643-4689286"; private static final String[][] TEST1 = { {BUG_ID + "-1" + FS + "com" + FS + "pkg" + FS + "package-summary.html", "This is a package page." }, //With just one package, all general pages link to the single package page. {BUG_ID + "-1" + FS + "com" + FS + "pkg" + FS + "C.html", "<a href=\"../../com/pkg/package-summary.html\">Package</a>" }, {BUG_ID + "-1" + FS + "com" + FS + "pkg" + FS + "package-tree.html", "<li><a href=\"../../com/pkg/package-summary.html\">Package</a></li>" }, {BUG_ID + "-1" + FS + "deprecated-list.html", "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>" }, {BUG_ID + "-1" + FS + "index-all.html", "<li><a href=\"./com/pkg/package-summary.html\">Package</a></li>" }, {BUG_ID + "-1" + FS + "help-doc.html", "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>" }, }; private static final String[][] TEST2 = { //With multiple packages, there is no package link in general pages. {BUG_ID + "-2" + FS + "deprecated-list.html", "<li>Package</li>" }, {BUG_ID + "-2" + FS + "index-all.html", "<li>Package</li>" }, {BUG_ID + "-2" + FS + "help-doc.html", "<li>Package</li>" }, }; private static final String[] ARGS1 = new String[] { "-d", BUG_ID + "-1", "-sourcepath", SRC_DIR, SRC_DIR + FS + "com" + FS + "pkg" + FS + "C.java" }; private static final String[] ARGS2 = new String[] { "-d", BUG_ID + "-2", "-sourcepath", SRC_DIR, "com.pkg", "pkg2" }; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestPackagePage tester = new TestPackagePage(); run(tester, ARGS1, TEST1, NO_TEST); run(tester, ARGS2, TEST2, NO_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
C.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testPackagePage/pkg2/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 pkg2; /** * Just a dummy class in a dummy package. */ public class C {}
1,135
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/testPackagePage/com/pkg/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 com.pkg; public class C {}
1,088
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
DocumentedClass.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/5093723/DocumentedClass.java
/* * Copyright 2009 Google, Inc. 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. */ /** A documented class. */ public class DocumentedClass extends UndocumentedClass { /** {@link #method} */ public void m1() {} /** {@link #publicMethod} */ public void m2() {} /** {@link #protectedMethod} */ public void m3() {} /** {@link #privateMethod} */ public void m4() {} }
1,327
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
UndocumentedClass.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/5093723/UndocumentedClass.java
/* * Copyright 2009 Google, Inc. 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. */ class UndocumentedClass { void method() {} public void publicMethod() {} protected void protectedMethod() {} private void privateMethod() {} }
1,190
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
T5093723.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/5093723/T5093723.java
/* * Copyright 2009 Google, Inc. 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 5093723 * @summary REGRESSION: ClassCastException in SingleIndexWriter * @library ../lib/ * @build JavadocTester * @build T5093723 * @run main T5093723 */ public class T5093723 extends JavadocTester { private static final String BUG_ID = "5093723"; private static final String[] ARGS = new String[] { "-d", BUG_ID + ".out", "-source", "5", SRC_DIR + "/DocumentedClass.java", SRC_DIR + "/UndocumentedClass.java" }; public static void main(String... args) { T5093723 tester = new T5093723(); if (tester.runJavadoc(ARGS) != 0) throw new AssertionError("non-zero return code from javadoc"); } public String getBugId() { return BUG_ID; } public String getBugName() { return getClass().getName(); } }
1,873
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestJavascript.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java
/* * Copyright (c) 2004, 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 4665566 4855876 7025314 * @summary Verify that the output has the right javascript. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestJavascript * @run main TestJavascript */ public class TestJavascript extends JavadocTester { //Test information. private static final String BUG_ID = "4665566-4855876"; //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", SRC_DIR + FS + "TestJavascript.java" }; //Input for string search tests. private static final String[][] TEST = { {BUG_ID + FS + "pkg" + FS + "C.html", "<a href=\"../index.html?pkg/C.html\" target=\"_top\">Frames</a>"}, {BUG_ID + FS + "TestJavascript.html", "<a href=\"index.html?TestJavascript.html\" target=\"_top\">Frames</a>"}, {BUG_ID + FS + "index.html", "<script type=\"text/javascript\">" + NL + " targetPage = \"\" + window.location.search;" + NL + " if (targetPage != \"\" && targetPage != \"undefined\")" + NL + " targetPage = targetPage.substring(1);" + NL + " if (targetPage.indexOf(\":\") != -1)" + NL + " targetPage = \"undefined\";" + NL + " function loadFrames() {" + NL + " if (targetPage != \"\" && targetPage != \"undefined\")" + NL + " top.classFrame.location = top.targetPage;" + NL + " }" + NL + "</script>"}, //Make sure title javascript only runs if is-external is not true {BUG_ID + FS + "pkg" + FS + "C.html", " if (location.href.indexOf('is-external=true') == -1) {" + NL + " parent.document.title=\"C\";" + NL + " }"}, }; 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) { TestJavascript tester = new TestJavascript(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
3,531
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/testJavascript/pkg/C.java
/* * Copyright (c) 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 C {}
1,084
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestExternalOverridenMethod.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.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 4857717 * @summary Test to make sure that externally overriden and implemented methods * are documented properly. The method should still include "implements" or * "overrides" documentation even though the method is external. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestExternalOverridenMethod * @run main TestExternalOverridenMethod */ public class TestExternalOverridenMethod extends JavadocTester { private static final String BUG_ID = "4857717"; private static final String[][] TEST = { {BUG_ID + FS + "pkg" + FS + "XReader.html", "<dt><strong>Overrides:</strong></dt>" + NL + "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true#read()\" " + "title=\"class or interface in java.io\">read</a></code>&nbsp;in class&nbsp;<code>" + "<a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true\" " + "title=\"class or interface in java.io\">FilterReader</a></code></dd>"}, {BUG_ID + FS + "pkg" + FS + "XReader.html", "<dt><strong>Specified by:</strong></dt>" + NL + "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true#readInt()\" " + "title=\"class or interface in java.io\">readInt</a></code>&nbsp;in interface&nbsp;<code>" + "<a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true\" " + "title=\"class or interface in java.io\">DataInput</a></code></dd>"}}; 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.1/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) { TestExternalOverridenMethod tester = new TestExternalOverridenMethod(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
3,509
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
XReader.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testExternalOverridenMethod/pkg/XReader.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.io.*; public abstract class XReader extends FilterReader implements DataInput { /** * This tests overridding an external method. */ public int read() throws IOException { return 'W'; } /** * This tests implementing an external method. */ public int readInt() throws IOException { return 'W'; } }
1,429
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestAbsLinkPath.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testAbsLinkPath/TestAbsLinkPath.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 4640745 * @summary This test verifys that the -link option handles absolute paths. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestAbsLinkPath * @run main TestAbsLinkPath */ public class TestAbsLinkPath extends JavadocTester { private static final String BUG_ID = "4640745"; private static final String[][] TEST = { {"tmp" + FS + "pkg1" + FS + "C1.html", "C2.html"}}; private static final String[][] NEGATED_TEST = NO_TEST; private static final String[] ARGS1 = new String[] { "-d", "tmp2", "-sourcepath", SRC_DIR, "pkg2"}; private static final String[] ARGS2 = new String[] { "-d", "tmp", "-sourcepath", SRC_DIR, "-link", ".." + FS + "tmp2", "pkg1"}; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestAbsLinkPath tester = new TestAbsLinkPath(); run(tester, ARGS1, NO_TEST, NO_TEST); run(tester, ARGS2, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,394
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/testAbsLinkPath/pkg2/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 pkg2; /** * Class 2 */ public class C2 {}
1,105
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/testAbsLinkPath/pkg1/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 pkg1; import pkg2.*; /** * Class 1 */ public class C1 extends C2 {}
1,133
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestDocRootTag.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testDocRootInlineTag/TestDocRootTag.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. */ /** * Here is the use of link: {@link java.io.File File} * Here is the use of docRoot: <a href="{@docRoot}/glossary.html">glossary</a>. * Here is the use of link: {@link java.io.File Second File Link} */ public class TestDocRootTag {}
1,297
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestDocRootInlineTag.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testDocRootInlineTag/TestDocRootInlineTag.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 4369014 4851991 * @summary Determine if the docRoot inline tag works properly. * If docRoot performs as documented, the test passes. * Make sure that the docRoot tag works with the -bottom option. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestDocRootInlineTag * @run main TestDocRootInlineTag */ public class TestDocRootInlineTag extends JavadocTester { private static final String BUG_ID = "4369014-4851991"; private static final String[][] TEST = { {BUG_ID + FS + "TestDocRootTag.html", "<a href=\"http://www.java.sun.com/j2se/1.4/docs/api/java/io/File.html?is-external=true\" " + "title=\"class or interface in java.io\"><code>File</code></a>"}, {BUG_ID + FS + "TestDocRootTag.html", "<a href=\"./glossary.html\">glossary</a>"}, {BUG_ID + FS + "TestDocRootTag.html", "<a href=\"http://www.java.sun.com/j2se/1.4/docs/api/java/io/File.html?is-external=true\" " + "title=\"class or interface in java.io\"><code>Second File Link</code></a>"}, {BUG_ID + FS + "TestDocRootTag.html", "The value of @docRoot is \"./\""}, {BUG_ID + FS + "index-all.html", "My package page is " + "<a href=\"./pkg/package-summary.html\">here</a>"} }; private static final String[][] NEGATED_TEST = NO_TEST; private static final String[] ARGS = new String[] { "-bottom", "The value of @docRoot is \"{@docRoot}\"", "-d", BUG_ID, "-sourcepath", SRC_DIR, "-linkoffline", "http://www.java.sun.com/j2se/1.4/docs/api", SRC_DIR, SRC_DIR + FS + "TestDocRootTag.java", "pkg" }; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestDocRootInlineTag tester = new TestDocRootInlineTag(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
3,273
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/testDocRootInlineTag/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; /** * My package page is <a href="{@docRoot}/pkg/package-summary.html">here</a> * */ public class C {}
1,172
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/testSummaryHeading/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. */ public class C {}
1,070
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestSummaryHeading.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSummaryHeading/TestSummaryHeading.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 4904036 * @summary Document a class that does not have any methods to document. The * "Method Summary" heading should still show up since the class * inherits methods. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestSummaryHeading * @run main TestSummaryHeading */ public class TestSummaryHeading extends JavadocTester { //Test information. private static final String BUG_ID = "4904036"; //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 + "C.html", "<h3>Method Summary</h3>"} }; 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) { TestSummaryHeading tester = new TestSummaryHeading(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,430
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestHiddenMembers.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHiddenMembers/TestHiddenMembers.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 4492178 * @summary Test to make sure that hidden overriden members are not * documented as inherited. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestHiddenMembers * @run main TestHiddenMembers */ public class TestHiddenMembers extends JavadocTester { private static final String BUG_ID = "4492178"; private static final String[][] TEST = NO_TEST; //We should not inherit any members from BaseClass because they are all overriden and hidden //(declared as private). private static final String[][] NEGATED_TEST = { {BUG_ID + FS + "pkg" + FS + "SubClass.html", "inherited from class pkg.<A HREF=\"../pkg/BaseClass.html\">BaseClass</A>"} }; 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) { TestHiddenMembers tester = new TestHiddenMembers(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,449
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/testHiddenMembers/pkg/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 pkg; public class SubClass extends BaseClass { private int pubField = 1; private class pubInnerClass{} private void pubMethod() {} }
1,204
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/testHiddenMembers/pkg/BaseClass.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 BaseClass { public int pubField = 1; public class pubInnerClass{} public void pubMethod() {} }
1,184
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
AccessFrameTitle.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/AccessFrameTitle/AccessFrameTitle.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 4636655 * @summary Add title attribute to <FRAME> tags for accessibility * @author dkramer * @run main AccessFrameTitle */ 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 AccessFrameTitle { private static final String BUGID = "4636655"; private static final String BUGNAME = "AccessFrameTitle"; private static final String FS = System.getProperty("file.separator"); private static final String PS = System.getProperty("path.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, "-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 = { // Testing only for the presence of the title attributes. // To make this test more robust, only // the initial part of each title string is tested for, // in case the ending part of the string later changes { "title=\"All classes and interfaces (except non-static nested types)\"", TMPDEST_DIR1 + "index.html" }, { "title=\"All Packages\"", TMPDEST_DIR1 + "index.html" }, { "title=\"Package, class and interface descriptions\"", TMPDEST_DIR1 + "index.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,976
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/AccessFrameTitle/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 { }
1,085
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/AccessFrameTitle/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
TestAnnotationTypes.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java
/* * Copyright (c) 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. */ /* * @test * @bug 4973609 * @summary Make sure that annotation types with 0 members does not have * extra HR tags. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestAnnotationTypes * @run main TestAnnotationTypes */ public class TestAnnotationTypes extends JavadocTester { //Test information. private static final String BUG_ID = "4973609"; //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-source", "1.5", "pkg" }; //Input for string search tests. private static final String[][] TEST = NO_TEST; private static final String[][] NEGATED_TEST = { {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", "<HR>" + NL + NL + "<P>" + NL + NL + "<P>" + "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>"} }; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestAnnotationTypes tester = new TestAnnotationTypes(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,472
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
AnnotationType.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testAnnotationTypes/pkg/AnnotationType.java
/* * Copyright (c) 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.lang.annotation.*; /** * This is just a test annotation type. * * @author Jamie Ho. * @since 1.5 */ @Documented public @interface AnnotationType { }
1,234
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestHtmlStrongTag.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java
/* * Copyright (c) 1999, 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. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * 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 6786028 * @summary This test verifys the use of <strong> HTML tag instead of <B> by Javadoc std doclet. * @author Bhavesh Patel * @library ../lib/ * @build JavadocTester * @build TestHtmlStrongTag * @run main TestHtmlStrongTag */ public class TestHtmlStrongTag extends JavadocTester { private static final String BUG_ID = "6786028"; private static final String[][] TEST1 = { {BUG_ID + FS + "pkg1" + FS + "C1.html", "<span class=\"strong\">See Also:</span>"}}; private static final String[][] NEGATED_TEST1 = { {BUG_ID + FS + "pkg1" + FS + "C1.html", "<STRONG>Method Summary</STRONG>"}, {BUG_ID + FS + "pkg1" + FS + "C1.html", "<B>"}, {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<STRONG>Class Summary</STRONG>"}}; private static final String[][] TEST2 = { {BUG_ID + FS + "pkg2" + FS + "C2.html", "<B>Comments:</B>"}}; private static final String[][] NEGATED_TEST2 = { {BUG_ID + FS + "pkg2" + FS + "C2.html", "<STRONG>Method Summary</STRONG>"}, {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<STRONG>Class Summary</STRONG>"}}; private static final String[] ARGS1 = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS2 = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg2"}; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestHtmlStrongTag tester = new TestHtmlStrongTag(); 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,175
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/testHtmlStrongTag/pkg2/C2.java
/* * Copyright (c) 1999, 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. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * 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; /** * <B>Comments:</B> Class 2 */ public class C2 {}
1,284
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/testHtmlStrongTag/pkg1/C1.java
/* * Copyright (c) 1999, 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. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * 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; /** * @see java.lang.Object#wait(long, int) */ public class C1 { public void method(int param1, int param2) { } }
1,355
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestSerializedFormDeprecationInfo.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
/* * Copyright (c) 2009, 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. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * 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 6802694 * @summary This test verifies deprecation info in serialized-form.html. * @author Bhavesh Patel * @library ../lib/ * @build JavadocTester * @build TestSerializedFormDeprecationInfo * @run main TestSerializedFormDeprecationInfo */ public class TestSerializedFormDeprecationInfo extends JavadocTester { private static final String BUG_ID = "6802694"; // Test for normal run of javadoc. The serialized-form.html should // display the inline comments, tags and deprecation information if any. private static final String[][] TEST_CMNT_DEPR = { {BUG_ID + FS + "serialized-form.html", "<dl>" + "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" + "java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" + "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"}, {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + "&nbsp;<i>As of JDK version 1.5, replaced by" + NL + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL + "<div class=\"block\">This field indicates whether the C1 " + "is undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL + " <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"}, {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + "&nbsp;<i>As of JDK version 1.5, replaced by" + NL + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL + "<div class=\"block\">Reads the object stream.</div>" + NL + "<dl><dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code><code>" + "IOException</code></code></dd>" + NL + "<dd><code>java.io.IOException</code></dd></dl>"}, {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + "&nbsp;</div>" + NL + "<div class=\"block\">" + "The name for this class.</div>"}}; // Test with -nocomment option. The serialized-form.html should // not display the inline comments and tags but should display deprecation // information if any. private static final String[][] TEST_NOCMNT = { {BUG_ID + FS + "serialized-form.html", "<pre>boolean undecorated</pre>" + NL + "<div class=\"block\"><span class=\"strong\">Deprecated.</span>&nbsp;<i>" + "As of JDK version 1.5, replaced by" + NL + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>" + "setUndecorated(boolean)</code></a>.</i></div>" + NL + "</li>"}, {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">" + "Deprecated.</span>&nbsp;<i>As of JDK version" + " 1.5, replaced by" + NL + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL + "</li>"}}; // Test with -nodeprecated option. The serialized-form.html should // ignore the -nodeprecated tag and display the deprecation info. This // test is similar to the normal run of javadoc in which inline comment, tags // and deprecation information will be displayed. private static final String[][] TEST_NODEPR = TEST_CMNT_DEPR; // Test with -nodeprecated and -nocomment options. The serialized-form.html should // ignore the -nodeprecated tag and display the deprecation info but should not // display the inline comments and tags. This test is similar to the test with // -nocomment option. private static final String[][] TEST_NOCMNT_NODEPR = TEST_NOCMNT; private static final String[] ARGS1 = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS2 = new String[] { "-d", BUG_ID, "-nocomment", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS3 = new String[] { "-d", BUG_ID, "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS4 = new String[] { "-d", BUG_ID, "-nocomment", "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestSerializedFormDeprecationInfo tester = new TestSerializedFormDeprecationInfo(); tester.exactNewlineMatch = false; run(tester, ARGS1, TEST_CMNT_DEPR, TEST_NOCMNT); run(tester, ARGS2, TEST_NOCMNT, TEST_CMNT_DEPR); run(tester, ARGS3, TEST_NODEPR, TEST_NOCMNT_NODEPR); run(tester, ARGS4, TEST_NOCMNT_NODEPR, TEST_NODEPR); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
6,815
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/testSerializedFormDeprecationInfo/pkg1/C2.java
/* * Copyright (c) 2009, 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. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * 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.io.ObjectInputStream; import java.io.IOException; import java.io.Serializable; /** * A class comment for testing. * * @author Bhavesh Patel * @see C1 * @since JDK1.0 */ public class C2 implements Serializable { /** * This field indicates title. */ String title; public static enum ModalType { NO_EXCLUDE }; /** * Constructor. * */ public C2() { } public C2(String title) { } /** * Set visible. * * @param set boolean * @since 1.4 * @deprecated As of JDK version 1.5, replaced by * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}. */ @Deprecated public void setVisible(boolean set) { } /** * Reads the object stream. * * @param s ObjectInputStream * @throws <code>IOException</code> * @deprecated As of JDK version 1.5, replaced by * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}. */ @Deprecated public void readObject(ObjectInputStream s) throws IOException { } }
2,333
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/testSerializedFormDeprecationInfo/pkg1/C3.java
/* * Copyright (c) 2009, 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. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * 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.io.Serializable; /** * Test for Serializable * * @author Bhavesh Patel * @deprecated This class is no longer used. */ @Deprecated public abstract class C3 implements Serializable { /** * The name for this class. * * @serial */ private String name; /** * @serial */ private int publicKey; /** * Constructor for serialization only. */ protected C3() { } /** * Prints general information. * */ public void printInfo() { } }
1,763
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/testSerializedFormDeprecationInfo/pkg1/C1.java
/* * Copyright (c) 2009, 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. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * 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.io.IOException; import java.io.Serializable; /** * A class comment for testing. * * @author Bhavesh Patel * @see C2 * @since JDK1.0 */ public class C1 implements Serializable { /** * This field indicates whether the C1 is undecorated. * * @see #setUndecorated(boolean) * @since 1.4 * @serial * @deprecated As of JDK version 1.5, replaced by * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}. */ @Deprecated public boolean undecorated = false; private String title; /** * This enum specifies the possible modal exclusion types. * * @since 1.6 */ public static enum ModalExclusionType { /** * No modal exclusion. */ NO_EXCLUDE, /** * <code>APPLICATION_EXCLUDE</code> indicates that a top-level window * won't be blocked by any application-modal dialogs. Also, it isn't * blocked by document-modal dialogs from outside of its child hierarchy. */ APPLICATION_EXCLUDE }; /** * Constructor. * * @param title the title * @param test boolean value * @exception IllegalArgumentException if the <code>owner</code>'s * <code>GraphicsConfiguration</code> is not from a screen device * @exception HeadlessException */ public C1(String title, boolean test) { } public C1(String title) { } /** * Method comments. * @param undecorated <code>true</code> if no decorations are * to be enabled; * <code>false</code> if decorations are to be enabled. * @see #readObject() * @since 1.4 */ public void setUndecorated(boolean undecorated) { /* Make sure we don't run in the middle of peer creation.*/ } /** * @see #setUndecorated(boolean) */ public void readObject() throws IOException { } }
3,184
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
ModifierAbstract.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testModifier/ModifierAbstract.java
/* * Copyright (c) 1999, 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. */ /** * Regression test for: * Javadoc puts abstract keyword in the modifier string for the interfaces. * Keyword `abstract' is not necessary since interfaces are implicitly * abstract. * * @bug 4210388 * @summary Javadoc declares interfaces to be "abstract". * @build ModifierAbstract.java * @run shell ModifierAbstractWrapper.sh * @author Atul M Dambalkar */ import com.sun.javadoc.*; import java.lang.*; public class ModifierAbstract { public static boolean start(RootDoc root) throws Exception { ClassDoc[] classarr = root.classes(); for (int i = 0; i < classarr.length; i++) { if (classarr[i].isInterface()) { String modifier = classarr[i].modifiers(); if (modifier.indexOf("abstract") > 0) { throw new Exception("Keyword `abstract' found in the " + "modifier string for class " + classarr[i].qualifiedName()); } } } return true; } }
2,079
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/testModifier/Interface.java
/* * Copyright (c) 1999, 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 interface Interface { public void method(); }
1,114
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
Test.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testModifier/Test.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 Test { /** * Test1 for first sentence<p> This is second sentence. */ public String testStr1; /** * Test2 for first sentence</p> This is second sentence. */ public String testStr2; /** * Test3 for first sentence<pre> This is second sentence.</pre> */ public String testStr3; /** * <pre>Test4 for first sentence</pre> This is second sentence. */ public String testStr4; /** * Test5 for first sentence<h1> This is second sentence.</h1> */ public String testStr5; /** * Test6 for first sentence<h2> This is second sentence.</h2> */ public String testStr6; /** * Test7 for first sentence<h3> This is second sentence.</h3> */ public String testStr7; /** * Test8 for first sentence<h4> This is second sentence.</h4> */ public String testStr8; /** * Test9 for first sentence<hr> This is second sentence. */ public String testStr9; /** * <h1>Test10 for first sentence</h1> This is second sentence. */ public String testStr10; /** * <h2>Test11 for first sentence</h2> This is second sentence. */ public String testStr11; }
2,376
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestModifier.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testModifier/TestModifier.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 4210388 * @summary Javadoc declares interfaces to be "abstract". * @author jamieh * @library ../lib/ * @build ModifierAbstract * @build JavadocTester * @build TestModifier * @run main TestModifier */ public class TestModifier extends JavadocTester { private static final String BUG_ID = "4210388"; private static final String[][] TEST = NO_TEST; private static final String[][] NEGATED_TEST = NO_TEST; private static final String[] ARGS = new String[] { "-sourcepath", SRC_DIR, "-docletpath", SRC_DIR, "-doclet", "ModifierAbstract", SRC_DIR + FS + "Interface.java", SRC_DIR + FS + "Test.java"}; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestModifier tester = new TestModifier(); if (run(tester, ARGS, TEST, NEGATED_TEST) != 0) { throw new Error("Javadoc error occured during execution."); } } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,301
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
DummyClass.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSimpleTagExclude/DummyClass.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. */ /****************************** * @todo Remember to implement * this class. ******************************/ public class DummyClass {}
1,190
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestSimpleTagExclude.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testSimpleTagExclude/TestSimpleTagExclude.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 4628181 * @summary Test the parsing of the -tag option. The user should be able to * exclude a simple tag by using -tag tagname:X * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestSimpleTagExclude * @run main TestSimpleTagExclude */ public class TestSimpleTagExclude extends JavadocTester { private static final String BUG_ID = "4628181"; private static final String[][] TEST = NO_TEST; private static final String[][] NEGATED_TEST = { {BUG_ID + FS + "DummyClass.html", "todo"} }; private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-tag", "todo:X", SRC_DIR + FS + "DummyClass.java" }; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestSimpleTagExclude tester = new TestSimpleTagExclude(); if (run(tester, ARGS, TEST, NEGATED_TEST) != 0) { throw new Error("Javadoc failed to execute."); } tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,376
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/testThrowsHead/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 { public void method() throws IllegalArgumentException {} }
1,131
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestThrowsHead.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testThrowsHead/TestThrowsHead.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 4530727 * @summary When an exception is declared in the method signature but * not documented with a throws tag, we generate a link to it in the * throws section. Make sure that the link is below a Throws heading. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestThrowsHead * @run main TestThrowsHead */ public class TestThrowsHead extends JavadocTester { private static final String BUG_ID = "4530727"; private static final String[][] TEST = { {BUG_ID + FS + "C.html", "<dt><span class=\"strong\">Throws:</span>"} }; 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) { TestThrowsHead tester = new TestThrowsHead(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,327
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestLinkToSerialForm.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testLinkToSerialForm/TestLinkToSerialForm.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 4521661 * @summary Test to make sure that there is a link with a proper anchor * from a serializable class to serialized-form.html. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestLinkToSerialForm * @run main TestLinkToSerialForm */ public class TestLinkToSerialForm extends JavadocTester { private static final String BUG_ID = "4521661"; private static final String[][] TEST = { {BUG_ID + FS + "serialized-form.html", "<a name=\"pkg.C\">"}, {BUG_ID + FS + "pkg" + FS + "C.html", "<a href=\"../serialized-form.html#pkg.C\">"} }; private static final String[][] NEGATED_TEST = NO_TEST; 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) { TestLinkToSerialForm tester = new TestLinkToSerialForm(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,369
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/testLinkToSerialForm/pkg/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 pkg; public class C implements java.io.Serializable {}
1,116
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/testClassCrossReferences/C.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. */ /** * Cross link to package: {@link java.math Link to math package}<br> * Cross link to inner class: {@link javax.swing.text.AbstractDocument.AttributeContext Link to AttributeContext innerclass} <br> * Cross link to class: {@link java.math.BigDecimal Link to external class BigDecimal}<br> * Cross link to member: {@link java.math.BigInteger#gcd(java.math.BigInteger) Link to external member gcd}<br> */ public class C { public String toString() { return ""; } }
1,544
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestClassCrossReferences.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.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 4652655 4857717 * @summary This test verifies that class cross references work properly. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestClassCrossReferences * @run main TestClassCrossReferences */ public class TestClassCrossReferences extends JavadocTester { private static final String BUG_ID = "4652655-4857717"; private static final String[][] TEST = { {BUG_ID + FS + "C.html", "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/package-summary.html?is-external=true\"><code>Link to math package</code></a>"}, {BUG_ID + FS + "C.html", "<a href=\"http://java.sun.com/j2se/1.4/docs/api/javax/swing/text/AbstractDocument.AttributeContext.html?is-external=true\" " + "title=\"class or interface in javax.swing.text\"><code>Link to AttributeContext innerclass</code></a>"}, {BUG_ID + FS + "C.html", "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigDecimal.html?is-external=true\" " + "title=\"class or interface in java.math\"><code>Link to external class BigDecimal</code></a>"}, {BUG_ID + FS + "C.html", "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd(java.math.BigInteger)\" " + "title=\"class or interface in java.math\"><code>Link to external member gcd</code></a>"}, {BUG_ID + FS + "C.html", "<dl>" + NL + "<dt><strong>Overrides:</strong></dt>" + NL + "<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>" + NL + "</dl>"} }; 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, 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) { TestClassCrossReferences tester = new TestClassCrossReferences(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
3,535
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
AccessSummary.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/AccessSummary/AccessSummary.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 4637604 4775148 * @summary Test the tables for summary attribute * @author dkramer * @library ../lib/ * @build JavadocTester * @build AccessSummary * @run main AccessSummary */ public class AccessSummary extends JavadocTester { private static final String BUG_ID = "4637604-4775148"; private static final String OUTPUT_DIR1 = "docs1-" + BUG_ID + FS; /** * Assign value for [ fileToSearch, stringToFind ] */ private static final String[][] TESTARRAY1 = { // Test that the summary attribute appears { OUTPUT_DIR1 + "overview-summary.html", "summary=\"Packages table, listing packages, and an explanation\"" }, // Test that the summary attribute appears { OUTPUT_DIR1 + "p1" + FS + "C1.html", "summary=\"Constructor Summary table, listing constructors, and an explanation\"" }, // Test that the summary attribute appears { OUTPUT_DIR1 + "constant-values.html", "summary=\"Constant Field Values table, listing constant fields, and values\"" } }; // First test with -header only private static final String[] JAVADOC_ARGS = new String[] { "-d", OUTPUT_DIR1, "-sourcepath", SRC_DIR, "p1", "p2"}; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { JavadocTester tester = new AccessSummary(); run(tester, JAVADOC_ARGS, TESTARRAY1, new String[][] {}); tester.printSummary(); // Necessary for string search } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,931
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/AccessSummary/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 static final String STATICFINALFIELD = "test"; }
1,145
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/AccessSummary/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
AccessH1.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/AccessH1/AccessH1.java
/* * Copyright (c) 2002, 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 4636667 7052425 * @summary Use <H1, <H2>, and <H3> in proper sequence for accessibility * @author dkramer * @run main AccessH1 */ 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 AccessH1 { private static final String BUGID = "4636667-7052425"; private static final String BUGNAME = "AccessH1"; 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", "-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 style sheet { "h1 {" + LS + " font-size:1.8em;" + LS + "}", TMPDEST_DIR1 + "stylesheet.css" }, // Test the doc title in the overview page { "<h1 class=\"title\">Document Title</h1>", TMPDEST_DIR1 + "overview-summary.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,850
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/AccessH1/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/AccessH1/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
C.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testNoPackagesFile/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. */ public class C {}
1,070
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestNoPackagesFile.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testNoPackagesFile/TestNoPackagesFile.java
/* * Copyright (c) 2003, 2009, 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 4475679 * @summary Verify that packages.html is no longer generated since it is no * longer used. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestNoPackagesFile * @run main TestNoPackagesFile */ public class TestNoPackagesFile extends JavadocTester { //Test information. private static final String BUG_ID = "4475679"; //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, 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) { TestNoPackagesFile tester = new TestNoPackagesFile(); run(tester, ARGS, NO_TEST, NO_TEST); if ((new java.io.File(BUG_ID + FS + "packages.html")).exists()) { throw new Error("Test Fails: packages file should not be " + "generated anymore."); } else { System.out.println("Test passes: packages.html not found."); } } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,398
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/testConstructorIndent/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. */ public class C { /** * This is just a simple constructor. * @param i a param. */ public C(int i) {} }
1,179
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestConstructorIndent.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.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 4904037 * @summary The constructor comments should be surrounded by * <dl></dl>. Check for this in the output. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestConstructorIndent * @run main TestConstructorIndent */ public class TestConstructorIndent extends JavadocTester { //Test information. private static final String BUG_ID = "4904037"; //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 + "C.html", "<div class=\"block\">" + "This is just a simple constructor.</div>" + NL + "<dl><dt><span class=\"strong\">Parameters:</span></dt><dd>" + "<code>i</code> - a param.</dd></dl>" } }; 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) { TestConstructorIndent tester = new TestConstructorIndent(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
2,587
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
C5.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testCmndLineClass/C5.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. */ /** *This is a description for C5. */ public class C5 { public static final int I = 1; }
1,152
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z
TestCmndLineClass.java
/FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/com/sun/javadoc/testCmndLineClass/TestCmndLineClass.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 4506980 * @summary Test to make sure that there is no difference in the output * when specifying packages on the command line and specifying individual * classes. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestCmndLineClass * @run main TestCmndLineClass */ public class TestCmndLineClass extends JavadocTester { private static final String OUTPUT_DIR1 = "4506980-tmp1"; private static final String OUTPUT_DIR2 = "4506980-tmp2"; private static final String[][] TEST = NO_TEST; private static final String[][] NEGATED_TEST = NO_TEST; private static final String[] ARGS1 = new String[] { "-d", OUTPUT_DIR1, "-sourcepath", SRC_DIR, "-notimestamp", SRC_DIR + FS + "C5.java", "pkg1", "pkg2" }; private static final String[] ARGS2 = new String[] { "-d", OUTPUT_DIR2, "-sourcepath", SRC_DIR, "-notimestamp", SRC_DIR + FS + "C5.java", SRC_DIR + FS + "pkg1" + FS + "C1.java", SRC_DIR + FS + "pkg1" + FS + "C2.java", SRC_DIR + FS + "pkg2" + FS + "C3.java", SRC_DIR + FS + "pkg2" + FS + "C4.java" }; private static final String[][] FILES_TO_DIFF = { {OUTPUT_DIR1 + FS + "C5.html", OUTPUT_DIR2 + FS + "C5.html"}, {OUTPUT_DIR2 + FS + "pkg1" + FS + "C1.html", OUTPUT_DIR2 + FS + "pkg1" + FS + "C1.html"}, {OUTPUT_DIR1 + FS + "pkg1" + FS + "C2.html", OUTPUT_DIR2 + FS + "pkg1" + FS + "C2.html"}, {OUTPUT_DIR1 + FS + "pkg2" + FS + "C3.html", OUTPUT_DIR2 + FS + "pkg2" + FS + "C3.html"}, {OUTPUT_DIR1 + FS + "pkg2" + FS + "C4.html", OUTPUT_DIR2 + FS + "pkg2" + FS + "C4.html"} }; private static final String BUG_ID = "4506980"; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestCmndLineClass tester = new TestCmndLineClass(); run(tester, ARGS1, TEST, NEGATED_TEST); run(tester, ARGS2, TEST, NEGATED_TEST); tester.runDiffs(FILES_TO_DIFF); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
3,393
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/testCmndLineClass/pkg2/C3.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; /** *This is a description for C3. */ public class C3 { public static final int I = 1; }
1,166
Java
.java
openjdk-mirror/jdk7u-langtools
9
3
0
2012-05-07T19:45:34Z
2012-05-08T17:47:06Z