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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
C.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/bridge1/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 abstract class C extends E {
public C() {}
}
| 1,106 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
D.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/bridge1/D.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 4821489
* @summary generics: missing bridge method
* @author gafter
*
* @compile A.java C.java D.java E.java
* @run main D
*/
// the main class
import java.io.*;
public class D extends C {
public D() {
super();
}
public D test() {
System.out.println("D called");
return new D();
}
public static void main(String[] agrs) {
A obj = new D();
obj.test();
}
}
| 1,502 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/bridge1/A.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 interface A {
public A test();
}
| 1,094 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
E.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/bridge1/E.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 abstract class E implements A {
public abstract E test();
}
| 1,121 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6294779b.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6294779/T6294779b.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6294779
* @summary Problem with interface inheritance and covariant return types
* @author Maurizio Cimadamore
* @compile T6294779b.java
*/
import java.util.*;
class T6294779b {
interface I1<E> {
List<E> m();
}
interface I2<E> {
Queue<E> m();
}
interface I3<E> {
LinkedList<E> m();
}
interface I4<E> extends I1<E>, I2<E>, I3<E> {}
}
| 1,472 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6294779a.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6294779/T6294779a.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6294779
* @summary Problem with interface inheritance and covariant return types
* @author Maurizio Cimadamore
* @compile T6294779a.java
*/
public class T6294779a {
interface A {
A m();
}
interface B extends A {
B m();
}
interface C extends A {
C m();
}
interface D extends B, C {
D m();
}
}
| 1,442 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6294779c.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6294779/T6294779c.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6294779
* @summary Problem with interface inheritance and covariant return types
* @author Maurizio Cimadamore
* @compile/fail T6294779c.java
*/
public class T6294779c<X> {
interface A {}
interface B {}
interface C {}
interface I1 {
T6294779c<? extends A> get();
}
interface I2 {
T6294779c<? extends B> get();
}
interface I3 {
T6294779c<? extends C> get();
}
interface I4 extends I1, I2, I3 {}
}
| 1,549 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T7034019c.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/7034019/T7034019c.java | /*
* @test /nodynamiccopyright/
* @bug 7034019
* @summary ClassCastException in javac with conjunction types
*
* @compile/fail/ref=T7034019c.out -XDrawDiagnostics T7034019c.java
*/
class T7034019c {
interface A {
abstract <T extends Number> T foo();
}
interface B {
abstract <T> T foo();
}
static class C<T extends A & B> {
void test(T x) {
x.foo();
}
}
}
| 433 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T7034019d.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/7034019/T7034019d.java | /*
* @test /nodynamiccopyright/
* @bug 7034019
* @summary ClassCastException in javac with conjunction types
*
* @compile/fail/ref=T7034019d.out -XDrawDiagnostics T7034019d.java
*/
class T7034019c {
interface A {
abstract <T extends Number> T foo();
}
interface B {
abstract <T> T foo();
}
static abstract class E implements A,B {
void test() {
foo();
}
}
}
| 435 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T7034019a.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/7034019/T7034019a.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 7034019
* @summary ClassCastException in javac with conjunction types
*
* @compile T7034019a.java
*/
class T7034019a {
interface A {
abstract <T> void foo();
}
interface B {
abstract void foo();
}
static class C<T extends A & B> {
void test(T x) {
x.foo();
}
}
}
| 1,410 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T7034019b.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/7034019/T7034019b.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 7034019
* @summary ClassCastException in javac with conjunction types
*
* @compile T7034019b.java
*/
class T7034019a {
interface A {
<T> void foo();
}
interface B {
void foo();
}
static abstract class E implements A,B {
void test() {
foo();
}
}
}
| 1,394 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
HMember.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/classreader/HMember.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 interface HMember extends java.lang.Comparable<HMember> {
public abstract int compareTo(HMember o);
}
| 1,165 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
HMethodImpl.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/classreader/HMethodImpl.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.
*/
abstract class HMethodImpl
implements HMethod, java.io.Serializable, java.lang.Comparable<HMember> {
public int compareTo(HMember o) { return 0; }
}
| 1,208 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
HMethod.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/classreader/HMethod.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 interface HMethod extends HMember {
}
| 1,097 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
HArrayMethod.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/classreader/HArrayMethod.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 4881400
* @summary generics: override checks break when using separate compilation
* @author gafter
*
* @compile HArrayMethod.java HMember.java HMethod.java HMethodImpl.java
* @compile HArrayMethod.java
*/
class HArrayMethod extends HMethodImpl {
public HArrayMethod() {
}
}
| 1,364 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6677785.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6677785/T6677785.java | /*
* @test /nodynamiccopyright/
* @bug 6677785
* @summary REGRESSION: StackOverFlowError with Cyclic Class level Type Parameters when used in constructors
* @author Maurizio Cimadamore
* @compile/fail/ref=T6677785.out -XDrawDiagnostics T6677785.java
*/
public class T6677785<E extends T, T extends E> {
T6677785() {}
T6677785(E e) {}
T6677785(E e, T t) {}
}
| 383 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6985719a.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6985719/T6985719a.java | /*
* @test /nodynamiccopyright/
* @bug 6985719
* @summary Alike methods in interfaces (Inheritance and Overriding)
* @author mcimadamore
* @compile/fail/ref=T6985719a.out -XDrawDiagnostics T6985719a.java
*/
import java.util.List;
class T6985719a {
interface A { void f(List<String> ls); }
interface B { void f(List<Integer> ls); }
interface C extends A,B {}
}
| 385 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6985719f.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6985719/T6985719f.java | /*
* @test /nodynamiccopyright/
* @bug 6985719
* @summary Alike methods in interfaces (Inheritance and Overriding)
* @author mcimadamore
* @compile/fail/ref=T6985719f.out -XDrawDiagnostics T6985719f.java
*/
import java.util.List;
class T6985719f {
abstract class A { abstract void f(List<String> ls); }
abstract class B extends A { void f(List<Integer> ls); }
}
| 383 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6985719e.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6985719/T6985719e.java | /*
* @test /nodynamiccopyright/
* @bug 6985719
* @summary Alike methods in interfaces (Inheritance and Overriding)
* @author mcimadamore
* @compile/fail/ref=T6985719e.out -XDrawDiagnostics T6985719e.java
*/
import java.util.List;
class T6985719e {
interface A { void f(List<String> ls); }
interface B extends A { void f(List<Integer> ls); }
}
| 364 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6985719g.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6985719/T6985719g.java | /*
* @test /nodynamiccopyright/
* @bug 6985719
* @summary Alike methods in interfaces (Inheritance and Overriding)
* @author mcimadamore
* @compile/fail/ref=T6985719g.out -XDrawDiagnostics T6985719g.java
*/
import java.util.List;
class T6985719g {
interface A<X> { void f(List<X> ls); }
interface B extends A<String> { void f(List<Integer> ls); }
}
| 370 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6985719b.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6985719/T6985719b.java | /*
* @test /nodynamiccopyright/
* @bug 6985719
* @summary Alike methods in interfaces (Inheritance and Overriding)
* @author mcimadamore
* @compile/fail/ref=T6985719b.out -XDrawDiagnostics T6985719b.java
*/
import java.util.List;
class T6985719b {
abstract class A { abstract void f(List<String> ls); }
interface B { void f(List<Integer> ls); }
abstract class C extends A implements B {}
}
| 415 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6985719c.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6985719/T6985719c.java | /*
* @test /nodynamiccopyright/
* @bug 6985719
* @summary Alike methods in interfaces (Inheritance and Overriding)
* @author mcimadamore
* @compile/fail/ref=T6985719c.out -XDrawDiagnostics T6985719c.java
*/
import java.util.List;
class T6985719c {
interface A { void f(List<String> ls); }
interface B<X> { void f(List<X> ls); }
interface C extends A,B<Integer> {}
}
| 391 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6985719h.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6985719/T6985719h.java | /*
* @test /nodynamiccopyright/
* @bug 6985719
* @summary Alike methods in interfaces (Inheritance and Overriding)
* @author mcimadamore
* @compile/fail/ref=T6985719h.out -XDrawDiagnostics T6985719h.java
*/
import java.util.List;
class T6985719h {
abstract class A<X> { abstract void f(List<X> ls); }
abstract class B extends A<String> { abstract void f(List<Integer> ls); }
}
| 398 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6985719d.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6985719/T6985719d.java | /*
* @test /nodynamiccopyright/
* @bug 6985719
* @summary Alike methods in interfaces (Inheritance and Overriding)
* @author mcimadamore
* @compile/fail/ref=T6985719d.out -XDrawDiagnostics T6985719d.java
*/
import java.util.List;
class T6985719d {
abstract class A { abstract void f(List<String> ls); }
interface B<X> { void f(List<X> ls); }
abstract class C extends A implements B<Integer> {}
}
| 421 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6956758pos.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6956758/T6956758pos.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6956758
*
* @summary NPE in com.sun.tools.javac.code.Symbol - isSubClass
* @author Maurizio Cimadamore
* @compile T6956758pos.java
*
*/
class T6956758pos {
interface I {}
static class C {
<T extends C & I> T cloneObject(T object) throws Exception {
return (T)object.clone();
}
}
}
| 1,403 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6956758neg.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/6956758/T6956758neg.java | /*
* @test /nodynamiccopyright/
* @bug 6956758
*
* @summary NPE in com.sun.tools.javac.code.Symbol - isSubClass
* @author Maurizio Cimadamore
* @compile/fail/ref=T6956758neg.out -XDrawDiagnostics T6956758neg.java
*
*/
class T6956758neg {
interface I {}
static class C {
<T extends Object & I> T cloneObject(T object) throws Exception {
return (T)object.clone();
}
}
}
| 420 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T7020657neg.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/7020657/T7020657neg.java | /*
* @test /nodynamiccopyright/
* @bug 7020657 6985719
*
* @summary Javac rejects a fairly common idiom with raw override and interfaces
* @author Maurizio Cimadamore
* @compile/fail/ref=T7020657neg.out -XDrawDiagnostics T7020657neg.java
*
*/
import java.util.*;
class T7020657neg {
interface A {
int get(List<String> l);
}
interface B {
int get(List<Integer> l);
}
interface C extends A, B { }
}
| 447 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T7020657pos.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/generics/7020657/T7020657pos.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 7020657 6985719
*
* @summary Javac rejects a fairly common idiom with raw override and interfaces
* @author Robert Field
* @compile T7020657pos.java
*
*/
import java.util.*;
class T7020657pos {
interface A {
int get(List<String> l);
}
interface B {
int get(List<Integer> l);
}
interface C extends A, B {
int get(List l);
}
}
| 1,457 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
E2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6902720/E2.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.
*
* 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.
*/
enum E2 {
A(1),
B(2) { },
C(3) { void m() { } };
E2(int i) { }
}
| 1,133 | 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/tools/javac/6902720/Test.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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.*;
import java.net.*;
import javax.tools.*;
import java.util.*;
import com.sun.source.tree.CompilationUnitTree;
import com.sun.source.util.JavacTask;
import com.sun.tools.javac.api.JavacTool;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.Pretty;
/**
* @test
* @bug 6902720
* @summary javac pretty printer does not handle enums correctly
*/
public class Test {
public static void main(String[] args) throws Exception {
Test t = new Test();
t.run("E1.java", "E2.java");
}
void run(String... args) throws Exception {
File testSrcDir = new File(System.getProperty("test.src"));
for (String arg: args) {
test(new File(testSrcDir, arg));
}
}
void test(File test) throws Exception {
JavacTool tool1 = JavacTool.create();
StandardJavaFileManager fm = tool1.getStandardFileManager(null, null, null);
Iterable<? extends JavaFileObject> files = fm.getJavaFileObjects(test);
// parse test file into a tree, and write it out to a stringbuffer using Pretty
JavacTask t1 = tool1.getTask(null, fm, null, null, null, files);
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
Iterable<? extends CompilationUnitTree> trees = t1.parse();
for (CompilationUnitTree tree: trees) {
new Pretty(pw, true).printExpr((JCTree) tree);
}
pw.close();
final String out = sw.toString();
System.err.println("generated code:\n" + out + "\n");
// verify the generated code is valid Java by compiling it
JavacTool tool2 = JavacTool.create();
JavaFileObject fo = new SimpleJavaFileObject(URI.create("output"), JavaFileObject.Kind.SOURCE) {
@Override
public CharSequence getCharContent(boolean ignoreEncodingErrors) {
return out;
}
};
JavacTask t2 = tool2.getTask(null, fm, null, null, null, Collections.singleton(fo));
boolean ok = t2.call();
if (!ok)
throw new Exception("compilation of generated code failed");
File expectedClass = new File(test.getName().replace(".java", ".class"));
if (!expectedClass.exists())
throw new Exception(expectedClass + " not found");
}
}
| 3,406 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
E1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6902720/E1.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.
*
* 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.
*/
enum E1 {
A,
B { },
C { void m() { } };
}
| 1,106 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoBoxingDouble.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/NoBoxingDouble.java | /*
* Copyright (c) 2004, 2006, 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 6177400
* @summary Boxing allowed with -source 1.4
* @author Peter von der Ah\u00e9
* @compile/fail -source 1.4 NoBoxingDouble.java
*/
public class NoBoxingDouble {
Double d = 0D;
}
| 1,269 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoBoxingLong.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/NoBoxingLong.java | /*
* Copyright (c) 2004, 2006, 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 6177400
* @summary Boxing allowed with -source 1.4
* @author Peter von der Ah\u00e9
* @compile/fail -source 1.4 NoBoxingLong.java
*/
public class NoBoxingLong {
Long l = 0L;
}
| 1,263 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Boxing2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/Boxing2.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 4974939
* @summary Boxing/unboxing negative unit and regression tests
* @author gafter
*
* @compile/fail Boxing2.java
*/
public class Boxing2 {
void f() {
Long l = 12; // no compound boxing
}
}
| 1,289 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6369051.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/T6369051.java | /*
* Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6369051
* @summary javac cannot handle += operator correctly in Genericized code
* @author Hiroshi.Yamaguchi@...
* @compile T6369051.java
*/
class Value<T> {
public T value;
}
class IntegerValue extends Value<Integer> {
void increment() {
value = value + 1;
value += 1;
}
}
| 1,392 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
BoxingCaching.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/BoxingCaching.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 4990346
* @summary Verify autoboxed values are cached as required.
* @author Joseph D. Darcy
*/
public class BoxingCaching {
static boolean verifyBooleanCaching() {
boolean cached = true;
Boolean results[] = new Boolean[2];
results[0] = false;
results[1] = true;
Boolean B;
B = false;
if (B != results[0]) {
cached = false;
System.err.println("Boolean value " + B +
" is not cached appropriately.");
}
B = true;
if (B != results[1]) {
cached = false;
System.err.println("Boolean value " + B +
" is not cached appropriately.");
}
return cached;
}
static boolean verifyByteCaching() {
boolean cached = true;
Byte results[] = new Byte[-(-128) + 127 +1];
for(int i = 0; i < results.length; i++)
results[i] = (byte)(i-128);
for(int i = 0; i < results.length; i++) {
Byte B = (byte)(i-128);
if (B != results[i]) {
cached = false;
System.err.println("Byte value " + B +
" is not cached appropriately.");
}
}
for(int i = Byte.MIN_VALUE; i < Byte.MAX_VALUE; i++) {
Byte B;
B = (byte)i;
if (B.byteValue() != i) {
cached = false;
System.err.println("Erroneous autoboxing conversion for " +
"byte value " + i + " .");
}
}
return cached;
}
static boolean verifyCharacterCaching() {
boolean cached = true;
Character results[] = new Character[127 +1];
for(int i = 0; i < results.length; i++)
results[i] = (char)i;
for(int i = 0; i < results.length; i++) {
Character C = (char)i;
if (C != results[i]) {
cached = false;
System.err.println("Char value " + C +
" is not cached appropriately.");
}
}
for(int i = Character.MIN_VALUE; i < Character.MAX_VALUE; i++) {
Character C;
C = (char)i;
if (C.charValue() != i) {
cached = false;
System.err.println("Erroneous autoboxing conversion for " +
"char value " + i + " .");
}
}
return cached;
}
static boolean verifyIntegerCaching() {
boolean cached = true;
Integer results[] = new Integer[-(-128) + 127 +1];
for(int i = 0; i < results.length; i++)
results[i] = (i-128);
for(int i = 0; i < results.length; i++) {
Integer I = (i-128);
if (I != results[i]) {
cached = false;
System.err.println("Integer value " + I +
" is not cached appropriately.");
}
}
for(int i = -256; i < 255; i++) {
Integer I;
I = i;
if (I.intValue() != i) {
cached = false;
System.err.println("Erroneous autoboxing conversion for " +
"int value " + i + " .");
}
}
return cached;
}
static boolean verifyLongCaching() {
boolean cached = true;
Long results[] = new Long[-(-128) + 127 +1];
for(int i = 0; i < results.length; i++)
results[i] = (long)(i-128);
for(int i = 0; i < results.length; i++) {
Long L = (long)(i-128);
if (L != results[i]) {
cached = false;
System.err.println("Integer value " + L +
" is not cached appropriately.");
}
}
for(int i = -256; i < 255; i++) {
Integer L;
L = i;
if (L.longValue() != i) {
cached = false;
System.err.println("Erroneous autoboxing conversion for " +
"int value " + i + " .");
}
}
return cached;
}
static boolean verifyShortCaching() {
boolean cached = true;
Short results[] = new Short[-(-128) + 127 +1];
for(int i = 0; i < results.length; i++)
results[i] = (short)(i-128);
for(int i = 0; i < results.length; i++) {
Short S = (short)(i-128);
if (S != results[i]) {
cached = false;
System.err.println("Short value " + S +
" is not cached appropriately.");
}
}
for(int i = Short.MIN_VALUE; i < Short.MAX_VALUE; i++) {
Short S;
S = (short)i;
if (S.shortValue() != i) {
cached = false;
System.err.println("Erroneous autoboxing conversion for " +
"short value " + i + " .");
}
}
return cached;
}
public static void main(String argv[]) {
boolean cached = true;
cached &= verifyBooleanCaching();
cached &= verifyByteCaching();
cached &= verifyCharacterCaching();
cached &= verifyIntegerCaching();
cached &= verifyLongCaching();
cached &= verifyShortCaching();
if (!cached)
throw new RuntimeException("Values not cached appropriately.");
}
}
| 6,718 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoBoxingFloat.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/NoBoxingFloat.java | /*
* Copyright (c) 2004, 2006, 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 6177400
* @summary Boxing allowed with -source 1.4
* @author Peter von der Ah\u00e9
* @compile/fail -source 1.4 NoBoxingFloat.java
*/
public class NoBoxingFloat {
Float f = 0F;
}
| 1,266 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Boxing1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/Boxing1.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4869233 4872709 4868735 4921949 4921209 4965701 4934916 4975565 4974939
* @summary Boxing/unboxing positive unit and regression tests
* @author gafter
*/
public class Boxing1 {
static Boolean _Boolean = true;
static boolean _boolean = _Boolean;
static Byte _Byte = (byte)3;
static byte _byte = _Byte;
static Character _Character = 'a';
static char _char = _Character;
static Short _Short = (short)4;
static short _short = _Short;
static Integer _Integer = 5;
static int _int = _Integer;
static Long _Long = 12L;
static long _long = _Long;
static Float _Float = 1.2f;
static float _float = _Float;
static Double _Double = 1.34;
static double _double = _Double;
public static void main(String[] args) {
_Double = _Integer + _Integer + 0.0d;
if (_Double != 10) throw new Error();
_Integer = 2;
_float = _Integer;
if (_float != 2.0f) throw new Error();
_int = 12;
_Float = _int + 0.0f;
if (_Float != 12.0f) throw new Error();
_Integer = 8;
_float = (float)_Integer;
if (_float != 8.0f) throw new Error();
_int = 9;
_Float = (Float)(_int + 0.0f);
if (_Float != 9.0f) throw new Error();
if (_Boolean) ; else throw new Error();
if (!_Boolean) throw new Error();
if (_Integer >= _Long) throw new Error();
_Character = 'a';
String s1 = ("_" + _Character + "_").intern();
if (s1 != "_a_") throw new Error(s1);
/* assignment operators don't work; see 4921209 */
if (_Integer++ != 8) throw new Error();
if (_Integer++ != 9) throw new Error();
if (++_Integer != 11) throw new Error();
if ((_Integer += 3) != 14) throw new Error();
if ((_Integer -= 3) != 11) throw new Error();
Integer i = 0;
i = i + 2;
i += 2;
if (i != 4) throw new Error();
int j = 0;
j += i;
if (j != 4) throw new Error();
Integer a[] = new Integer[1];
a[0] = 3;
a[0] += 3;
if (a[0] != 6) throw new Error();
Froobie x = new Froobie();
Froobie y = new Froobie();
x.next = y;
x.next.i = 4;
x.next.i += 4;
if (--x.next.i != 7) throw new Error();
if (x.next.i-- != 7) throw new Error();
if (x.next.i != 6) throw new Error();
boxIndex();
boxArray();
}
static void boxIndex() {
String[] a = { "hello", "world" };
Integer i = 0;
System.out.println(a[i]);
}
static void boxArray() {
Integer[] a2 = { 0, 1, 2, 3 };
for (int i : a2)
System.out.println(i);
}
static class Froobie {
Froobie next = null;
Integer i = 1;
}
static class Scott {
Integer i[];
Integer j[];
Integer k;
int q = i[j[k]]++;
}
class T4974939 {
void f() {
Byte b = 12;
Byte c = 'a';
Short s = 'b';
Short t = 12;
Character d = 12;
}
}
}
| 4,228 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6816548.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/T6816548.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.
*
* 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 6816548
* @summary Uninitialized register when performing casting + auto(un)boxing
* @author mcimadamore
*/
public class T6816548 {
public static void main(String[] args) {
testInt();
testShort();
testByte();
testChar();
}
public static void testInt() {
final int fi = 0;
Byte b = fi;
Short s = fi;
Character c = fi;
}
public static void testShort() {
final short fs = 0;
Byte b = fs;
Short s = fs;
Character c = fs;
}
public static void testByte() {
final byte fb = 0;
Byte b = fb;
Short s = fb;
Character c = fb;
}
public static void testChar() {
final char fc = '0';
Byte b = fc;
Short s = fc;
Character c = fc;
}
}
| 1,904 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoBoxingShort.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/NoBoxingShort.java | /*
* Copyright (c) 2004, 2006, 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 6177400
* @summary Boxing allowed with -source 1.4
* @author Peter von der Ah\u00e9
* @compile/fail -source 1.4 NoBoxingShort.java
*/
public class NoBoxingShort {
Short s = 0;
}
| 1,265 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6614974.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/T6614974.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6614974
* @summary javac successfully compiles code that throws java.lang.VerifyError when run
* @author mcimadamore
*/
public class T6614974<T> {
private T n;
public void error() {
T6614974<Integer> val = new T6614974<Integer>();
val.n = 0;
Integer.toString(val.n++);
}
public static void main(String[] args) {
T6614974.class.getMethods();
}
}
| 1,480 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Boxing4.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/Boxing4.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 4999689
* @summary Compiler incorrectly create Integer in "Character c = 95"
* @author gafter
*/
public class Boxing4 {
public static void main(String[] args) {
Character ch = 95;
ch++;
System.out.println(ch + 0);
}
}
| 1,328 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
BoxedForeach.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/BoxedForeach.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4921543 5009601
* @summary boxing/unboxing versus foreach crashes javac
* @author gafter
*
* @compile BoxedForeach.java
* @run main BoxedForeach
*/
import java.util.*;
public class BoxedForeach {
static void f(Integer[] a) {
for ( int i : a ) {
System.out.println(i);
}
}
static void f(Iterable<Integer> b) {
g(b);
h(b);
for ( int i : b ) {
System.out.println(i);
}
for ( float i : b ) {
System.out.println(i);
}
for ( Iterator<Integer> it = b.iterator(); it.hasNext(); ) {
float i = it.next();
}
}
static <T extends Integer> void g(Iterable<T> b) {
for ( int i : b ) {
System.out.println(i);
}
}
static void h(Iterable<? extends Integer> b) {
for ( int i : b ) {
System.out.println(i);
}
}
static void f(int[] c) {
for ( Integer i : c ) {
System.out.println(i);
}
}
static <E extends Enum<E>> void f(E[] values) {
for ( E e : values ) {
System.out.println(e);
}
}
static int f() {
for ( Foo f : foolist() ) {
return f.x;
}
return 0;
}
static List<Foo> foolist() {
List<Foo> l = new ArrayList<Foo>();
l.add(new Foo());
return l;
}
enum color { red, green, blue };
public static void main(String[] args) {
Integer[] a1 = { Integer.valueOf(1), Integer.valueOf(2) };
f(a1);
f(Arrays.asList(a1));
int[] a2 = { 1, 2, 3 };
f(a2);
f(color.values());
f();
}
}
class Foo {
static int n = 0;
final int x;
Foo() {
x = n++;
}
}
class A {
class B {
}
java.util.List<String> l;
String[] args;
{
for (String s1 : l) {
for (String s2 : l) {
B b = new B();
}
}
for (String s1 : args) {
for (String s2 : args) {
B b = new B();
}
}
}
}
| 3,197 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6348760.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/T6348760.java | /*
* Copyright (c) 2005, 2006, 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 6348760
* @summary crash: java.lang.AssertionError at com.sun.tools.javac.comp.Lower.abstractLval(Lower.java:1853)
* @author Peter von der Ah\u00e9
* @run main/othervm -Xfuture T6348760
*/
public class T6348760<T> {
T value;
static int n;
T6348760(T value) {
this.value = value;
}
static void testByte(T6348760<Byte> i, T6348760<Byte> j, T6348760<Boolean> a) {
i.value++;
i.value--;
++i.value;
--i.value;
n = +i.value;
n = -i.value;
n = ~i.value;
n = i.value * j.value;
n = i.value / j.value;
n = i.value % j.value;
n = i.value + j.value;
n = i.value - j.value;
n = i.value << j.value;
n = i.value >> j.value;
n = i.value >>> j.value;
n = i.value & j.value;
n = i.value ^ j.value;
n = i.value | j.value;
n *= j.value;
n /= j.value;
n %= j.value;
n += j.value;
n -= j.value;
n <<= j.value;
n >>= j.value;
n >>>= j.value;
n &= j.value;
n ^= j.value;
n |= j.value;
a.value = i.value < j.value;
a.value = i.value > j.value;
a.value = i.value <= j.value;
a.value = i.value >= j.value;
a.value = i.value == j.value;
a.value = i.value != j.value;
}
static void testShort(T6348760<Short> i, T6348760<Short> j, T6348760<Boolean> a) {
i.value++;
i.value--;
++i.value;
--i.value;
n = +i.value;
n = -i.value;
n = ~i.value;
n = i.value * j.value;
n = i.value / j.value;
n = i.value % j.value;
n = i.value + j.value;
n = i.value - j.value;
n = i.value << j.value;
n = i.value >> j.value;
n = i.value >>> j.value;
n = i.value & j.value;
n = i.value ^ j.value;
n = i.value | j.value;
n *= j.value;
n /= j.value;
n %= j.value;
n += j.value;
n -= j.value;
n <<= j.value;
n >>= j.value;
n >>>= j.value;
n &= j.value;
n ^= j.value;
n |= j.value;
a.value = i.value < j.value;
a.value = i.value > j.value;
a.value = i.value <= j.value;
a.value = i.value >= j.value;
a.value = i.value == j.value;
a.value = i.value != j.value;
}
static void testInteger(T6348760<Integer> i, T6348760<Integer> j, T6348760<Boolean> a) {
i.value++;
i.value--;
++i.value;
--i.value;
i.value = +i.value;
i.value = -i.value;
i.value = ~i.value;
i.value = i.value * j.value;
i.value = i.value / j.value;
i.value = i.value % j.value;
i.value = i.value + j.value;
i.value = i.value - j.value;
i.value = i.value << j.value;
i.value = i.value >> j.value;
i.value = i.value >>> j.value;
i.value = i.value & j.value;
i.value = i.value ^ j.value;
i.value = i.value | j.value;
i.value *= j.value;
i.value /= j.value;
i.value %= j.value;
i.value += j.value;
i.value -= j.value;
i.value <<= j.value;
i.value >>= j.value;
i.value >>>= j.value;
i.value &= j.value;
i.value ^= j.value;
i.value |= j.value;
a.value = i.value < j.value;
a.value = i.value > j.value;
a.value = i.value <= j.value;
a.value = i.value >= j.value;
a.value = i.value == j.value;
a.value = i.value != j.value;
}
static void testLong(T6348760<Long> i, T6348760<Long> j, T6348760<Boolean> a) {
i.value++;
i.value--;
++i.value;
--i.value;
i.value = +i.value;
i.value = -i.value;
i.value = ~i.value;
i.value = i.value * j.value;
i.value = i.value / j.value;
i.value = i.value % j.value;
i.value = i.value + j.value;
i.value = i.value - j.value;
i.value = i.value << j.value;
i.value = i.value >> j.value;
i.value = i.value >>> j.value;
i.value = i.value & j.value;
i.value = i.value ^ j.value;
i.value = i.value | j.value;
i.value *= j.value;
i.value /= j.value;
i.value %= j.value;
i.value += j.value;
i.value -= j.value;
i.value <<= j.value;
i.value >>= j.value;
i.value >>>= j.value;
i.value &= j.value;
i.value ^= j.value;
i.value |= j.value;
a.value = i.value < j.value;
a.value = i.value > j.value;
a.value = i.value <= j.value;
a.value = i.value >= j.value;
a.value = i.value == j.value;
a.value = i.value != j.value;
}
static void testCharacter(T6348760<Character> i, T6348760<Character> j, T6348760<Boolean> a) {
i.value++;
i.value--;
++i.value;
--i.value;
n = +i.value;
n = -i.value;
n = ~i.value;
n = i.value * j.value;
n = i.value / j.value;
n = i.value % j.value;
n = i.value + j.value;
n = i.value - j.value;
n = i.value << j.value;
n = i.value >> j.value;
n = i.value >>> j.value;
n = i.value & j.value;
n = i.value ^ j.value;
n = i.value | j.value;
n *= j.value;
n /= j.value;
n %= j.value;
n += j.value;
n -= j.value;
n <<= j.value;
n >>= j.value;
n >>>= j.value;
n &= j.value;
n ^= j.value;
n |= j.value;
a.value = i.value < j.value;
a.value = i.value > j.value;
a.value = i.value <= j.value;
a.value = i.value >= j.value;
a.value = i.value == j.value;
a.value = i.value != j.value;
}
static void testFloat(T6348760<Float> i, T6348760<Float> j, T6348760<Boolean> a) {
i.value++;
i.value--;
++i.value;
--i.value;
i.value = +i.value;
i.value = -i.value;
// i.value = ~i.value;
i.value = i.value * j.value;
i.value = i.value / j.value;
i.value = i.value % j.value;
i.value = i.value + j.value;
i.value = i.value - j.value;
// i.value = i.value << j.value;
// i.value = i.value >> j.value;
// i.value = i.value >>> j.value;
// i.value = i.value & j.value;
// i.value = i.value ^ j.value;
// i.value = i.value | j.value;
i.value *= j.value;
i.value /= j.value;
i.value %= j.value;
i.value += j.value;
i.value -= j.value;
// i.value <<= j.value;
// i.value >>= j.value;
// i.value >>>= j.value;
// i.value &= j.value;
// i.value ^= j.value;
// i.value |= j.value;
a.value = i.value < j.value;
a.value = i.value > j.value;
a.value = i.value <= j.value;
a.value = i.value >= j.value;
a.value = i.value == j.value;
a.value = i.value != j.value;
}
static void testDouble(T6348760<Double> i, T6348760<Double> j, T6348760<Boolean> a) {
i.value++;
i.value--;
++i.value;
--i.value;
i.value = +i.value;
i.value = -i.value;
// i.value = ~i.value;
i.value = i.value * j.value;
i.value = i.value / j.value;
i.value = i.value % j.value;
i.value = i.value + j.value;
i.value = i.value - j.value;
// i.value = i.value << j.value;
// i.value = i.value >> j.value;
// i.value = i.value >>> j.value;
// i.value = i.value & j.value;
// i.value = i.value ^ j.value;
// i.value = i.value | j.value;
i.value *= j.value;
i.value /= j.value;
i.value %= j.value;
i.value += j.value;
i.value -= j.value;
// i.value <<= j.value;
// i.value >>= j.value;
// i.value >>>= j.value;
// i.value &= j.value;
// i.value ^= j.value;
// i.value |= j.value;
a.value = i.value < j.value;
a.value = i.value > j.value;
a.value = i.value <= j.value;
a.value = i.value >= j.value;
a.value = i.value == j.value;
a.value = i.value != j.value;
}
static void testBoolean(T6348760<Boolean> i, T6348760<Boolean> j, T6348760<Boolean> a) {
// i.value++;
// i.value--;
// ++i.value;
// --i.value;
// i.value = +i.value;
// i.value = -i.value;
// i.value = ~i.value;
// i.value = i.value * j.value;
// i.value = i.value / j.value;
// i.value = i.value % j.value;
// i.value = i.value + j.value;
// i.value = i.value - j.value;
// i.value = i.value << j.value;
// i.value = i.value >> j.value;
// i.value = i.value >>> j.value;
i.value = i.value & j.value;
i.value = i.value ^ j.value;
i.value = i.value | j.value;
// i.value *= j.value;
// i.value /= j.value;
// i.value %= j.value;
// i.value += j.value;
// i.value -= j.value;
// i.value <<= j.value;
// i.value >>= j.value;
// i.value >>>= j.value;
i.value &= j.value;
i.value ^= j.value;
i.value |= j.value;
// a.value = i.value < j.value;
// a.value = i.value > j.value;
// a.value = i.value <= j.value;
// a.value = i.value >= j.value;
a.value = i.value == j.value;
a.value = i.value != j.value;
a.value = !j.value;
a.value = i.value && j.value;
a.value = i.value || j.value;
}
public static void main(String... args) {
testByte (new T6348760<Byte>((byte)42),
new T6348760<Byte>((byte)42),
new T6348760<Boolean>(true));
testShort (new T6348760<Short>((short)42),
new T6348760<Short>((short)42),
new T6348760<Boolean>(true));
testInteger (new T6348760<Integer>(42),
new T6348760<Integer>(42),
new T6348760<Boolean>(true));
testLong (new T6348760<Long>(42L),
new T6348760<Long>(42L),
new T6348760<Boolean>(true));
testCharacter(new T6348760<Character>('*'),
new T6348760<Character>('*'),
new T6348760<Boolean>(true));
testFloat (new T6348760<Float>(42.0F),
new T6348760<Float>(42.0F),
new T6348760<Boolean>(true));
testDouble (new T6348760<Double>(42.0D),
new T6348760<Double>(42.0D),
new T6348760<Boolean>(true));
testBoolean (new T6348760<Boolean>(true),
new T6348760<Boolean>(true),
new T6348760<Boolean>(true));
}
}
| 12,136 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoBoxingByte.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/NoBoxingByte.java | /*
* Copyright (c) 2004, 2006, 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 6177400
* @summary Boxing allowed with -source 1.4
* @author Peter von der Ah\u00e9
* @compile/fail -source 1.4 NoBoxingByte.java
*/
public class NoBoxingByte {
Byte b = 0;
}
| 1,262 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoBoxingChar.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/NoBoxingChar.java | /*
* Copyright (c) 2004, 2006, 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 6177400
* @summary Boxing allowed with -source 1.4
* @author Peter von der Ah\u00e9
* @compile/fail -source 1.4 NoBoxingChar.java
*/
public class NoBoxingChar {
Character c = '\u0000';
}
| 1,274 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T5082929.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/T5082929.java | /*
* Copyright (c) 2006, 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 5082929
* @summary Comparing Float and Integer
* @author Peter von der Ah\u00e9
* @compile/fail T5082929.java
*/
public class T5082929 {
void test(Float f, Integer i) {
boolean b = f == i;
}
}
| 1,291 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoBoxingBool.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/NoBoxingBool.java | /*
* Copyright (c) 2004, 2006, 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 6177400
* @summary Boxing allowed with -source 1.4
* @author Peter von der Ah\u00e9
* @compile/fail -source 1.4 NoBoxingBool.java
*/
public class NoBoxingBool {
Boolean b = false;
}
| 1,269 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoBoxingInt.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/boxing/NoBoxingInt.java | /*
* Copyright (c) 2004, 2006, 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 6177400
* @summary Boxing allowed with -source 1.4
* @author Peter von der Ah\u00e9
* @compile/fail -source 1.4 NoBoxingInt.java
*/
public class NoBoxingInt {
Integer i = 0;
}
| 1,263 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6627362.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6627362/T6627362.java | /*
* Copyright (c) 2007, 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 6627362
* @summary javac generates code that uses array.clone,
* which is not available on JavaCard
*/
import java.io.*;
import java.lang.reflect.*;
import java.net.*;
import java.util.*;
public class T6627362 {
static String testSrc = System.getProperty("test.src", ".");
public static void main(String... args) throws Exception {
new T6627362().run();
}
public void run() throws Exception {
testStandard();
testNoClone();
if (errors > 0)
throw new Error(errors + " test cases failed");
}
void testStandard() throws Exception {
// compile and disassemble E.java, check for reference to Object.clone()
File x = new File(testSrc, "x");
String[] jcArgs = { "-d", ".",
new File(x, "E.java").getPath() };
compile(jcArgs);
String[] jpArgs = { "-classpath", ".", "-c", "E" };
StringWriter sw = new StringWriter();
javap(new PrintWriter(sw, true), jpArgs);
check(sw.toString(), "Method \"[LE;\".clone:()Ljava/lang/Object;");
callValues();
}
void testNoClone() throws Exception {
// compile and disassemble E.java, using modified Object.java,
// check for reference to System.arraycopy
File x = new File(testSrc, "x");
String[] jcArgs = { "-d", ".",
new File(x, "E.java").getPath(),
new File(x, "Object.java").getPath()};
compile(jcArgs);
String[] jpArgs = { "-classpath", ".", "-c", "E" };
StringWriter sw = new StringWriter();
javap(new PrintWriter(sw, true), jpArgs);
check(sw.toString(), "// Method java/lang/System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V");
callValues();
}
void compile(String... args) {
int rc = com.sun.tools.javac.Main.compile(args);
if (rc != 0)
throw new Error("javac failed: " + Arrays.asList(args) + ": " + rc);
}
void javap(PrintWriter out, String... args) throws Exception {
int rc = com.sun.tools.javap.Main.run(args, out);
if (rc != 0)
throw new Error("javap failed: " + Arrays.asList(args) + ": " + rc);
}
void check(String s, String require) {
System.out.println("Checking:\n" + s);
if (s.indexOf(require) == -1) {
System.err.println("Can't find " + require);
errors++;
}
}
void callValues() {
try {
File dot = new File(System.getProperty("user.dir"));
ClassLoader cl = new URLClassLoader(new URL[] { dot.toURL() });
Class<?> e_class = cl.loadClass("E");
Method m = e_class.getMethod("values", new Class[] { });
//System.err.println(m);
Object o = m.invoke(null, (Object[]) null);
List<Object> v = Arrays.asList((Object[]) o);
if (!v.toString().equals("[a, b, c]"))
throw new Error("unexpected result for E.values(): " + v);
} catch (Exception e) {
throw new Error(e);
}
}
int errors;
}
| 4,237 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Object.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6627362/x/Object.java | /*
* Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.lang;
/*
* Object, without clone()
*/
public class Object {
}
| 1,136 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
E.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6627362/x/E.java | /*
* Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public enum E {
a, b, c
}
| 1,088 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T4241573.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/4241573/T4241573.java | /*
* Copyright (c) 2009, 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 4241573
* @summary SourceFile attribute includes full path
*/
import com.sun.tools.classfile.Attribute;
import com.sun.tools.classfile.ClassFile;
import com.sun.tools.classfile.SourceFile_attribute;
import java.io.*;
import java.util.*;
import java.util.jar.*;
public class T4241573 {
public static void main(String... args) throws Exception {
new T4241573().run();
}
public void run() throws Exception {
// Selection of files to be compiled
File absJar = createJar(new File("abs.jar").getAbsoluteFile(), "j.A");
File relJar = createJar(new File("rel.jar"), "j.R");
File absDir = createDir(new File("abs.dir").getAbsoluteFile(), "d.A");
File relDir = createDir(new File("rel.dir"), "d.R");
File absTestFile = writeFile(new File("AbsTest.java").getAbsoluteFile(), "class AbsTest { class Inner { } }");
File relTestFile = writeFile(new File("RelTest.java"), "class RelTest { class Inner { } }");
File relTest2File = writeFile(new File("p/RelTest2.java"), "package p; class RelTest2 { class Inner { } }");
// This next class references other classes that will be found on the source path
// and which will therefore need to be compiled as well.
File mainFile = writeFile(new File("Main.java"),
"class Main { j.A ja; j.R jr; d.A da; d.R dr; }" +
"");
String sourcePath = createPath(absJar, relJar, absDir, relDir);
File outDir = new File("classes");
outDir.mkdirs();
String[] args = {
"-sourcepath", sourcePath,
"-d", outDir.getPath(),
absTestFile.getPath(),
relTestFile.getPath(),
relTest2File.getPath(),
mainFile.getPath(),
};
System.err.println("compile: " + Arrays.asList(args));
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
int rc = com.sun.tools.javac.Main.compile(args, pw);
pw.close();
if (rc != 0) {
System.err.println(sw.toString());
throw new Exception("unexpected exit from javac: " + rc);
}
Set<File> expect = getFiles(outDir,
"d/A.class", "d/A$Inner.class",
"d/R.class", "d/R$Inner.class",
"j/A.class", "j/A$Inner.class",
"j/R.class", "j/R$Inner.class",
"AbsTest.class", "AbsTest$Inner.class",
"RelTest.class", "RelTest$Inner.class",
"p/RelTest2.class", "p/RelTest2$Inner.class",
"Main.class" );
Set<File> found = findFiles(outDir);
if (!found.equals(expect)) {
if (found.containsAll(expect))
throw new Exception("unexpected files found: " + diff(found, expect));
else if (expect.containsAll(found))
throw new Exception("expected files not found: " + diff(expect, found));
}
for (File f: found)
verifySourceFileAttribute(f);
if (errors > 0)
throw new Exception(errors + " errors occurred");
}
/** Check the SourceFileAttribute is the simple name of the original source file. */
void verifySourceFileAttribute(File f) {
System.err.println("verify: " + f);
try {
ClassFile cf = ClassFile.read(f);
SourceFile_attribute sfa = (SourceFile_attribute) cf.getAttribute(Attribute.SourceFile);
String found = sfa.getSourceFile(cf.constant_pool);
String expect = f.getName().replaceAll("([$.].*)?\\.class", ".java");
if (!expect.equals(found)) {
error("bad value found: " + found + ", expected: " + expect);
}
} catch (Exception e) {
error("error reading " + f +": " + e);
}
}
/** Create a directory containing one or more files. */
File createDir(File dir, String... entries) throws Exception {
if (!dir.mkdirs())
throw new Exception("cannot create directories " + dir);
for (String e: entries) {
writeFile(new File(dir, getPathForDirEntry(e)), getBodyForEntry(e));
}
return dir;
}
/** Create a jar file containing one or more entries. */
File createJar(File jar, String... entries) throws IOException {
OutputStream out = new FileOutputStream(jar);
try {
JarOutputStream jos = new JarOutputStream(out);
for (String e: entries) {
jos.putNextEntry(new JarEntry(getPathForZipEntry(e)));
jos.write(getBodyForEntry(e).getBytes());
}
jos.close();
} finally {
out.close();
}
return jar;
}
/** Return the path for an entry given to createDir */
String getPathForDirEntry(String e) {
return e.replace(".", File.separator) + ".java";
}
/** Return the path for an entry given to createJar. */
String getPathForZipEntry(String e) {
return e.replace(".", "/") + ".java";
}
/** Return the body text for an entry given to createDir or createJar. */
String getBodyForEntry(String e) {
int sep = e.lastIndexOf(".");
String pkgName = e.substring(0, sep);
String className = e.substring(sep + 1);
return "package " + pkgName + "; public class " + className + "{ class Inner { } }";
}
/** Write a file containing the given string. Parent directories are
* created as needed. */
File writeFile(File f, String s) throws IOException {
if (f.getParentFile() != null)
f.getParentFile().mkdirs();
FileWriter out = new FileWriter(f);
try {
out.write(s);
} finally {
out.close();
}
return f;
}
/** Create a path value from a list of directories and jar files. */
String createPath(File... files) {
StringBuilder sb = new StringBuilder();
for (File f: files) {
if (sb.length() > 0)
sb.append(File.pathSeparatorChar);
sb.append(f.getPath());
}
return sb.toString();
}
/** Create a set of files from a base directory and a set of relative paths. */
Set<File> getFiles(File dir, String... paths) {
Set<File> files = new LinkedHashSet<File>();
for (String p: paths)
files.add(new File(dir, p));
return files;
}
/** Find all the files in a directory and its subdirectories. */
Set<File> findFiles(File dir) {
Set<File> files = new LinkedHashSet<File>();
findFiles(dir, files);
return files;
}
// where
void findFiles(File dir, Set<File> files) {
for (File f: dir.listFiles()) {
if (f.isDirectory())
findFiles(f, files);
else
files.add(f);
}
}
/** Return the difference of two sets, a - b. */
<T> Set<T> diff(Set<T> a, Set<T> b) {
if (b.isEmpty())
return a;
Set<T> result = new LinkedHashSet<T>(a);
result.removeAll(b);
return result;
}
/** Report an error. */
void error(String msg) {
System.err.println(msg);
errors++;
}
int errors;
}
| 8,412 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6589361.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6589361/T6589361.java | /**
* @test
* @bug 6589361
* @summary 6589361:Failing building ct.sym file as part of the control build
*/
import com.sun.tools.javac.file.JavacFileManager;
import com.sun.tools.javac.util.Context;
import java.io.File;
import javax.tools.FileObject;
import javax.tools.JavaFileObject;
import javax.tools.JavaFileObject.Kind;
import javax.tools.StandardLocation;
import java.util.Set;
import java.util.HashSet;
public class T6589361 {
public static void main(String [] args) throws Exception {
JavacFileManager fm = null;
try {
fm = new JavacFileManager(new Context(), false, null);
Set<JavaFileObject.Kind> set = new HashSet<JavaFileObject.Kind>();
set.add(JavaFileObject.Kind.CLASS);
Iterable<JavaFileObject> files = fm.list(StandardLocation.PLATFORM_CLASS_PATH, "java.lang", set, false);
for (JavaFileObject file : files) {
// Note: Zip/Jar entry names use '/', not File.separator, but just to be sure,
// we normalize the filename as well.
if (file.getName().replace(File.separatorChar, '/').contains("java/lang/Object.class")) {
String str = fm.inferBinaryName(StandardLocation.CLASS_PATH, file);
if (!str.equals("java.lang.Object")) {
throw new AssertionError("Error in JavacFileManager.inferBinaryName method!");
}
else {
return;
}
}
}
}
finally {
if (fm != null) {
fm.close();
}
}
throw new AssertionError("Could not find java/lang/Object.class while compiling");
}
}
| 1,766 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Q.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/mandatoryWarnings/deprecated/Q.java | /* /nodynamiccopyright/ */
// Q has overrides a deprecated method,
// which will generate a warning when Q is entered
class Q extends Q2
{
@Deprecated void foo() { }
void bar() { } // warning: override deprecated method
}
class Q2 {
@Deprecated void bar() { }
}
// Q3 is not required in order to compile Q or Q2,
// and will therefore be attributed later
class Q3 {
void baz() { new Q().foo(); } // warning: call deprecated method
}
| 453 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/mandatoryWarnings/deprecated/A.java | /*
* /nodynamiccopyright/
*
* Test code for Test.sh
*/
class A
{
void f() {
A1 a1 = new A1();
}
}
@Deprecated
class A1 {
}
| 145 | 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/tools/javac/mandatoryWarnings/deprecated/B.java | /*
* /nodynamiccopyright/
*
* Test code for Test.sh
*/
class B
{
void f() {
B1 b1 = new B1();
B1 b1a = new B1();
}
}
@Deprecated
class B1 {
}
| 174 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
P.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/mandatoryWarnings/deprecated/P.java | /* /nodynamiccopyright/ */
// P references Q, which will require Q to be attributed,
// and therefore generate warnings about Q
// In addition, P will generate warnings of its own
// because it overrides deprecated methods in Q.
class P
{
Q q = new Q() {
void foo() { } // warning: override deprecated method
};
};
| 340 | 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/tools/javac/mandatoryWarnings/deprecated/Test.java | /*
* Copyright (c) 2006, 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.
*/
// This file is not executed directly; it just exists to contain the
// set of test descriptions
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test1.out -XDrawDiagnostics A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test1.out -XDrawDiagnostics -nowarn A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test1.out -XDrawDiagnostics -Xmaxwarns 1 A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test2.out -XDrawDiagnostics A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test2.out -XDrawDiagnostics -nowarn A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test2.out -XDrawDiagnostics -Xmaxwarns 1 A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test3.out -XDrawDiagnostics -Xlint:deprecation A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test3.out -XDrawDiagnostics -nowarn -Xlint:deprecation A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test3b.out -XDrawDiagnostics -nowarn -Xlint:deprecation -Xmaxwarns 1 A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4.out -XDrawDiagnostics -Xlint:deprecation A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4.out -XDrawDiagnostics -nowarn -Xlint:deprecation A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4b.out -XDrawDiagnostics -nowarn -Xlint:deprecation -Xmaxwarns 1 A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4c.out -XDrawDiagnostics -nowarn -Xlint:deprecation -Xmaxwarns 2 A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4d.out -XDrawDiagnostics -nowarn -Xlint:deprecation -Xmaxwarns 3 A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test5.out -XDrawDiagnostics -Xlint:deprecation P.java Q.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test5b.out -XDrawDiagnostics -Xlint:deprecation -Xmaxwarns 2 P.java Q.java
*/
| 4,040 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/mandatoryWarnings/unchecked/A.java | /*
* /nodynamiccopyright/
*
* Test code for Test.sh
*/
import java.util.ArrayList;
import java.util.List;
class A
{
void f() {
List l = new ArrayList<String>();
l.add("abc");
l.add("def");
}
}
| 231 | 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/tools/javac/mandatoryWarnings/unchecked/B.java | /*
* /nodynamiccopyright/
*
* Test code for Test.sh
*/
import java.util.ArrayList;
import java.util.List;
class B
{
void f() {
List l = new ArrayList<String>();
l.add("abc");
l.add("def");
l.add("ghi");
}
}
| 253 | 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/tools/javac/mandatoryWarnings/unchecked/Test.java | /*
* Copyright (c) 2006, 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.
*/
// This file is not executed directly; it just exists to contain the
// set of test descriptions
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test1.out -XDrawDiagnostics A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test1.out -XDrawDiagnostics -nowarn A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test1.out -XDrawDiagnostics -Xmaxwarns 1 A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test2.out -XDrawDiagnostics A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test2.out -XDrawDiagnostics -nowarn A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test2.out -XDrawDiagnostics -Xmaxwarns 1 A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test3.out -XDrawDiagnostics -Xlint:unchecked A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test3.out -XDrawDiagnostics -nowarn -Xlint:unchecked A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test3b.out -XDrawDiagnostics -nowarn -Xlint:unchecked -Xmaxwarns 1 A.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4.out -XDrawDiagnostics -Xlint:unchecked A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4.out -XDrawDiagnostics -nowarn -Xlint:unchecked A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4b.out -XDrawDiagnostics -nowarn -Xlint:unchecked -Xmaxwarns 1 A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4c.out -XDrawDiagnostics -nowarn -Xlint:unchecked -Xmaxwarns 2 A.java B.java
*/
/*
* @test
* @bug 5047307
* @summary javac -nowarn improperly suppresses JLS-mandated warnings
* @compile/ref=Test4d.out -XDrawDiagnostics -nowarn -Xlint:unchecked -Xmaxwarns 3 A.java B.java
*/
| 3,649 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/overrridecrash/A.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 A {
private protected int m() { return -1; }
}
| 1,116 | 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/tools/javac/overrridecrash/B.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 4909690
* @summary AssertionError(com.sun.tools.javac.v8.code.Symbol$MethodSymbol.isOverridableIn)
* @author gafter
*
* @compile/fail B.java
*/
public class B extends A
{
private protected int m() { return 0; }
}
| 1,295 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
RefX.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/danglingDep/RefX.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.
*/
// This class is used to check whether a class has been marked deprecated or not.
class RefX
{
void refX() {
X x = new X();
}
}
| 1,196 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Test1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/danglingDep/Test1.java | /*
* Copyright (c) 2005, 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 6213430
* @clean Test1 X RefX
* @compile/ref=Test1.out -XDrawDiagnostics Test1.java RefX.java
*/
class Test1
{
void foo() {
// the following doc comment should not affect the following class declaration
/**
* @deprecated
*/
int x;
}
}
class X {
}
| 1,380 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DepX.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/danglingDep/DepX.java | /*
* Copyright (c) 2005, 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.
*/
/*
* control test (2): verify that compiler handles at-deprecated correctly
* @test
* @clean X DepX refX
* @compile/ref=DepX.out -XDrawDiagnostics DepX.java RefX.java
*/
class DepX
{
}
/**
* X.
* @deprecated
*/
class X {
}
| 1,290 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NoDepX.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/danglingDep/NoDepX.java | /*
* Copyright (c) 2005, 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.
*/
/*
* control test (1): verify that compiler handles (lack of) at-deprecated correctly
* @test
* @clean NoDepX X RefX
* @compile/ref=NoDepX.out -XDrawDiagnostics NoDepX.java RefX.java
*/
class NoDepX
{
}
/**
* X.
* not deprecated
*/
class X {
}
| 1,311 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestMethod.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/TestMethod.java | /*
* Copyright (c) 2006, 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.
*/
// 0 means no enclosing method
class Test {
void m1(int m1_arg) {
String x = "m1; 0; 0";
String y = "m1; 0; 0";
String z = "m1; 0; 0";
Object o = new Object() {
public boolean equals(Object other) {
String p = "equals; m1; 0; 0";
String q = "equals; m1; 0; 0";
String r = "equals; m1; 0; 0";
return (this == other);
}
};
}
String s = "0; 0; 0";
boolean b = new Object() {
public boolean equals(Object other) {
String p = "equals; 0; 0; 0";
String q = "equals; 0; 0; 0";
String r = "equals; 0; 0; 0";
return (this == other);
}
}.equals(null);
class Test2 {
String s = "0; 0; 0; 0";
}
}
| 1,894 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
CheckLocalElements.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/CheckLocalElements.java | /*
* Copyright (c) 2006, 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 6402516
* @summary need Trees.getScope(TreePath)
* @build Checker CheckLocalElements
* @run main CheckLocalElements
*/
import java.util.*;
import com.sun.source.tree.*;
import javax.lang.model.element.*;
import javax.lang.model.util.*;
/*
* Check the local elements of a scope against the contents of string literals.
*/
public class CheckLocalElements extends Checker {
public static void main(String... args) throws Exception {
Checker chk = new CheckLocalElements();
chk.check("TestLocalElements.java");
}
@Override
protected boolean checkLocal(Scope s, String ref) {
Iterator<? extends Element> elemIter = s.getLocalElements().iterator();
ref = ref.trim();
String[] refs = ref.length() == 0 ? new String[0] : ref.split("[ ]*,[ ]*", -1);
Iterator<String> refIter = Arrays.asList(refs).iterator();
String r = null;
nextElem:
while (elemIter.hasNext()) {
Element e = elemIter.next();
try {
if (r == null)
r = refIter.next();
while (r.endsWith(".*")) {
String encl = getEnclosingName(e);
String rBase = r.substring(0, r.length() - 2);
if (encl.equals(rBase) || encl.startsWith(rBase + "."))
continue nextElem;
r = refIter.next();
}
if (r.equals("-") && (e.getSimpleName().length() == 0)
|| e.getSimpleName().toString().equals(r)) {
r = null;
continue nextElem;
}
error(s, ref, "mismatch: " + e.getSimpleName() + " " + r);
return false;
} catch (NoSuchElementException ex) { // from refIter.next()
error(s, null, "scope has unexpected entry: " + e.getSimpleName());
return false;
}
}
if (refIter.hasNext()) {
error(s, ref, "scope is missing entry: " + refIter.next());
return false;
}
return true;
}
private String getEnclosingName(Element e) {
Element encl = e.getEnclosingElement();
return encl == null ? "" : encl.accept(qualNameVisitor, null);
}
private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor7<String,Void>() {
protected String defaultAction(Element e, Void ignore) {
return "";
}
public String visitPackage(PackageElement e, Void ignore) {
return e.getQualifiedName().toString();
}
public String visitType(TypeElement e, Void ignore) {
return e.getQualifiedName().toString();
}
};
}
| 3,858 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
CheckClass.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/CheckClass.java | /*
* Copyright (c) 2006, 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 6402516
* @summary need Trees.getScope(TreePath)
* @build Checker CheckClass
* @run main CheckClass
*/
import java.util.*;
import com.sun.source.tree.*;
import javax.lang.model.element.*;
import javax.lang.model.util.*;
/*
* Check the enclosing class of a scope against the contents of string literals.
*/
public class CheckClass extends Checker {
public static void main(String... args) throws Exception {
Checker chk = new CheckClass();
chk.check("TestClass.java");
}
@Override
protected boolean checkLocal(Scope s, String ref) {
//System.err.println("checkLocal: " + s + " " + ref + " " + s.getEnclosingClass());
TypeElement te = s.getEnclosingClass();
boolean ok;
if (te == null)
ok = ref.equals("0");
else {
CharSequence name = te.getQualifiedName();
ok = ref.equals(name == null || name.length() == 0 ? "-" : name.toString());
}
if (!ok)
error(s, ref, "bad enclosing class found: " + te);
return ok;
}
}
| 2,139 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestLocalElements.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/TestLocalElements.java | /*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.util.List;
import java.io.*;
class Test {
void m1(int m1_arg) {
String x = "x, m1_arg, super, this; List, Test2, Test; java.io.*, java.lang.*";
String y = "y, x, m1_arg, super, this; List, Test2, Test; java.io.*, java.lang.*";
String z = "z, y, x, m1_arg, super, this; List, Test2, Test; java.io.*, java.lang.*";
Object o = new Object() {
public boolean equals(Object other) {
String p = "p, other, super, this; -, o, z, y, x, m1_arg, super, this; List, Test2, Test; java.io.*, java.lang.*";
String q = "q, p, other, super, this; -, o, z, y, x, m1_arg, super, this; List, Test2, Test; java.io.*, java.lang.*";
String r = "r, q, p, other, super, this; -, o, z, y, x, m1_arg, super, this; List, Test2, Test; java.io.*, java.lang.*";
return (this == other);
}
};
}
String s = "super, this; List, Test2, Test; java.io.*, java.lang.*";
boolean b = new Object() {
public boolean equals(Object other) {
String p = "p, other, super, this; super, this; List, Test2, Test; java.io.*, java.lang.*";
String q = "q, p, other, super, this; super, this; List, Test2, Test; java.io.*, java.lang.*";
String r = "r, q, p, other, super, this; super, this; List, Test2, Test; java.io.*, java.lang.*";
return (this == other);
}
}.equals(null);
}
class Test2 { }
| 2,546 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
A.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/A.java | /*
* Copyright (c) 2006, 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 p;
public class A {
public int publ;
protected int prot;
private int priv;
}
| 1,149 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestClass.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/TestClass.java | /*
* Copyright (c) 2006, 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.
*/
// 0 means no enclosing class
// - means anonymous enclosing class
class Test {
void m1(int m1_arg) {
String x = "Test; 0; 0";
String y = "Test; 0; 0";
String z = "Test; 0; 0";
Object o = new Object() {
public boolean equals(Object other) {
String p = "-; Test; 0; 0";
String q = "-; Test; 0; 0";
String r = "-; Test; 0; 0";
return (this == other);
}
};
}
String s = "Test; 0; 0";
boolean b = new Object() {
public boolean equals(Object other) {
String p = "-; Test; 0; 0";
String q = "-; Test; 0; 0";
String r = "-; Test; 0; 0";
return (this == other);
}
}.equals(null);
class Test2 {
String s = "Test.Test2; Test; 0; 0";
}
}
| 1,936 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
CheckIsAccessible.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/CheckIsAccessible.java | /*
* Copyright (c) 2006, 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 6402516
* @summary need Trees.getScope(TreePath)
* @build Checker CheckIsAccessible
* @run main CheckIsAccessible
*/
import java.util.*;
import com.sun.source.tree.*;
import com.sun.source.util.*;
import javax.lang.model.element.*;
import javax.lang.model.type.*;
import javax.lang.model.util.*;
/*
* Check the accessibility of items of a scope against the contents of string literals.
*/
public class CheckIsAccessible extends Checker {
public static void main(String... args) throws Exception {
Checker chk = new CheckIsAccessible();
chk.check("TestIsAccessible.java", "A.java");
}
@Override
protected boolean check(Scope s, String ref) {
System.err.println("checkIsAccessible: " + s + " " + s.getEnclosingClass() + " " + ref);
if (ref.length() == 0)
return true;
Trees trees = getTrees();
String[] args = ref.split(" +", 3);
boolean expect = args[args.length - 1].equals("yes");
boolean actual;
switch (args.length) {
case 2:
TypeElement te = getTypeElement(args[0]);
actual = trees.isAccessible(s, te);
if (actual != expect)
error(s, ref, "accessible issue found: " + te + " " + actual);
break;
case 3:
DeclaredType site = getType(args[0]);
Element member = getMember(args[1]);
actual = trees.isAccessible(s, member, site);
if (actual != expect)
error(s, ref, "accessible issue found: " + member + "@" + site + " " + actual);
break;
default:
throw new IllegalArgumentException(ref);
}
return (actual == expect);
}
private TypeElement getTypeElement(String name) {
TypeElement te = getElements().getTypeElement(name);
if (te == null)
throw new IllegalArgumentException("can't find element " + name);
return te;
}
private DeclaredType getType(String name) {
return (DeclaredType)(getTypeElement(name).asType());
}
private Element getMember(String name) {
int sep = name.indexOf("#");
String tname = name.substring(0, sep);
String mname = name.substring(sep+1);
TypeElement te = getTypeElement(tname);
for (Element e: te.getEnclosedElements()) {
if (mname.contentEquals(e.getSimpleName()))
return e;
}
throw new IllegalArgumentException("can't find member " + mname + " in " + tname);
}
}
| 3,627 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Checker.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/Checker.java | /*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.*;
import java.util.*;
import javax.lang.model.util.*;
import javax.tools.*;
import com.sun.tools.javac.api.*;
import com.sun.source.tree.*;
import com.sun.source.util.*;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.JCTree.*;
import com.sun.tools.javac.util.Position;
/*
* Abstract class to help check the scopes in a parsed source file.
* -- parse source file
* -- scan trees looking for string literals
* -- check the scope at that point against the string, using
* boolean check(Scope s, String ref)
*/
abstract class Checker {
// parse the source file and call check(scope, string) for each string literal found
void check(String... fileNames) throws IOException {
File testSrc = new File(System.getProperty("test.src"));
DiagnosticListener<JavaFileObject> dl = new DiagnosticListener<JavaFileObject>() {
public void report(Diagnostic d) {
System.err.println(d);
if (d.getKind() == Diagnostic.Kind.ERROR)
errors = true;
new Exception().printStackTrace();
}
};
JavacTool tool = JavacTool.create();
StandardJavaFileManager fm = tool.getStandardFileManager(dl, null, null);
Iterable<? extends JavaFileObject> files =
fm.getJavaFileObjectsFromFiles(getFiles(testSrc, fileNames));
task = tool.getTask(null, fm, dl, null, null, files);
Iterable<? extends CompilationUnitTree> units = task.parse();
if (errors)
throw new AssertionError("errors occurred creating trees");
ScopeScanner s = new ScopeScanner();
for (CompilationUnitTree unit: units) {
TreePath p = new TreePath(unit);
s.scan(p, getTrees());
}
task = null;
if (errors)
throw new AssertionError("errors occurred checking scopes");
}
// default impl: split ref at ";" and call checkLocal(scope, ref_segment) on scope and its enclosing scopes
protected boolean check(Scope s, String ref) {
// System.err.println("check scope: " + s);
// System.err.println("check ref: " + ref);
if (s == null && (ref == null || ref.trim().length() == 0))
return true;
if (s == null) {
error(s, ref, "scope missing");
return false;
}
if (ref == null) {
error(s, ref, "scope unexpected");
return false;
}
String local;
String encl;
int semi = ref.indexOf(';');
if (semi == -1) {
local = ref;
encl = null;
} else {
local = ref.substring(0, semi);
encl = ref.substring(semi + 1);
}
return checkLocal(s, local.trim())
& check(s.getEnclosingScope(), encl);
}
// override if using default check(Scope,String)
boolean checkLocal(Scope s, String ref) {
throw new IllegalStateException();
}
void error(Scope s, String ref, String msg) {
System.err.println("Error: " + msg);
System.err.println("Scope: " + (s == null ? null : asList(s.getLocalElements())));
System.err.println("Expect: " + ref);
System.err.println("javac: " + (s == null ? null : ((JavacScope) s).getEnv()));
errors = true;
}
protected Elements getElements() {
return task.getElements();
}
protected Trees getTrees() {
return Trees.instance(task);
}
boolean errors = false;
protected JavacTask task;
// scan a parse tree, and for every string literal found, call check(scope, string) with
// the string value at the scope at that point
class ScopeScanner extends TreePathScanner<Boolean,Trees> {
public Boolean visitLiteral(LiteralTree tree, Trees trees) {
TreePath path = getCurrentPath();
CompilationUnitTree unit = path.getCompilationUnit();
Position.LineMap lineMap = ((JCCompilationUnit)unit).lineMap;
// long line = lineMap.getLineNumber(((JCTree)tree).pos/*trees.getSourcePositions().getStartPosition(tree)*/);
// System.err.println(line + ": " + abbrev(tree));
Scope s = trees.getScope(path);
if (tree.getKind() == Tree.Kind.STRING_LITERAL)
check(s, tree.getValue().toString().trim());
return null;
}
private String abbrev(Tree tree) {
int max = 48;
String s = tree.toString().replaceAll("[ \n]+", " ");
return (s.length() < max ? s : s.substring(0, max-3) + "...");
}
}
// prefix filenames with a directory
static Iterable<File> getFiles(File dir, String... names) {
List<File> files = new ArrayList<File>(names.length);
for (String name: names)
files.add(new File(dir, name));
return files;
}
static private <T> List<T> asList(Iterable<T> iter) {
List<T> l = new ArrayList<T>();
for (T t: iter)
l.add(t);
return l;
}
}
| 6,160 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TestIsAccessible.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/TestIsAccessible.java | /*
* Copyright (c) 2006, 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 p.A;
class Test1 {
String ss = " p.A yes";
String sa = "p.A p.A#publ yes";
String sq = "p.A p.A#prot no ";
String sr = "Test2 p.A#prot no ";
String sx = "p.A p.A#priv no ";
String s2 = " Test2 yes";
String s3 = "Test2 Test2#stat yes";
static class Test1a {
String s1 = "Test2 Test2#priv no";
}
}
class Test2 extends A {
private int priv;
static int stat;
String ss = " p.A yes";
String sa = "p.A p.A#publ yes";
String sq = "p.A p.A#prot no ";
String sr = "Test2 p.A#prot yes";
String sx = "p.A p.A#priv no ";
static class Test2a {
String s1 = "Test2 Test2#priv yes";
}
}
| 1,766 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
CheckMethod.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6402516/CheckMethod.java | /*
* Copyright (c) 2006, 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 6402516
* @summary need Trees.getScope(TreePath)
* @build Checker CheckMethod
* @run main CheckMethod
*/
import java.util.*;
import com.sun.source.tree.*;
import javax.lang.model.element.*;
import javax.lang.model.util.*;
/*
* Check the enclosing method of a scope against the contents of string literals.
*/
public class CheckMethod extends Checker {
public static void main(String... args) throws Exception {
Checker chk = new CheckMethod();
chk.check("TestMethod.java");
}
@Override
protected boolean checkLocal(Scope s, String ref) {
//System.err.println("checkLocal: " + s + " " + ref + " " + s.getEnclosingMethod());
ExecutableElement ee = s.getEnclosingMethod();
boolean ok;
if (ee == null)
ok = ref.equals("0");
else {
CharSequence name = ee.getSimpleName();
ok = ref.equals(name == null || name.length() == 0 ? "-" : name.toString());
}
if (!ok)
error(s, ref, "bad enclosing method found: " + ee);
return ok;
}
}
| 2,151 | 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/tools/javac/5045412/Bar.java | /*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 5045412 6627366
* @compile -Xlint:serial -XDfailcomplete=java.io.Serializable Bar.java
*/
/**
* @test
* @bug 5045412 6627366
* @compile -Xlint:serial -XDfailcomplete=java.io.Serializable Bar.java Foo.java
*/
class Bar implements java.io.Serializable { }
| 1,341 | 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/tools/javac/5045412/Foo.java | /*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 5045412 6627366
* @compile -Xlint:serial -XDfailcomplete=java.io.Serializable Foo.java
*/
/**
* @test
* @bug 5045412 6627366
* @compile -Xlint:serial -XDfailcomplete=java.io.Serializable Foo.java Bar.java
*/
class Foo { }
| 1,309 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
R2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/innerClassFile/y/R2.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 y;
public final class R2 {
x.B.C a = null;
x.C b = null;
}
| 1,128 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Main.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/innerClassFile/y/Main.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 y;
class Main {
private R1 a;
private R2 b;
private R3 c;
}
| 1,145 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
R3.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/innerClassFile/y/R3.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 y;
public final class R3 {
x.B.C a = null;
x.C b = null;
R1 c = new R1();
}
| 1,149 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
R1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/innerClassFile/y/R1.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 y;
public final class R1 {
x.B.C a = null;
x.C b = null;
R2 c = new R2();
}
| 1,149 | 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/tools/javac/innerClassFile/x/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 x;
import x.*;
public class C {}
| 1,095 | 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/tools/javac/innerClassFile/x/B.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 x;
import x.*;
public class B {
public static class C {}
}
| 1,125 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DeprecatedDocComment.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/depDocComment/DeprecatedDocComment.java | /**
* @test /nodynamiccopyright/
* @bug 4241231 4785453
* @summary Make sure the compiler scans for deprecated tag in legal
* docComment only
* @author Jing Qian
*
* @compile DeprecatedDocComment2.java
* @compile/fail/ref=DeprecatedDocComment.out -XDrawDiagnostics -Werror -deprecation DeprecatedDocComment.java
*/
// WARNING: This file needs to be compiled with the -deprecation flag on.
// DeprecatedDocCommentTest2.java in test/tools/javac/depDocComment/
// should be compiled first before this file can be compiled. This is because
// the compiler *does not* issue deprecation warnings for a file currently
// being compiled.
// The test passes iff the compile issues deprecation warnings for
// deprecatedTest 1, 5, and 6; and fails with an unclosed comment error
// The test does not need to be run.
//import depDocComment.*;
public class DeprecatedDocComment {
public static void main(String argv[]) {
DeprecatedDocComment2.deprecatedTest1();
DeprecatedDocComment2.deprecatedTest2();
DeprecatedDocComment2.deprecatedTest3();
DeprecatedDocComment2.deprecatedTest4();
DeprecatedDocComment2.deprecatedTest5();
DeprecatedDocComment2.deprecatedTest6();
DeprecatedDocComment2.deprecatedTest7();
DeprecatedDocComment2.deprecatedTest8();
}
}
| 1,313 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DeprecatedDocComment2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/depDocComment/DeprecatedDocComment2.java | /*
* Copyright (c) 1999, 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.
*/
// WARNING: this file much be compiled first before DeprecatedDocCommentTest.java
// in test/tools/javac/ is compiled. This is because the compiler *does not*
// print deprecation warnings for a file currently being compiled.
// If this file fails to compile, then the test has failed. The test does not
// need to be run.
//package depDocComment ;
public class DeprecatedDocComment2 {
public static void main(String argv[]) {
// should just skip over this one
System.out.println("Hello World");
/* and this one too */
System.out.println("Hello World");
}
/**
* @deprecated The compiler should print out deprecation warning for this
* function
*/
public static void deprecatedTest1() {
System.out.println("1");
}
/*
* @deprecated The compiler should not print deprecation warning since this
* is not a legal docComment
*/
public static void deprecatedTest2() {
System.out.println("1");
}
/*
* @deprecated Nor this one */
public static void deprecatedTest3() {
System.out.println("1");
}
/* @deprecated Nor this */
public static void deprecatedTest4() {
System.out.println("1");
}
/** @deprecated But it should for this */
public static void deprecatedTest5() {
System.out.println("1");
}
/**@deprecated But it should for this*/
public static void deprecatedTest6() {
System.out.println("1");
}
/*
@deprecated But not for this
*/
public static void deprecatedTest7() {
System.out.println("1");
}
/**
* not at the beginning of line @deprecated But not for this
*/
public static void deprecatedTest8() {
System.out.println("1");
}
}
| 2,768 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SuppressDeprecation.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/depDocComment/SuppressDeprecation.java | /**
* @test /nodynamiccopyright/
* @bug 4216683 4346296 4656556 4785453
* @summary New rules for when deprecation messages are suppressed
* @author gafter
*
* @compile/ref=SuppressDeprecation.out -Xlint:deprecation -XDrawDiagnostics SuppressDeprecation.java
*/
/* Test for the contexts in which deprecations warnings should
* (and should not) be given. They should be given when
* o invoking a deprecated method from a non-deprecated one.
* o new X() using a deprecated constructor
* o super() to a deprecated constructor
* o extending a deprecated class.
* But deprecation messages are suppressed as follows:
* o Never complain about code in the same outermost class as
* the deprecated entity.
* o Extending a deprecated class with a deprecated one is OK.
* o Overriding a deprecated method with a deprecated one is OK.
* o Code appearing in a deprecated class is OK.
*
*/
class T {
/** var.
* @deprecated . */
int var;
/** f.
* @deprecated . */
void f() {
}
/** g.
* @deprecated . */
void g() {
f();
}
void h() {
f();
}
/** T.
* @deprecated . */
T() {
}
/** T.
* @deprecated . */
T(int i) {
this();
}
T(float f) {
this();
}
void xyzzy() {
new T();
new T(1.4f);
}
/** plugh.
* @deprecated . */
void plugh() {
new T();
new T(1.45f);
}
/** calcx..
* @deprecated . */
int calcx() { return 0; }
}
class U extends T {
/** f.
* @deprecated . */
void f() {
}
void g() { // error (1)
super.g(); // error (2)
var = 12; // error (3)
}
U() {} // error (4)
U(int i) {
super(i); // error (5)
}
U(float f) {
super(1.3f);
}
}
class V extends T {} // error (6)
/** W.
* @deprecated . */
class W extends T { // ok - inside deprecated class
/** W.
* @deprecated . */
static {
new T(1.3f).g(); // ok - called from deprecated static block
}
/** W.
* @deprecated . */
{
new T(1.3f).g(); // ok - called from deprecated block
}
{
new T(1.3f).g(); // ok - inside deprecated class
}
int x = calcx(); // ok - inside deprecated class
/** y.
* @deprecated . */
int y = calcx();
}
/** X.
* @deprecated . */
class X {}
class Y extends X {} // ok - not overriding anything
/** Z.
* @deprecated . */
class Z extends X {}
| 2,517 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DeepNestedFinally.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6464451/DeepNestedFinally.java | /*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 6464451
* @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
* @author Wei Tao
* @compile -source 5 -target 5 DeepNestedFinally.java
* @clean DeepNestedFinally
* @compile/fail DeepNestedFinally.java
*/
public class DeepNestedFinally {
static public int func(int i) {
try {
if(i == 1) return 1;
} finally {
try {
if(i == 2) return 2;
} finally {
try {
if(i == 3) return 3;
} finally {
try {
if(i == 4) return 4;
} finally {
try {
if(i == 5) return 5;
} finally {
try {
if(i == 6) return 6;
} finally {
try {
if (i == 7) return 7;
} finally {
int x = 0;
x += 1;
x += 2;
x += 3;
x += 4;
x += 5;
x += 6;
x += 7;
x += 8;
x += 9;
}
}
}
}
}
}
}
return 0;
}
}
| 2,584 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
BigFinally.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6464451/BigFinally.java | /*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 6464451
* @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
* @author Wei Tao
* @compile -source 5 -target 5 BigFinally.java
* @clean BigFinally
* @compile/fail BigFinally.java
*/
public class BigFinally {
static public int func(int i) {
try {
if(i == 1) return 1;
} finally {
try {
if(i == 2) return 2;
if(i == 3 ) return 3;
if(i == 4 ) return 4;
if(i == 5 ) return 5;
if(i == 6 ) return 6;
if(i == 7 ) return 7;
if(i == 8 ) return 8;
if(i == 9 ) return 9;
if(i == 10 ) return 10;
if(i == 11 ) return 11;
if(i == 12 ) return 12;
if(i == 13 ) return 13;
if(i == 14 ) return 14;
if(i == 15 ) return 15;
if(i == 16 ) return 16;
if(i == 17 ) return 17;
if(i == 18 ) return 18;
if(i == 19 ) return 19;
if(i == 20 ) return 20;
if(i == 21 ) return 21;
if(i == 22 ) return 22;
if(i == 23 ) return 23;
if(i == 24 ) return 24;
if(i == 25 ) return 25;
if(i == 26 ) return 26;
if(i == 27 ) return 27;
if(i == 28 ) return 28;
if(i == 29 ) return 29;
if(i == 30 ) return 30;
if(i == 31 ) return 31;
if(i == 32 ) return 32;
if(i == 33 ) return 33;
if(i == 34 ) return 34;
if(i == 35 ) return 35;
if(i == 36 ) return 36;
if(i == 37 ) return 37;
if(i == 38 ) return 38;
if(i == 39 ) return 39;
if(i == 40 ) return 40;
if(i == 41 ) return 41;
if(i == 42 ) return 42;
if(i == 43 ) return 43;
if(i == 44 ) return 44;
if(i == 45 ) return 45;
if(i == 46 ) return 46;
if(i == 47 ) return 47;
if(i == 48 ) return 48;
if(i == 49 ) return 49;
if(i == 50 ) return 50;
if(i == 51 ) return 51;
if(i == 52 ) return 52;
if(i == 53 ) return 53;
if(i == 54 ) return 54;
if(i == 55 ) return 55;
if(i == 56 ) return 56;
if(i == 57 ) return 57;
if(i == 58 ) return 58;
if(i == 59 ) return 59;
if(i == 60 ) return 60;
if(i == 61 ) return 61;
if(i == 62 ) return 62;
if(i == 63 ) return 63;
if(i == 64 ) return 64;
if(i == 65 ) return 65;
if(i == 66 ) return 66;
if(i == 67 ) return 67;
if(i == 68 ) return 68;
if(i == 69 ) return 69;
if(i == 70 ) return 70;
if(i == 71 ) return 71;
if(i == 72 ) return 72;
if(i == 73 ) return 73;
if(i == 74 ) return 74;
if(i == 75 ) return 75;
if(i == 76 ) return 76;
if(i == 77 ) return 77;
if(i == 78 ) return 78;
if(i == 79 ) return 79;
if(i == 80 ) return 80;
if(i == 81 ) return 81;
if(i == 82 ) return 82;
if(i == 83 ) return 83;
if(i == 84 ) return 84;
if(i == 85 ) return 85;
if(i == 86 ) return 86;
if(i == 87 ) return 87;
if(i == 88 ) return 88;
if(i == 89 ) return 89;
if(i == 90 ) return 90;
if(i == 91 ) return 91;
if(i == 92 ) return 92;
if(i == 93 ) return 93;
if(i == 94 ) return 94;
if(i == 95 ) return 95;
if(i == 96 ) return 96;
if(i == 97 ) return 97;
if(i == 98 ) return 98;
if(i == 99 ) return 99;
if(i == 100 ) return 100;
} finally {
int x = 0;
x += 1;
x += 2;
x += 3;
x += 4;
x += 5;
x += 6;
x += 7;
x += 8;
x += 9;
x += 10;
x += 11;
x += 12;
x += 13;
x += 14;
x += 15;
x += 16;
x += 17;
x += 18;
x += 19;
x += 20;
x += 21;
x += 22;
x += 23;
x += 24;
x += 25;
x += 26;
x += 27;
x += 28;
x += 29;
x += 30;
x += 31;
x += 32;
x += 33;
x += 34;
x += 35;
x += 36;
x += 37;
x += 38;
x += 39;
x += 40;
x += 41;
x += 42;
x += 43;
x += 44;
x += 45;
x += 46;
x += 47;
x += 48;
x += 49;
x += 50;
x += 51;
x += 52;
x += 53;
x += 54;
x += 55;
x += 56;
x += 57;
x += 58;
x += 59;
x += 60;
x += 61;
x += 62;
x += 63;
x += 64;
x += 65;
x += 66;
x += 67;
x += 68;
x += 69;
x += 70;
x += 71;
x += 72;
x += 73;
x += 74;
x += 75;
x += 76;
x += 77;
x += 78;
x += 79;
x += 80;
x += 81;
x += 82;
x += 83;
x += 84;
x += 85;
x += 86;
x += 87;
x += 88;
x += 89;
x += 90;
x += 91;
x += 92;
x += 93;
x += 94;
x += 95;
x += 96;
x += 97;
x += 98;
x += 99;
x += 100;
}
}
return 0;
}
}
| 7,986 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ManyExitsInTry.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6464451/ManyExitsInTry.java | /*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 6464451
* @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
* @author Wei Tao
* @compile -source 5 -target 5 ManyExitsInTry.java
* @clean ManyExitsInTry
* @compile/fail ManyExitsInTry.java
*/
public class ManyExitsInTry {
static public int func(int i) {
try {
if(i == 0 ) return 0;
if(i == 1 ) return 1;
if(i == 2 ) return 2;
if(i == 3 ) return 3;
if(i == 4 ) return 4;
if(i == 5 ) return 5;
if(i == 6 ) return 6;
if(i == 7 ) return 7;
if(i == 8 ) return 8;
if(i == 9 ) return 9;
if(i == 10 ) return 10;
if(i == 11 ) return 11;
if(i == 12 ) return 12;
if(i == 13 ) return 13;
if(i == 14 ) return 14;
if(i == 15 ) return 15;
if(i == 16 ) return 16;
if(i == 17 ) return 17;
if(i == 18 ) return 18;
if(i == 19 ) return 19;
if(i == 20 ) return 20;
if(i == 21 ) return 21;
if(i == 22 ) return 22;
if(i == 23 ) return 23;
if(i == 24 ) return 24;
if(i == 25 ) return 25;
if(i == 26 ) return 26;
if(i == 27 ) return 27;
if(i == 28 ) return 28;
if(i == 29 ) return 29;
if(i == 30 ) return 30;
if(i == 31 ) return 31;
if(i == 32 ) return 32;
if(i == 33 ) return 33;
if(i == 34 ) return 34;
if(i == 35 ) return 35;
if(i == 36 ) return 36;
if(i == 37 ) return 37;
if(i == 38 ) return 38;
if(i == 39 ) return 39;
if(i == 40 ) return 40;
if(i == 41 ) return 41;
if(i == 42 ) return 42;
if(i == 43 ) return 43;
if(i == 44 ) return 44;
if(i == 45 ) return 45;
if(i == 46 ) return 46;
if(i == 47 ) return 47;
if(i == 48 ) return 48;
if(i == 49 ) return 49;
if(i == 50 ) return 50;
if(i == 51 ) return 51;
if(i == 52 ) return 52;
if(i == 53 ) return 53;
if(i == 54 ) return 54;
if(i == 55 ) return 55;
if(i == 56 ) return 56;
if(i == 57 ) return 57;
if(i == 58 ) return 58;
if(i == 59 ) return 59;
if(i == 60 ) return 60;
if(i == 61 ) return 61;
if(i == 62 ) return 62;
if(i == 63 ) return 63;
if(i == 64 ) return 64;
if(i == 65 ) return 65;
if(i == 66 ) return 66;
if(i == 67 ) return 67;
if(i == 68 ) return 68;
if(i == 69 ) return 69;
if(i == 70 ) return 70;
if(i == 71 ) return 71;
if(i == 72 ) return 72;
if(i == 73 ) return 73;
if(i == 74 ) return 74;
if(i == 75 ) return 75;
if(i == 76 ) return 76;
if(i == 77 ) return 77;
if(i == 78 ) return 78;
if(i == 79 ) return 79;
if(i == 80 ) return 80;
if(i == 81 ) return 81;
if(i == 82 ) return 82;
if(i == 83 ) return 83;
if(i == 84 ) return 84;
if(i == 85 ) return 85;
if(i == 86 ) return 86;
if(i == 87 ) return 87;
if(i == 88 ) return 88;
if(i == 89 ) return 89;
if(i == 90 ) return 90;
if(i == 91 ) return 91;
if(i == 92 ) return 92;
if(i == 93 ) return 93;
if(i == 94 ) return 94;
if(i == 95 ) return 95;
if(i == 96 ) return 96;
if(i == 97 ) return 97;
if(i == 98 ) return 98;
if(i == 99 ) return 99;
if(i == 100 ) return 100;
if(i == 101 ) return 101;
if(i == 102 ) return 102;
if(i == 103 ) return 103;
if(i == 104 ) return 104;
if(i == 105 ) return 105;
if(i == 106 ) return 106;
if(i == 107 ) return 107;
if(i == 108 ) return 108;
if(i == 109 ) return 109;
if(i == 110 ) return 110;
if(i == 111 ) return 111;
if(i == 112 ) return 112;
if(i == 113 ) return 113;
if(i == 114 ) return 114;
if(i == 115 ) return 115;
if(i == 116 ) return 116;
if(i == 117 ) return 117;
if(i == 118 ) return 118;
if(i == 119 ) return 119;
if(i == 120 ) return 120;
if(i == 121 ) return 121;
if(i == 122 ) return 122;
if(i == 123 ) return 123;
if(i == 124 ) return 124;
if(i == 125 ) return 125;
if(i == 126 ) return 126;
if(i == 127 ) return 127;
if(i == 128 ) return 128;
if(i == 129 ) return 129;
if(i == 130 ) return 130;
if(i == 131 ) return 131;
if(i == 132 ) return 132;
if(i == 133 ) return 133;
if(i == 134 ) return 134;
if(i == 135 ) return 135;
if(i == 136 ) return 136;
if(i == 137 ) return 137;
if(i == 138 ) return 138;
if(i == 139 ) return 139;
if(i == 140 ) return 140;
if(i == 141 ) return 141;
if(i == 142 ) return 142;
if(i == 143 ) return 143;
if(i == 144 ) return 144;
if(i == 145 ) return 145;
if(i == 146 ) return 146;
if(i == 147 ) return 147;
if(i == 148 ) return 148;
if(i == 149 ) return 149;
if(i == 150 ) return 150;
if(i == 151 ) return 151;
if(i == 152 ) return 152;
if(i == 153 ) return 153;
if(i == 154 ) return 154;
if(i == 155 ) return 155;
if(i == 156 ) return 156;
if(i == 157 ) return 157;
if(i == 158 ) return 158;
if(i == 159 ) return 159;
if(i == 160 ) return 160;
if(i == 161 ) return 161;
if(i == 162 ) return 162;
if(i == 163 ) return 163;
if(i == 164 ) return 164;
if(i == 165 ) return 165;
if(i == 166 ) return 166;
if(i == 167 ) return 167;
if(i == 168 ) return 168;
if(i == 169 ) return 169;
if(i == 170 ) return 170;
if(i == 171 ) return 171;
if(i == 172 ) return 172;
if(i == 173 ) return 173;
if(i == 174 ) return 174;
if(i == 175 ) return 175;
if(i == 176 ) return 176;
if(i == 177 ) return 177;
if(i == 178 ) return 178;
if(i == 179 ) return 179;
if(i == 180 ) return 180;
if(i == 181 ) return 181;
if(i == 182 ) return 182;
if(i == 183 ) return 183;
if(i == 184 ) return 184;
if(i == 185 ) return 185;
if(i == 186 ) return 186;
if(i == 187 ) return 187;
if(i == 188 ) return 188;
if(i == 189 ) return 189;
if(i == 190 ) return 190;
if(i == 191 ) return 191;
if(i == 192 ) return 192;
if(i == 193 ) return 193;
if(i == 194 ) return 194;
if(i == 195 ) return 195;
if(i == 196 ) return 196;
if(i == 197 ) return 197;
if(i == 198 ) return 198;
if(i == 199 ) return 199;
if(i == 200 ) return 200;
if(i == 201 ) return 201;
if(i == 202 ) return 202;
if(i == 203 ) return 203;
if(i == 204 ) return 204;
if(i == 205 ) return 205;
if(i == 206 ) return 206;
if(i == 207 ) return 207;
if(i == 208 ) return 208;
if(i == 209 ) return 209;
if(i == 210 ) return 210;
if(i == 211 ) return 211;
if(i == 212 ) return 212;
if(i == 213 ) return 213;
if(i == 214 ) return 214;
if(i == 215 ) return 215;
if(i == 216 ) return 216;
if(i == 217 ) return 217;
if(i == 218 ) return 218;
if(i == 219 ) return 219;
if(i == 220 ) return 220;
if(i == 221 ) return 221;
if(i == 222 ) return 222;
if(i == 223 ) return 223;
if(i == 224 ) return 224;
if(i == 225 ) return 225;
if(i == 226 ) return 226;
if(i == 227 ) return 227;
if(i == 228 ) return 228;
if(i == 229 ) return 229;
if(i == 230 ) return 230;
if(i == 231 ) return 231;
if(i == 232 ) return 232;
if(i == 233 ) return 233;
if(i == 234 ) return 234;
if(i == 235 ) return 235;
if(i == 236 ) return 236;
if(i == 237 ) return 237;
if(i == 238 ) return 238;
if(i == 239 ) return 239;
if(i == 240 ) return 240;
if(i == 241 ) return 241;
if(i == 242 ) return 242;
if(i == 243 ) return 243;
if(i == 244 ) return 244;
if(i == 245 ) return 245;
if(i == 246 ) return 246;
if(i == 247 ) return 247;
if(i == 248 ) return 248;
if(i == 249 ) return 249;
if(i == 250 ) return 250;
if(i == 251 ) return 251;
if(i == 252 ) return 252;
if(i == 253 ) return 253;
if(i == 254 ) return 254;
if(i == 255 ) return 255;
if(i == 256 ) return 256;
if(i == 257 ) return 257;
if(i == 258 ) return 258;
if(i == 259 ) return 259;
if(i == 260 ) return 260;
if(i == 261 ) return 261;
if(i == 262 ) return 262;
if(i == 263 ) return 263;
if(i == 264 ) return 264;
if(i == 265 ) return 265;
if(i == 266 ) return 266;
if(i == 267 ) return 267;
if(i == 268 ) return 268;
if(i == 269 ) return 269;
if(i == 270 ) return 270;
if(i == 271 ) return 271;
if(i == 272 ) return 272;
if(i == 273 ) return 273;
if(i == 274 ) return 274;
if(i == 275 ) return 275;
if(i == 276 ) return 276;
if(i == 277 ) return 277;
if(i == 278 ) return 278;
if(i == 279 ) return 279;
if(i == 280 ) return 280;
if(i == 281 ) return 281;
if(i == 282 ) return 282;
if(i == 283 ) return 283;
if(i == 284 ) return 284;
if(i == 285 ) return 285;
if(i == 286 ) return 286;
if(i == 287 ) return 287;
if(i == 288 ) return 288;
if(i == 289 ) return 289;
if(i == 290 ) return 290;
if(i == 291 ) return 291;
if(i == 292 ) return 292;
if(i == 293 ) return 293;
if(i == 294 ) return 294;
if(i == 295 ) return 295;
if(i == 296 ) return 296;
if(i == 297 ) return 297;
if(i == 298 ) return 298;
if(i == 299 ) return 299;
if(i == 300 ) return 300;
if(i == 301 ) return 301;
if(i == 302 ) return 302;
if(i == 303 ) return 303;
if(i == 304 ) return 304;
if(i == 305 ) return 305;
if(i == 306 ) return 306;
if(i == 307 ) return 307;
if(i == 308 ) return 308;
if(i == 309 ) return 309;
if(i == 310 ) return 310;
if(i == 311 ) return 311;
if(i == 312 ) return 312;
if(i == 313 ) return 313;
if(i == 314 ) return 314;
if(i == 315 ) return 315;
if(i == 316 ) return 316;
if(i == 317 ) return 317;
if(i == 318 ) return 318;
if(i == 319 ) return 319;
if(i == 320 ) return 320;
if(i == 321 ) return 321;
if(i == 322 ) return 322;
if(i == 323 ) return 323;
if(i == 324 ) return 324;
if(i == 325 ) return 325;
if(i == 326 ) return 326;
if(i == 327 ) return 327;
if(i == 328 ) return 328;
if(i == 329 ) return 329;
if(i == 330 ) return 330;
if(i == 331 ) return 331;
if(i == 332 ) return 332;
if(i == 333 ) return 333;
if(i == 334 ) return 334;
if(i == 335 ) return 335;
if(i == 336 ) return 336;
if(i == 337 ) return 337;
if(i == 338 ) return 338;
if(i == 339 ) return 339;
if(i == 340 ) return 340;
if(i == 341 ) return 341;
if(i == 342 ) return 342;
if(i == 343 ) return 343;
if(i == 344 ) return 344;
if(i == 345 ) return 345;
if(i == 346 ) return 346;
if(i == 347 ) return 347;
if(i == 348 ) return 348;
if(i == 349 ) return 349;
if(i == 350 ) return 350;
if(i == 351 ) return 351;
if(i == 352 ) return 352;
if(i == 353 ) return 353;
if(i == 354 ) return 354;
if(i == 355 ) return 355;
if(i == 356 ) return 356;
if(i == 357 ) return 357;
if(i == 358 ) return 358;
if(i == 359 ) return 359;
if(i == 360 ) return 360;
if(i == 361 ) return 361;
if(i == 362 ) return 362;
if(i == 363 ) return 363;
if(i == 364 ) return 364;
if(i == 365 ) return 365;
if(i == 366 ) return 366;
if(i == 367 ) return 367;
if(i == 368 ) return 368;
if(i == 369 ) return 369;
if(i == 370 ) return 370;
if(i == 371 ) return 371;
if(i == 372 ) return 372;
if(i == 373 ) return 373;
if(i == 374 ) return 374;
if(i == 375 ) return 375;
if(i == 376 ) return 376;
if(i == 377 ) return 377;
if(i == 378 ) return 378;
if(i == 379 ) return 379;
if(i == 380 ) return 380;
if(i == 381 ) return 381;
if(i == 382 ) return 382;
if(i == 383 ) return 383;
if(i == 384 ) return 384;
if(i == 385 ) return 385;
if(i == 386 ) return 386;
if(i == 387 ) return 387;
if(i == 388 ) return 388;
if(i == 389 ) return 389;
if(i == 390 ) return 390;
if(i == 391 ) return 391;
if(i == 392 ) return 392;
if(i == 393 ) return 393;
if(i == 394 ) return 394;
if(i == 395 ) return 395;
if(i == 396 ) return 396;
if(i == 397 ) return 397;
if(i == 398 ) return 398;
if(i == 399 ) return 399;
if(i == 400 ) return 400;
if(i == 401 ) return 401;
if(i == 402 ) return 402;
if(i == 403 ) return 403;
if(i == 404 ) return 404;
if(i == 405 ) return 405;
if(i == 406 ) return 406;
if(i == 407 ) return 407;
if(i == 408 ) return 408;
if(i == 409 ) return 409;
if(i == 410 ) return 410;
if(i == 411 ) return 411;
if(i == 412 ) return 412;
if(i == 413 ) return 413;
if(i == 414 ) return 414;
if(i == 415 ) return 415;
if(i == 416 ) return 416;
if(i == 417 ) return 417;
if(i == 418 ) return 418;
if(i == 419 ) return 419;
if(i == 420 ) return 420;
if(i == 421 ) return 421;
if(i == 422 ) return 422;
if(i == 423 ) return 423;
if(i == 424 ) return 424;
if(i == 425 ) return 425;
if(i == 426 ) return 426;
if(i == 427 ) return 427;
if(i == 428 ) return 428;
if(i == 429 ) return 429;
if(i == 430 ) return 430;
if(i == 431 ) return 431;
if(i == 432 ) return 432;
if(i == 433 ) return 433;
if(i == 434 ) return 434;
if(i == 435 ) return 435;
if(i == 436 ) return 436;
if(i == 437 ) return 437;
if(i == 438 ) return 438;
if(i == 439 ) return 439;
if(i == 440 ) return 440;
if(i == 441 ) return 441;
if(i == 442 ) return 442;
if(i == 443 ) return 443;
if(i == 444 ) return 444;
if(i == 445 ) return 445;
if(i == 446 ) return 446;
if(i == 447 ) return 447;
if(i == 448 ) return 448;
if(i == 449 ) return 449;
if(i == 450 ) return 450;
if(i == 451 ) return 451;
if(i == 452 ) return 452;
if(i == 453 ) return 453;
if(i == 454 ) return 454;
if(i == 455 ) return 455;
if(i == 456 ) return 456;
if(i == 457 ) return 457;
if(i == 458 ) return 458;
if(i == 459 ) return 459;
if(i == 460 ) return 460;
if(i == 461 ) return 461;
if(i == 462 ) return 462;
if(i == 463 ) return 463;
if(i == 464 ) return 464;
if(i == 465 ) return 465;
if(i == 466 ) return 466;
if(i == 467 ) return 467;
if(i == 468 ) return 468;
if(i == 469 ) return 469;
if(i == 470 ) return 470;
if(i == 471 ) return 471;
if(i == 472 ) return 472;
if(i == 473 ) return 473;
if(i == 474 ) return 474;
if(i == 475 ) return 475;
if(i == 476 ) return 476;
if(i == 477 ) return 477;
if(i == 478 ) return 478;
if(i == 479 ) return 479;
if(i == 480 ) return 480;
if(i == 481 ) return 481;
if(i == 482 ) return 482;
if(i == 483 ) return 483;
if(i == 484 ) return 484;
if(i == 485 ) return 485;
if(i == 486 ) return 486;
if(i == 487 ) return 487;
if(i == 488 ) return 488;
if(i == 489 ) return 489;
if(i == 490 ) return 490;
if(i == 491 ) return 491;
if(i == 492 ) return 492;
if(i == 493 ) return 493;
if(i == 494 ) return 494;
if(i == 495 ) return 495;
if(i == 496 ) return 496;
if(i == 497 ) return 497;
if(i == 498 ) return 498;
if(i == 499 ) return 499;
if(i == 500 ) return 500;
if(i == 501 ) return 501;
if(i == 502 ) return 502;
if(i == 503 ) return 503;
if(i == 504 ) return 504;
if(i == 505 ) return 505;
if(i == 506 ) return 506;
if(i == 507 ) return 507;
if(i == 508 ) return 508;
if(i == 509 ) return 509;
if(i == 510 ) return 510;
if(i == 511 ) return 511;
if(i == 512 ) return 512;
if(i == 513 ) return 513;
if(i == 514 ) return 514;
if(i == 515 ) return 515;
if(i == 516 ) return 516;
if(i == 517 ) return 517;
if(i == 518 ) return 518;
if(i == 519 ) return 519;
if(i == 520 ) return 520;
if(i == 521 ) return 521;
if(i == 522 ) return 522;
if(i == 523 ) return 523;
if(i == 524 ) return 524;
if(i == 525 ) return 525;
if(i == 526 ) return 526;
if(i == 527 ) return 527;
if(i == 528 ) return 528;
if(i == 529 ) return 529;
if(i == 530 ) return 530;
if(i == 531 ) return 531;
if(i == 532 ) return 532;
if(i == 533 ) return 533;
if(i == 534 ) return 534;
if(i == 535 ) return 535;
if(i == 536 ) return 536;
if(i == 537 ) return 537;
if(i == 538 ) return 538;
if(i == 539 ) return 539;
if(i == 540 ) return 540;
if(i == 541 ) return 541;
if(i == 542 ) return 542;
if(i == 543 ) return 543;
if(i == 544 ) return 544;
if(i == 545 ) return 545;
if(i == 546 ) return 546;
if(i == 547 ) return 547;
if(i == 548 ) return 548;
if(i == 549 ) return 549;
if(i == 550 ) return 550;
if(i == 551 ) return 551;
if(i == 552 ) return 552;
if(i == 553 ) return 553;
if(i == 554 ) return 554;
if(i == 555 ) return 555;
if(i == 556 ) return 556;
if(i == 557 ) return 557;
if(i == 558 ) return 558;
if(i == 559 ) return 559;
if(i == 560 ) return 560;
if(i == 561 ) return 561;
if(i == 562 ) return 562;
if(i == 563 ) return 563;
if(i == 564 ) return 564;
if(i == 565 ) return 565;
if(i == 566 ) return 566;
if(i == 567 ) return 567;
if(i == 568 ) return 568;
if(i == 569 ) return 569;
if(i == 570 ) return 570;
if(i == 571 ) return 571;
if(i == 572 ) return 572;
if(i == 573 ) return 573;
if(i == 574 ) return 574;
if(i == 575 ) return 575;
if(i == 576 ) return 576;
if(i == 577 ) return 577;
if(i == 578 ) return 578;
if(i == 579 ) return 579;
if(i == 580 ) return 580;
if(i == 581 ) return 581;
if(i == 582 ) return 582;
if(i == 583 ) return 583;
if(i == 584 ) return 584;
if(i == 585 ) return 585;
if(i == 586 ) return 586;
if(i == 587 ) return 587;
if(i == 588 ) return 588;
if(i == 589 ) return 589;
if(i == 590 ) return 590;
if(i == 591 ) return 591;
if(i == 592 ) return 592;
if(i == 593 ) return 593;
if(i == 594 ) return 594;
if(i == 595 ) return 595;
if(i == 596 ) return 596;
if(i == 597 ) return 597;
if(i == 598 ) return 598;
if(i == 599 ) return 599;
if(i == 600 ) return 600;
if(i == 601 ) return 601;
if(i == 602 ) return 602;
if(i == 603 ) return 603;
if(i == 604 ) return 604;
if(i == 605 ) return 605;
if(i == 606 ) return 606;
if(i == 607 ) return 607;
if(i == 608 ) return 608;
if(i == 609 ) return 609;
if(i == 610 ) return 610;
if(i == 611 ) return 611;
if(i == 612 ) return 612;
if(i == 613 ) return 613;
if(i == 614 ) return 614;
if(i == 615 ) return 615;
if(i == 616 ) return 616;
if(i == 617 ) return 617;
if(i == 618 ) return 618;
if(i == 619 ) return 619;
if(i == 620 ) return 620;
if(i == 621 ) return 621;
if(i == 622 ) return 622;
if(i == 623 ) return 623;
if(i == 624 ) return 624;
if(i == 625 ) return 625;
if(i == 626 ) return 626;
if(i == 627 ) return 627;
if(i == 628 ) return 628;
if(i == 629 ) return 629;
if(i == 630 ) return 630;
if(i == 631 ) return 631;
if(i == 632 ) return 632;
if(i == 633 ) return 633;
if(i == 634 ) return 634;
if(i == 635 ) return 635;
if(i == 636 ) return 636;
if(i == 637 ) return 637;
if(i == 638 ) return 638;
if(i == 639 ) return 639;
if(i == 640 ) return 640;
if(i == 641 ) return 641;
if(i == 642 ) return 642;
if(i == 643 ) return 643;
if(i == 644 ) return 644;
if(i == 645 ) return 645;
if(i == 646 ) return 646;
if(i == 647 ) return 647;
if(i == 648 ) return 648;
if(i == 649 ) return 649;
if(i == 650 ) return 650;
if(i == 651 ) return 651;
if(i == 652 ) return 652;
if(i == 653 ) return 653;
if(i == 654 ) return 654;
if(i == 655 ) return 655;
if(i == 656 ) return 656;
if(i == 657 ) return 657;
if(i == 658 ) return 658;
if(i == 659 ) return 659;
if(i == 660 ) return 660;
if(i == 661 ) return 661;
if(i == 662 ) return 662;
if(i == 663 ) return 663;
if(i == 664 ) return 664;
if(i == 665 ) return 665;
if(i == 666 ) return 666;
if(i == 667 ) return 667;
if(i == 668 ) return 668;
if(i == 669 ) return 669;
if(i == 670 ) return 670;
if(i == 671 ) return 671;
if(i == 672 ) return 672;
if(i == 673 ) return 673;
if(i == 674 ) return 674;
if(i == 675 ) return 675;
if(i == 676 ) return 676;
if(i == 677 ) return 677;
if(i == 678 ) return 678;
if(i == 679 ) return 679;
if(i == 680 ) return 680;
if(i == 681 ) return 681;
if(i == 682 ) return 682;
if(i == 683 ) return 683;
if(i == 684 ) return 684;
if(i == 685 ) return 685;
if(i == 686 ) return 686;
if(i == 687 ) return 687;
if(i == 688 ) return 688;
if(i == 689 ) return 689;
if(i == 690 ) return 690;
if(i == 691 ) return 691;
if(i == 692 ) return 692;
if(i == 693 ) return 693;
if(i == 694 ) return 694;
if(i == 695 ) return 695;
if(i == 696 ) return 696;
if(i == 697 ) return 697;
if(i == 698 ) return 698;
if(i == 699 ) return 699;
if(i == 700 ) return 700;
if(i == 701 ) return 701;
if(i == 702 ) return 702;
if(i == 703 ) return 703;
if(i == 704 ) return 704;
if(i == 705 ) return 705;
if(i == 706 ) return 706;
if(i == 707 ) return 707;
if(i == 708 ) return 708;
if(i == 709 ) return 709;
if(i == 710 ) return 710;
if(i == 711 ) return 711;
if(i == 712 ) return 712;
if(i == 713 ) return 713;
if(i == 714 ) return 714;
if(i == 715 ) return 715;
if(i == 716 ) return 716;
if(i == 717 ) return 717;
if(i == 718 ) return 718;
if(i == 719 ) return 719;
if(i == 720 ) return 720;
if(i == 721 ) return 721;
if(i == 722 ) return 722;
if(i == 723 ) return 723;
if(i == 724 ) return 724;
if(i == 725 ) return 725;
if(i == 726 ) return 726;
if(i == 727 ) return 727;
if(i == 728 ) return 728;
if(i == 729 ) return 729;
if(i == 730 ) return 730;
if(i == 731 ) return 731;
if(i == 732 ) return 732;
if(i == 733 ) return 733;
if(i == 734 ) return 734;
if(i == 735 ) return 735;
if(i == 736 ) return 736;
if(i == 737 ) return 737;
if(i == 738 ) return 738;
if(i == 739 ) return 739;
if(i == 740 ) return 740;
if(i == 741 ) return 741;
if(i == 742 ) return 742;
if(i == 743 ) return 743;
if(i == 744 ) return 744;
if(i == 745 ) return 745;
if(i == 746 ) return 746;
if(i == 747 ) return 747;
if(i == 748 ) return 748;
if(i == 749 ) return 749;
if(i == 750 ) return 750;
if(i == 751 ) return 751;
if(i == 752 ) return 752;
if(i == 753 ) return 753;
if(i == 754 ) return 754;
if(i == 755 ) return 755;
if(i == 756 ) return 756;
if(i == 757 ) return 757;
if(i == 758 ) return 758;
if(i == 759 ) return 759;
if(i == 760 ) return 760;
if(i == 761 ) return 761;
if(i == 762 ) return 762;
if(i == 763 ) return 763;
if(i == 764 ) return 764;
if(i == 765 ) return 765;
if(i == 766 ) return 766;
if(i == 767 ) return 767;
if(i == 768 ) return 768;
if(i == 769 ) return 769;
if(i == 770 ) return 770;
if(i == 771 ) return 771;
if(i == 772 ) return 772;
if(i == 773 ) return 773;
if(i == 774 ) return 774;
if(i == 775 ) return 775;
if(i == 776 ) return 776;
if(i == 777 ) return 777;
if(i == 778 ) return 778;
if(i == 779 ) return 779;
if(i == 780 ) return 780;
if(i == 781 ) return 781;
if(i == 782 ) return 782;
if(i == 783 ) return 783;
if(i == 784 ) return 784;
if(i == 785 ) return 785;
if(i == 786 ) return 786;
if(i == 787 ) return 787;
if(i == 788 ) return 788;
if(i == 789 ) return 789;
if(i == 790 ) return 790;
if(i == 791 ) return 791;
if(i == 792 ) return 792;
if(i == 793 ) return 793;
if(i == 794 ) return 794;
if(i == 795 ) return 795;
if(i == 796 ) return 796;
if(i == 797 ) return 797;
if(i == 798 ) return 798;
if(i == 799 ) return 799;
if(i == 800 ) return 800;
if(i == 801 ) return 801;
if(i == 802 ) return 802;
if(i == 803 ) return 803;
if(i == 804 ) return 804;
if(i == 805 ) return 805;
if(i == 806 ) return 806;
if(i == 807 ) return 807;
if(i == 808 ) return 808;
if(i == 809 ) return 809;
if(i == 810 ) return 810;
if(i == 811 ) return 811;
if(i == 812 ) return 812;
if(i == 813 ) return 813;
if(i == 814 ) return 814;
if(i == 815 ) return 815;
if(i == 816 ) return 816;
if(i == 817 ) return 817;
if(i == 818 ) return 818;
if(i == 819 ) return 819;
if(i == 820 ) return 820;
if(i == 821 ) return 821;
if(i == 822 ) return 822;
if(i == 823 ) return 823;
if(i == 824 ) return 824;
if(i == 825 ) return 825;
if(i == 826 ) return 826;
if(i == 827 ) return 827;
if(i == 828 ) return 828;
if(i == 829 ) return 829;
if(i == 830 ) return 830;
if(i == 831 ) return 831;
if(i == 832 ) return 832;
if(i == 833 ) return 833;
if(i == 834 ) return 834;
if(i == 835 ) return 835;
if(i == 836 ) return 836;
if(i == 837 ) return 837;
if(i == 838 ) return 838;
if(i == 839 ) return 839;
if(i == 840 ) return 840;
if(i == 841 ) return 841;
if(i == 842 ) return 842;
if(i == 843 ) return 843;
if(i == 844 ) return 844;
if(i == 845 ) return 845;
if(i == 846 ) return 846;
if(i == 847 ) return 847;
if(i == 848 ) return 848;
if(i == 849 ) return 849;
if(i == 850 ) return 850;
if(i == 851 ) return 851;
if(i == 852 ) return 852;
if(i == 853 ) return 853;
if(i == 854 ) return 854;
if(i == 855 ) return 855;
if(i == 856 ) return 856;
if(i == 857 ) return 857;
if(i == 858 ) return 858;
if(i == 859 ) return 859;
if(i == 860 ) return 860;
if(i == 861 ) return 861;
if(i == 862 ) return 862;
if(i == 863 ) return 863;
if(i == 864 ) return 864;
if(i == 865 ) return 865;
if(i == 866 ) return 866;
if(i == 867 ) return 867;
if(i == 868 ) return 868;
if(i == 869 ) return 869;
if(i == 870 ) return 870;
if(i == 871 ) return 871;
if(i == 872 ) return 872;
if(i == 873 ) return 873;
if(i == 874 ) return 874;
if(i == 875 ) return 875;
if(i == 876 ) return 876;
if(i == 877 ) return 877;
if(i == 878 ) return 878;
if(i == 879 ) return 879;
if(i == 880 ) return 880;
if(i == 881 ) return 881;
if(i == 882 ) return 882;
if(i == 883 ) return 883;
if(i == 884 ) return 884;
if(i == 885 ) return 885;
if(i == 886 ) return 886;
if(i == 887 ) return 887;
if(i == 888 ) return 888;
if(i == 889 ) return 889;
if(i == 890 ) return 890;
if(i == 891 ) return 891;
if(i == 892 ) return 892;
if(i == 893 ) return 893;
if(i == 894 ) return 894;
if(i == 895 ) return 895;
if(i == 896 ) return 896;
if(i == 897 ) return 897;
if(i == 898 ) return 898;
if(i == 899 ) return 899;
if(i == 900 ) return 900;
if(i == 901 ) return 901;
if(i == 902 ) return 902;
if(i == 903 ) return 903;
if(i == 904 ) return 904;
if(i == 905 ) return 905;
if(i == 906 ) return 906;
if(i == 907 ) return 907;
if(i == 908 ) return 908;
if(i == 909 ) return 909;
if(i == 910 ) return 910;
if(i == 911 ) return 911;
if(i == 912 ) return 912;
if(i == 913 ) return 913;
if(i == 914 ) return 914;
if(i == 915 ) return 915;
if(i == 916 ) return 916;
if(i == 917 ) return 917;
if(i == 918 ) return 918;
if(i == 919 ) return 919;
if(i == 920 ) return 920;
if(i == 921 ) return 921;
if(i == 922 ) return 922;
if(i == 923 ) return 923;
if(i == 924 ) return 924;
if(i == 925 ) return 925;
if(i == 926 ) return 926;
if(i == 927 ) return 927;
if(i == 928 ) return 928;
if(i == 929 ) return 929;
if(i == 930 ) return 930;
if(i == 931 ) return 931;
if(i == 932 ) return 932;
if(i == 933 ) return 933;
if(i == 934 ) return 934;
if(i == 935 ) return 935;
if(i == 936 ) return 936;
if(i == 937 ) return 937;
if(i == 938 ) return 938;
if(i == 939 ) return 939;
if(i == 940 ) return 940;
if(i == 941 ) return 941;
if(i == 942 ) return 942;
if(i == 943 ) return 943;
if(i == 944 ) return 944;
if(i == 945 ) return 945;
if(i == 946 ) return 946;
if(i == 947 ) return 947;
if(i == 948 ) return 948;
if(i == 949 ) return 949;
if(i == 950 ) return 950;
if(i == 951 ) return 951;
if(i == 952 ) return 952;
if(i == 953 ) return 953;
if(i == 954 ) return 954;
if(i == 955 ) return 955;
if(i == 956 ) return 956;
if(i == 957 ) return 957;
if(i == 958 ) return 958;
if(i == 959 ) return 959;
if(i == 960 ) return 960;
if(i == 961 ) return 961;
if(i == 962 ) return 962;
if(i == 963 ) return 963;
if(i == 964 ) return 964;
if(i == 965 ) return 965;
if(i == 966 ) return 966;
if(i == 967 ) return 967;
if(i == 968 ) return 968;
if(i == 969 ) return 969;
if(i == 970 ) return 970;
if(i == 971 ) return 971;
if(i == 972 ) return 972;
if(i == 973 ) return 973;
if(i == 974 ) return 974;
if(i == 975 ) return 975;
if(i == 976 ) return 976;
if(i == 977 ) return 977;
if(i == 978 ) return 978;
if(i == 979 ) return 979;
if(i == 980 ) return 980;
if(i == 981 ) return 981;
if(i == 982 ) return 982;
if(i == 983 ) return 983;
if(i == 984 ) return 984;
if(i == 985 ) return 985;
if(i == 986 ) return 986;
if(i == 987 ) return 987;
if(i == 988 ) return 988;
if(i == 989 ) return 989;
if(i == 990 ) return 990;
if(i == 991 ) return 991;
if(i == 992 ) return 992;
if(i == 993 ) return 993;
if(i == 994 ) return 994;
if(i == 995 ) return 995;
if(i == 996 ) return 996;
if(i == 997 ) return 997;
if(i == 998 ) return 998;
if(i == 999 ) return 999;
if(i == 1000 ) return 1000;
if(i == 1001 ) return 1001;
if(i == 1002 ) return 1002;
if(i == 1003 ) return 1003;
if(i == 1004 ) return 1004;
if(i == 1005 ) return 1005;
if(i == 1006 ) return 1006;
if(i == 1007 ) return 1007;
if(i == 1008 ) return 1008;
if(i == 1009 ) return 1009;
if(i == 1010 ) return 1010;
if(i == 1011 ) return 1011;
if(i == 1012 ) return 1012;
if(i == 1013 ) return 1013;
if(i == 1014 ) return 1014;
if(i == 1015 ) return 1015;
if(i == 1016 ) return 1016;
if(i == 1017 ) return 1017;
if(i == 1018 ) return 1018;
if(i == 1019 ) return 1019;
if(i == 1020 ) return 1020;
if(i == 1021 ) return 1021;
if(i == 1022 ) return 1022;
if(i == 1023 ) return 1023;
if(i == 1024 ) return 1024;
if(i == 1025 ) return 1025;
if(i == 1026 ) return 1026;
if(i == 1027 ) return 1027;
if(i == 1028 ) return 1028;
if(i == 1029 ) return 1029;
if(i == 1030 ) return 1030;
if(i == 1031 ) return 1031;
if(i == 1032 ) return 1032;
if(i == 1033 ) return 1033;
if(i == 1034 ) return 1034;
if(i == 1035 ) return 1035;
if(i == 1036 ) return 1036;
if(i == 1037 ) return 1037;
if(i == 1038 ) return 1038;
if(i == 1039 ) return 1039;
if(i == 1040 ) return 1040;
if(i == 1041 ) return 1041;
if(i == 1042 ) return 1042;
if(i == 1043 ) return 1043;
if(i == 1044 ) return 1044;
if(i == 1045 ) return 1045;
if(i == 1046 ) return 1046;
if(i == 1047 ) return 1047;
if(i == 1048 ) return 1048;
if(i == 1049 ) return 1049;
if(i == 1050 ) return 1050;
if(i == 1051 ) return 1051;
if(i == 1052 ) return 1052;
if(i == 1053 ) return 1053;
if(i == 1054 ) return 1054;
if(i == 1055 ) return 1055;
if(i == 1056 ) return 1056;
if(i == 1057 ) return 1057;
if(i == 1058 ) return 1058;
if(i == 1059 ) return 1059;
if(i == 1060 ) return 1060;
if(i == 1061 ) return 1061;
if(i == 1062 ) return 1062;
if(i == 1063 ) return 1063;
if(i == 1064 ) return 1064;
if(i == 1065 ) return 1065;
if(i == 1066 ) return 1066;
if(i == 1067 ) return 1067;
if(i == 1068 ) return 1068;
if(i == 1069 ) return 1069;
if(i == 1070 ) return 1070;
if(i == 1071 ) return 1071;
if(i == 1072 ) return 1072;
if(i == 1073 ) return 1073;
if(i == 1074 ) return 1074;
if(i == 1075 ) return 1075;
if(i == 1076 ) return 1076;
if(i == 1077 ) return 1077;
if(i == 1078 ) return 1078;
if(i == 1079 ) return 1079;
if(i == 1080 ) return 1080;
if(i == 1081 ) return 1081;
if(i == 1082 ) return 1082;
if(i == 1083 ) return 1083;
if(i == 1084 ) return 1084;
if(i == 1085 ) return 1085;
if(i == 1086 ) return 1086;
if(i == 1087 ) return 1087;
if(i == 1088 ) return 1088;
if(i == 1089 ) return 1089;
if(i == 1090 ) return 1090;
if(i == 1091 ) return 1091;
if(i == 1092 ) return 1092;
if(i == 1093 ) return 1093;
if(i == 1094 ) return 1094;
if(i == 1095 ) return 1095;
if(i == 1096 ) return 1096;
if(i == 1097 ) return 1097;
if(i == 1098 ) return 1098;
if(i == 1099 ) return 1099;
if(i == 1100 ) return 1100;
if(i == 1101 ) return 1101;
if(i == 1102 ) return 1102;
if(i == 1103 ) return 1103;
if(i == 1104 ) return 1104;
if(i == 1105 ) return 1105;
if(i == 1106 ) return 1106;
if(i == 1107 ) return 1107;
if(i == 1108 ) return 1108;
if(i == 1109 ) return 1109;
if(i == 1110 ) return 1110;
if(i == 1111 ) return 1111;
if(i == 1112 ) return 1112;
if(i == 1113 ) return 1113;
if(i == 1114 ) return 1114;
if(i == 1115 ) return 1115;
if(i == 1116 ) return 1116;
if(i == 1117 ) return 1117;
if(i == 1118 ) return 1118;
if(i == 1119 ) return 1119;
if(i == 1120 ) return 1120;
if(i == 1121 ) return 1121;
if(i == 1122 ) return 1122;
if(i == 1123 ) return 1123;
if(i == 1124 ) return 1124;
if(i == 1125 ) return 1125;
if(i == 1126 ) return 1126;
if(i == 1127 ) return 1127;
if(i == 1128 ) return 1128;
if(i == 1129 ) return 1129;
if(i == 1130 ) return 1130;
if(i == 1131 ) return 1131;
if(i == 1132 ) return 1132;
if(i == 1133 ) return 1133;
if(i == 1134 ) return 1134;
if(i == 1135 ) return 1135;
if(i == 1136 ) return 1136;
if(i == 1137 ) return 1137;
if(i == 1138 ) return 1138;
if(i == 1139 ) return 1139;
if(i == 1140 ) return 1140;
if(i == 1141 ) return 1141;
if(i == 1142 ) return 1142;
if(i == 1143 ) return 1143;
if(i == 1144 ) return 1144;
if(i == 1145 ) return 1145;
if(i == 1146 ) return 1146;
if(i == 1147 ) return 1147;
if(i == 1148 ) return 1148;
if(i == 1149 ) return 1149;
if(i == 1150 ) return 1150;
if(i == 1151 ) return 1151;
if(i == 1152 ) return 1152;
if(i == 1153 ) return 1153;
if(i == 1154 ) return 1154;
if(i == 1155 ) return 1155;
if(i == 1156 ) return 1156;
if(i == 1157 ) return 1157;
if(i == 1158 ) return 1158;
if(i == 1159 ) return 1159;
if(i == 1160 ) return 1160;
if(i == 1161 ) return 1161;
if(i == 1162 ) return 1162;
if(i == 1163 ) return 1163;
if(i == 1164 ) return 1164;
if(i == 1165 ) return 1165;
if(i == 1166 ) return 1166;
if(i == 1167 ) return 1167;
if(i == 1168 ) return 1168;
if(i == 1169 ) return 1169;
if(i == 1170 ) return 1170;
if(i == 1171 ) return 1171;
if(i == 1172 ) return 1172;
if(i == 1173 ) return 1173;
if(i == 1174 ) return 1174;
if(i == 1175 ) return 1175;
if(i == 1176 ) return 1176;
if(i == 1177 ) return 1177;
if(i == 1178 ) return 1178;
if(i == 1179 ) return 1179;
if(i == 1180 ) return 1180;
if(i == 1181 ) return 1181;
if(i == 1182 ) return 1182;
if(i == 1183 ) return 1183;
if(i == 1184 ) return 1184;
if(i == 1185 ) return 1185;
if(i == 1186 ) return 1186;
if(i == 1187 ) return 1187;
if(i == 1188 ) return 1188;
if(i == 1189 ) return 1189;
if(i == 1190 ) return 1190;
if(i == 1191 ) return 1191;
if(i == 1192 ) return 1192;
if(i == 1193 ) return 1193;
if(i == 1194 ) return 1194;
if(i == 1195 ) return 1195;
if(i == 1196 ) return 1196;
if(i == 1197 ) return 1197;
if(i == 1198 ) return 1198;
if(i == 1199 ) return 1199;
if(i == 1200 ) return 1200;
if(i == 1201 ) return 1201;
if(i == 1202 ) return 1202;
if(i == 1203 ) return 1203;
if(i == 1204 ) return 1204;
if(i == 1205 ) return 1205;
if(i == 1206 ) return 1206;
if(i == 1207 ) return 1207;
if(i == 1208 ) return 1208;
if(i == 1209 ) return 1209;
if(i == 1210 ) return 1210;
if(i == 1211 ) return 1211;
if(i == 1212 ) return 1212;
if(i == 1213 ) return 1213;
if(i == 1214 ) return 1214;
if(i == 1215 ) return 1215;
if(i == 1216 ) return 1216;
if(i == 1217 ) return 1217;
if(i == 1218 ) return 1218;
if(i == 1219 ) return 1219;
if(i == 1220 ) return 1220;
if(i == 1221 ) return 1221;
if(i == 1222 ) return 1222;
if(i == 1223 ) return 1223;
if(i == 1224 ) return 1224;
if(i == 1225 ) return 1225;
if(i == 1226 ) return 1226;
if(i == 1227 ) return 1227;
if(i == 1228 ) return 1228;
if(i == 1229 ) return 1229;
if(i == 1230 ) return 1230;
if(i == 1231 ) return 1231;
if(i == 1232 ) return 1232;
if(i == 1233 ) return 1233;
if(i == 1234 ) return 1234;
if(i == 1235 ) return 1235;
if(i == 1236 ) return 1236;
if(i == 1237 ) return 1237;
if(i == 1238 ) return 1238;
if(i == 1239 ) return 1239;
if(i == 1240 ) return 1240;
if(i == 1241 ) return 1241;
if(i == 1242 ) return 1242;
if(i == 1243 ) return 1243;
if(i == 1244 ) return 1244;
if(i == 1245 ) return 1245;
if(i == 1246 ) return 1246;
if(i == 1247 ) return 1247;
if(i == 1248 ) return 1248;
if(i == 1249 ) return 1249;
if(i == 1250 ) return 1250;
if(i == 1251 ) return 1251;
if(i == 1252 ) return 1252;
if(i == 1253 ) return 1253;
if(i == 1254 ) return 1254;
if(i == 1255 ) return 1255;
if(i == 1256 ) return 1256;
if(i == 1257 ) return 1257;
if(i == 1258 ) return 1258;
if(i == 1259 ) return 1259;
if(i == 1260 ) return 1260;
if(i == 1261 ) return 1261;
if(i == 1262 ) return 1262;
if(i == 1263 ) return 1263;
if(i == 1264 ) return 1264;
if(i == 1265 ) return 1265;
if(i == 1266 ) return 1266;
if(i == 1267 ) return 1267;
if(i == 1268 ) return 1268;
if(i == 1269 ) return 1269;
if(i == 1270 ) return 1270;
if(i == 1271 ) return 1271;
if(i == 1272 ) return 1272;
if(i == 1273 ) return 1273;
if(i == 1274 ) return 1274;
if(i == 1275 ) return 1275;
if(i == 1276 ) return 1276;
if(i == 1277 ) return 1277;
if(i == 1278 ) return 1278;
if(i == 1279 ) return 1279;
if(i == 1280 ) return 1280;
if(i == 1281 ) return 1281;
if(i == 1282 ) return 1282;
if(i == 1283 ) return 1283;
if(i == 1284 ) return 1284;
if(i == 1285 ) return 1285;
if(i == 1286 ) return 1286;
if(i == 1287 ) return 1287;
if(i == 1288 ) return 1288;
if(i == 1289 ) return 1289;
if(i == 1290 ) return 1290;
if(i == 1291 ) return 1291;
if(i == 1292 ) return 1292;
if(i == 1293 ) return 1293;
if(i == 1294 ) return 1294;
if(i == 1295 ) return 1295;
if(i == 1296 ) return 1296;
if(i == 1297 ) return 1297;
if(i == 1298 ) return 1298;
if(i == 1299 ) return 1299;
if(i == 1300 ) return 1300;
if(i == 1301 ) return 1301;
if(i == 1302 ) return 1302;
if(i == 1303 ) return 1303;
if(i == 1304 ) return 1304;
if(i == 1305 ) return 1305;
if(i == 1306 ) return 1306;
if(i == 1307 ) return 1307;
if(i == 1308 ) return 1308;
if(i == 1309 ) return 1309;
if(i == 1310 ) return 1310;
if(i == 1311 ) return 1311;
if(i == 1312 ) return 1312;
if(i == 1313 ) return 1313;
if(i == 1314 ) return 1314;
if(i == 1315 ) return 1315;
if(i == 1316 ) return 1316;
if(i == 1317 ) return 1317;
if(i == 1318 ) return 1318;
if(i == 1319 ) return 1319;
if(i == 1320 ) return 1320;
if(i == 1321 ) return 1321;
if(i == 1322 ) return 1322;
if(i == 1323 ) return 1323;
if(i == 1324 ) return 1324;
if(i == 1325 ) return 1325;
if(i == 1326 ) return 1326;
if(i == 1327 ) return 1327;
if(i == 1328 ) return 1328;
if(i == 1329 ) return 1329;
if(i == 1330 ) return 1330;
if(i == 1331 ) return 1331;
if(i == 1332 ) return 1332;
if(i == 1333 ) return 1333;
if(i == 1334 ) return 1334;
if(i == 1335 ) return 1335;
if(i == 1336 ) return 1336;
if(i == 1337 ) return 1337;
if(i == 1338 ) return 1338;
if(i == 1339 ) return 1339;
if(i == 1340 ) return 1340;
if(i == 1341 ) return 1341;
if(i == 1342 ) return 1342;
if(i == 1343 ) return 1343;
if(i == 1344 ) return 1344;
if(i == 1345 ) return 1345;
if(i == 1346 ) return 1346;
if(i == 1347 ) return 1347;
if(i == 1348 ) return 1348;
if(i == 1349 ) return 1349;
if(i == 1350 ) return 1350;
if(i == 1351 ) return 1351;
if(i == 1352 ) return 1352;
if(i == 1353 ) return 1353;
if(i == 1354 ) return 1354;
if(i == 1355 ) return 1355;
if(i == 1356 ) return 1356;
if(i == 1357 ) return 1357;
if(i == 1358 ) return 1358;
if(i == 1359 ) return 1359;
if(i == 1360 ) return 1360;
if(i == 1361 ) return 1361;
if(i == 1362 ) return 1362;
if(i == 1363 ) return 1363;
if(i == 1364 ) return 1364;
if(i == 1365 ) return 1365;
if(i == 1366 ) return 1366;
if(i == 1367 ) return 1367;
if(i == 1368 ) return 1368;
if(i == 1369 ) return 1369;
if(i == 1370 ) return 1370;
if(i == 1371 ) return 1371;
if(i == 1372 ) return 1372;
if(i == 1373 ) return 1373;
if(i == 1374 ) return 1374;
if(i == 1375 ) return 1375;
if(i == 1376 ) return 1376;
if(i == 1377 ) return 1377;
if(i == 1378 ) return 1378;
if(i == 1379 ) return 1379;
if(i == 1380 ) return 1380;
if(i == 1381 ) return 1381;
if(i == 1382 ) return 1382;
if(i == 1383 ) return 1383;
if(i == 1384 ) return 1384;
if(i == 1385 ) return 1385;
if(i == 1386 ) return 1386;
if(i == 1387 ) return 1387;
if(i == 1388 ) return 1388;
if(i == 1389 ) return 1389;
if(i == 1390 ) return 1390;
if(i == 1391 ) return 1391;
if(i == 1392 ) return 1392;
if(i == 1393 ) return 1393;
if(i == 1394 ) return 1394;
if(i == 1395 ) return 1395;
if(i == 1396 ) return 1396;
if(i == 1397 ) return 1397;
if(i == 1398 ) return 1398;
if(i == 1399 ) return 1399;
if(i == 1400 ) return 1400;
if(i == 1401 ) return 1401;
if(i == 1402 ) return 1402;
if(i == 1403 ) return 1403;
if(i == 1404 ) return 1404;
if(i == 1405 ) return 1405;
if(i == 1406 ) return 1406;
if(i == 1407 ) return 1407;
if(i == 1408 ) return 1408;
if(i == 1409 ) return 1409;
if(i == 1410 ) return 1410;
if(i == 1411 ) return 1411;
if(i == 1412 ) return 1412;
if(i == 1413 ) return 1413;
if(i == 1414 ) return 1414;
if(i == 1415 ) return 1415;
if(i == 1416 ) return 1416;
if(i == 1417 ) return 1417;
if(i == 1418 ) return 1418;
if(i == 1419 ) return 1419;
if(i == 1420 ) return 1420;
if(i == 1421 ) return 1421;
if(i == 1422 ) return 1422;
if(i == 1423 ) return 1423;
if(i == 1424 ) return 1424;
if(i == 1425 ) return 1425;
if(i == 1426 ) return 1426;
if(i == 1427 ) return 1427;
if(i == 1428 ) return 1428;
if(i == 1429 ) return 1429;
if(i == 1430 ) return 1430;
if(i == 1431 ) return 1431;
if(i == 1432 ) return 1432;
if(i == 1433 ) return 1433;
if(i == 1434 ) return 1434;
if(i == 1435 ) return 1435;
if(i == 1436 ) return 1436;
if(i == 1437 ) return 1437;
if(i == 1438 ) return 1438;
if(i == 1439 ) return 1439;
if(i == 1440 ) return 1440;
if(i == 1441 ) return 1441;
if(i == 1442 ) return 1442;
if(i == 1443 ) return 1443;
if(i == 1444 ) return 1444;
if(i == 1445 ) return 1445;
if(i == 1446 ) return 1446;
if(i == 1447 ) return 1447;
if(i == 1448 ) return 1448;
if(i == 1449 ) return 1449;
if(i == 1450 ) return 1450;
if(i == 1451 ) return 1451;
if(i == 1452 ) return 1452;
if(i == 1453 ) return 1453;
if(i == 1454 ) return 1454;
if(i == 1455 ) return 1455;
if(i == 1456 ) return 1456;
if(i == 1457 ) return 1457;
if(i == 1458 ) return 1458;
if(i == 1459 ) return 1459;
if(i == 1460 ) return 1460;
if(i == 1461 ) return 1461;
if(i == 1462 ) return 1462;
if(i == 1463 ) return 1463;
if(i == 1464 ) return 1464;
if(i == 1465 ) return 1465;
if(i == 1466 ) return 1466;
if(i == 1467 ) return 1467;
if(i == 1468 ) return 1468;
if(i == 1469 ) return 1469;
if(i == 1470 ) return 1470;
if(i == 1471 ) return 1471;
if(i == 1472 ) return 1472;
if(i == 1473 ) return 1473;
if(i == 1474 ) return 1474;
if(i == 1475 ) return 1475;
if(i == 1476 ) return 1476;
if(i == 1477 ) return 1477;
if(i == 1478 ) return 1478;
if(i == 1479 ) return 1479;
if(i == 1480 ) return 1480;
if(i == 1481 ) return 1481;
if(i == 1482 ) return 1482;
if(i == 1483 ) return 1483;
if(i == 1484 ) return 1484;
if(i == 1485 ) return 1485;
if(i == 1486 ) return 1486;
if(i == 1487 ) return 1487;
if(i == 1488 ) return 1488;
if(i == 1489 ) return 1489;
if(i == 1490 ) return 1490;
if(i == 1491 ) return 1491;
if(i == 1492 ) return 1492;
if(i == 1493 ) return 1493;
if(i == 1494 ) return 1494;
if(i == 1495 ) return 1495;
if(i == 1496 ) return 1496;
if(i == 1497 ) return 1497;
if(i == 1498 ) return 1498;
if(i == 1499 ) return 1499;
if(i == 1500 ) return 1500;
if(i == 1501 ) return 1501;
if(i == 1502 ) return 1502;
if(i == 1503 ) return 1503;
if(i == 1504 ) return 1504;
if(i == 1505 ) return 1505;
if(i == 1506 ) return 1506;
if(i == 1507 ) return 1507;
if(i == 1508 ) return 1508;
if(i == 1509 ) return 1509;
if(i == 1510 ) return 1510;
if(i == 1511 ) return 1511;
if(i == 1512 ) return 1512;
if(i == 1513 ) return 1513;
if(i == 1514 ) return 1514;
if(i == 1515 ) return 1515;
if(i == 1516 ) return 1516;
if(i == 1517 ) return 1517;
if(i == 1518 ) return 1518;
if(i == 1519 ) return 1519;
if(i == 1520 ) return 1520;
if(i == 1521 ) return 1521;
if(i == 1522 ) return 1522;
if(i == 1523 ) return 1523;
if(i == 1524 ) return 1524;
if(i == 1525 ) return 1525;
if(i == 1526 ) return 1526;
if(i == 1527 ) return 1527;
if(i == 1528 ) return 1528;
if(i == 1529 ) return 1529;
if(i == 1530 ) return 1530;
if(i == 1531 ) return 1531;
if(i == 1532 ) return 1532;
if(i == 1533 ) return 1533;
if(i == 1534 ) return 1534;
if(i == 1535 ) return 1535;
if(i == 1536 ) return 1536;
if(i == 1537 ) return 1537;
if(i == 1538 ) return 1538;
if(i == 1539 ) return 1539;
if(i == 1540 ) return 1540;
if(i == 1541 ) return 1541;
if(i == 1542 ) return 1542;
if(i == 1543 ) return 1543;
if(i == 1544 ) return 1544;
if(i == 1545 ) return 1545;
if(i == 1546 ) return 1546;
if(i == 1547 ) return 1547;
if(i == 1548 ) return 1548;
if(i == 1549 ) return 1549;
if(i == 1550 ) return 1550;
if(i == 1551 ) return 1551;
if(i == 1552 ) return 1552;
if(i == 1553 ) return 1553;
if(i == 1554 ) return 1554;
if(i == 1555 ) return 1555;
if(i == 1556 ) return 1556;
if(i == 1557 ) return 1557;
if(i == 1558 ) return 1558;
if(i == 1559 ) return 1559;
if(i == 1560 ) return 1560;
if(i == 1561 ) return 1561;
if(i == 1562 ) return 1562;
if(i == 1563 ) return 1563;
if(i == 1564 ) return 1564;
if(i == 1565 ) return 1565;
if(i == 1566 ) return 1566;
if(i == 1567 ) return 1567;
if(i == 1568 ) return 1568;
if(i == 1569 ) return 1569;
if(i == 1570 ) return 1570;
if(i == 1571 ) return 1571;
if(i == 1572 ) return 1572;
if(i == 1573 ) return 1573;
if(i == 1574 ) return 1574;
if(i == 1575 ) return 1575;
if(i == 1576 ) return 1576;
if(i == 1577 ) return 1577;
if(i == 1578 ) return 1578;
if(i == 1579 ) return 1579;
if(i == 1580 ) return 1580;
if(i == 1581 ) return 1581;
if(i == 1582 ) return 1582;
if(i == 1583 ) return 1583;
if(i == 1584 ) return 1584;
if(i == 1585 ) return 1585;
if(i == 1586 ) return 1586;
if(i == 1587 ) return 1587;
if(i == 1588 ) return 1588;
if(i == 1589 ) return 1589;
if(i == 1590 ) return 1590;
if(i == 1591 ) return 1591;
if(i == 1592 ) return 1592;
if(i == 1593 ) return 1593;
if(i == 1594 ) return 1594;
if(i == 1595 ) return 1595;
if(i == 1596 ) return 1596;
if(i == 1597 ) return 1597;
if(i == 1598 ) return 1598;
if(i == 1599 ) return 1599;
if(i == 1600 ) return 1600;
if(i == 1601 ) return 1601;
if(i == 1602 ) return 1602;
if(i == 1603 ) return 1603;
if(i == 1604 ) return 1604;
if(i == 1605 ) return 1605;
if(i == 1606 ) return 1606;
if(i == 1607 ) return 1607;
if(i == 1608 ) return 1608;
if(i == 1609 ) return 1609;
if(i == 1610 ) return 1610;
if(i == 1611 ) return 1611;
if(i == 1612 ) return 1612;
if(i == 1613 ) return 1613;
if(i == 1614 ) return 1614;
if(i == 1615 ) return 1615;
if(i == 1616 ) return 1616;
if(i == 1617 ) return 1617;
if(i == 1618 ) return 1618;
if(i == 1619 ) return 1619;
if(i == 1620 ) return 1620;
if(i == 1621 ) return 1621;
if(i == 1622 ) return 1622;
if(i == 1623 ) return 1623;
if(i == 1624 ) return 1624;
if(i == 1625 ) return 1625;
if(i == 1626 ) return 1626;
if(i == 1627 ) return 1627;
if(i == 1628 ) return 1628;
if(i == 1629 ) return 1629;
if(i == 1630 ) return 1630;
if(i == 1631 ) return 1631;
if(i == 1632 ) return 1632;
if(i == 1633 ) return 1633;
if(i == 1634 ) return 1634;
if(i == 1635 ) return 1635;
if(i == 1636 ) return 1636;
if(i == 1637 ) return 1637;
if(i == 1638 ) return 1638;
if(i == 1639 ) return 1639;
if(i == 1640 ) return 1640;
if(i == 1641 ) return 1641;
if(i == 1642 ) return 1642;
if(i == 1643 ) return 1643;
if(i == 1644 ) return 1644;
if(i == 1645 ) return 1645;
if(i == 1646 ) return 1646;
if(i == 1647 ) return 1647;
if(i == 1648 ) return 1648;
if(i == 1649 ) return 1649;
if(i == 1650 ) return 1650;
if(i == 1651 ) return 1651;
if(i == 1652 ) return 1652;
if(i == 1653 ) return 1653;
if(i == 1654 ) return 1654;
if(i == 1655 ) return 1655;
if(i == 1656 ) return 1656;
if(i == 1657 ) return 1657;
if(i == 1658 ) return 1658;
if(i == 1659 ) return 1659;
if(i == 1660 ) return 1660;
if(i == 1661 ) return 1661;
if(i == 1662 ) return 1662;
if(i == 1663 ) return 1663;
if(i == 1664 ) return 1664;
if(i == 1665 ) return 1665;
if(i == 1666 ) return 1666;
if(i == 1667 ) return 1667;
if(i == 1668 ) return 1668;
if(i == 1669 ) return 1669;
if(i == 1670 ) return 1670;
if(i == 1671 ) return 1671;
if(i == 1672 ) return 1672;
if(i == 1673 ) return 1673;
if(i == 1674 ) return 1674;
if(i == 1675 ) return 1675;
if(i == 1676 ) return 1676;
if(i == 1677 ) return 1677;
if(i == 1678 ) return 1678;
if(i == 1679 ) return 1679;
if(i == 1680 ) return 1680;
if(i == 1681 ) return 1681;
if(i == 1682 ) return 1682;
if(i == 1683 ) return 1683;
if(i == 1684 ) return 1684;
if(i == 1685 ) return 1685;
if(i == 1686 ) return 1686;
if(i == 1687 ) return 1687;
if(i == 1688 ) return 1688;
if(i == 1689 ) return 1689;
if(i == 1690 ) return 1690;
if(i == 1691 ) return 1691;
if(i == 1692 ) return 1692;
if(i == 1693 ) return 1693;
if(i == 1694 ) return 1694;
if(i == 1695 ) return 1695;
if(i == 1696 ) return 1696;
if(i == 1697 ) return 1697;
if(i == 1698 ) return 1698;
if(i == 1699 ) return 1699;
if(i == 1700 ) return 1700;
if(i == 1701 ) return 1701;
if(i == 1702 ) return 1702;
if(i == 1703 ) return 1703;
if(i == 1704 ) return 1704;
if(i == 1705 ) return 1705;
if(i == 1706 ) return 1706;
if(i == 1707 ) return 1707;
if(i == 1708 ) return 1708;
if(i == 1709 ) return 1709;
if(i == 1710 ) return 1710;
if(i == 1711 ) return 1711;
if(i == 1712 ) return 1712;
if(i == 1713 ) return 1713;
if(i == 1714 ) return 1714;
if(i == 1715 ) return 1715;
if(i == 1716 ) return 1716;
if(i == 1717 ) return 1717;
if(i == 1718 ) return 1718;
if(i == 1719 ) return 1719;
if(i == 1720 ) return 1720;
if(i == 1721 ) return 1721;
if(i == 1722 ) return 1722;
if(i == 1723 ) return 1723;
if(i == 1724 ) return 1724;
if(i == 1725 ) return 1725;
if(i == 1726 ) return 1726;
if(i == 1727 ) return 1727;
if(i == 1728 ) return 1728;
if(i == 1729 ) return 1729;
if(i == 1730 ) return 1730;
if(i == 1731 ) return 1731;
if(i == 1732 ) return 1732;
if(i == 1733 ) return 1733;
if(i == 1734 ) return 1734;
if(i == 1735 ) return 1735;
if(i == 1736 ) return 1736;
if(i == 1737 ) return 1737;
if(i == 1738 ) return 1738;
if(i == 1739 ) return 1739;
if(i == 1740 ) return 1740;
if(i == 1741 ) return 1741;
if(i == 1742 ) return 1742;
if(i == 1743 ) return 1743;
if(i == 1744 ) return 1744;
if(i == 1745 ) return 1745;
if(i == 1746 ) return 1746;
if(i == 1747 ) return 1747;
if(i == 1748 ) return 1748;
if(i == 1749 ) return 1749;
if(i == 1750 ) return 1750;
if(i == 1751 ) return 1751;
if(i == 1752 ) return 1752;
if(i == 1753 ) return 1753;
if(i == 1754 ) return 1754;
if(i == 1755 ) return 1755;
if(i == 1756 ) return 1756;
if(i == 1757 ) return 1757;
if(i == 1758 ) return 1758;
if(i == 1759 ) return 1759;
if(i == 1760 ) return 1760;
if(i == 1761 ) return 1761;
if(i == 1762 ) return 1762;
if(i == 1763 ) return 1763;
if(i == 1764 ) return 1764;
if(i == 1765 ) return 1765;
if(i == 1766 ) return 1766;
if(i == 1767 ) return 1767;
if(i == 1768 ) return 1768;
if(i == 1769 ) return 1769;
if(i == 1770 ) return 1770;
if(i == 1771 ) return 1771;
if(i == 1772 ) return 1772;
if(i == 1773 ) return 1773;
if(i == 1774 ) return 1774;
if(i == 1775 ) return 1775;
if(i == 1776 ) return 1776;
if(i == 1777 ) return 1777;
if(i == 1778 ) return 1778;
if(i == 1779 ) return 1779;
if(i == 1780 ) return 1780;
if(i == 1781 ) return 1781;
if(i == 1782 ) return 1782;
if(i == 1783 ) return 1783;
if(i == 1784 ) return 1784;
if(i == 1785 ) return 1785;
if(i == 1786 ) return 1786;
if(i == 1787 ) return 1787;
if(i == 1788 ) return 1788;
if(i == 1789 ) return 1789;
if(i == 1790 ) return 1790;
if(i == 1791 ) return 1791;
if(i == 1792 ) return 1792;
if(i == 1793 ) return 1793;
if(i == 1794 ) return 1794;
if(i == 1795 ) return 1795;
if(i == 1796 ) return 1796;
if(i == 1797 ) return 1797;
if(i == 1798 ) return 1798;
if(i == 1799 ) return 1799;
if(i == 1800 ) return 1800;
if(i == 1801 ) return 1801;
if(i == 1802 ) return 1802;
if(i == 1803 ) return 1803;
if(i == 1804 ) return 1804;
if(i == 1805 ) return 1805;
if(i == 1806 ) return 1806;
if(i == 1807 ) return 1807;
if(i == 1808 ) return 1808;
if(i == 1809 ) return 1809;
if(i == 1810 ) return 1810;
if(i == 1811 ) return 1811;
if(i == 1812 ) return 1812;
if(i == 1813 ) return 1813;
if(i == 1814 ) return 1814;
if(i == 1815 ) return 1815;
if(i == 1816 ) return 1816;
if(i == 1817 ) return 1817;
if(i == 1818 ) return 1818;
if(i == 1819 ) return 1819;
if(i == 1820 ) return 1820;
if(i == 1821 ) return 1821;
if(i == 1822 ) return 1822;
if(i == 1823 ) return 1823;
if(i == 1824 ) return 1824;
if(i == 1825 ) return 1825;
if(i == 1826 ) return 1826;
if(i == 1827 ) return 1827;
if(i == 1828 ) return 1828;
if(i == 1829 ) return 1829;
if(i == 1830 ) return 1830;
if(i == 1831 ) return 1831;
if(i == 1832 ) return 1832;
if(i == 1833 ) return 1833;
if(i == 1834 ) return 1834;
if(i == 1835 ) return 1835;
if(i == 1836 ) return 1836;
if(i == 1837 ) return 1837;
if(i == 1838 ) return 1838;
if(i == 1839 ) return 1839;
if(i == 1840 ) return 1840;
if(i == 1841 ) return 1841;
if(i == 1842 ) return 1842;
if(i == 1843 ) return 1843;
if(i == 1844 ) return 1844;
if(i == 1845 ) return 1845;
if(i == 1846 ) return 1846;
if(i == 1847 ) return 1847;
if(i == 1848 ) return 1848;
if(i == 1849 ) return 1849;
if(i == 1850 ) return 1850;
if(i == 1851 ) return 1851;
if(i == 1852 ) return 1852;
if(i == 1853 ) return 1853;
if(i == 1854 ) return 1854;
if(i == 1855 ) return 1855;
if(i == 1856 ) return 1856;
if(i == 1857 ) return 1857;
if(i == 1858 ) return 1858;
if(i == 1859 ) return 1859;
if(i == 1860 ) return 1860;
if(i == 1861 ) return 1861;
if(i == 1862 ) return 1862;
if(i == 1863 ) return 1863;
if(i == 1864 ) return 1864;
if(i == 1865 ) return 1865;
if(i == 1866 ) return 1866;
if(i == 1867 ) return 1867;
if(i == 1868 ) return 1868;
if(i == 1869 ) return 1869;
if(i == 1870 ) return 1870;
if(i == 1871 ) return 1871;
if(i == 1872 ) return 1872;
if(i == 1873 ) return 1873;
if(i == 1874 ) return 1874;
if(i == 1875 ) return 1875;
if(i == 1876 ) return 1876;
if(i == 1877 ) return 1877;
if(i == 1878 ) return 1878;
if(i == 1879 ) return 1879;
if(i == 1880 ) return 1880;
if(i == 1881 ) return 1881;
if(i == 1882 ) return 1882;
if(i == 1883 ) return 1883;
if(i == 1884 ) return 1884;
if(i == 1885 ) return 1885;
if(i == 1886 ) return 1886;
if(i == 1887 ) return 1887;
if(i == 1888 ) return 1888;
if(i == 1889 ) return 1889;
if(i == 1890 ) return 1890;
if(i == 1891 ) return 1891;
if(i == 1892 ) return 1892;
if(i == 1893 ) return 1893;
if(i == 1894 ) return 1894;
if(i == 1895 ) return 1895;
if(i == 1896 ) return 1896;
if(i == 1897 ) return 1897;
if(i == 1898 ) return 1898;
if(i == 1899 ) return 1899;
if(i == 1900 ) return 1900;
if(i == 1901 ) return 1901;
if(i == 1902 ) return 1902;
if(i == 1903 ) return 1903;
if(i == 1904 ) return 1904;
if(i == 1905 ) return 1905;
if(i == 1906 ) return 1906;
if(i == 1907 ) return 1907;
if(i == 1908 ) return 1908;
if(i == 1909 ) return 1909;
if(i == 1910 ) return 1910;
if(i == 1911 ) return 1911;
if(i == 1912 ) return 1912;
if(i == 1913 ) return 1913;
if(i == 1914 ) return 1914;
if(i == 1915 ) return 1915;
if(i == 1916 ) return 1916;
if(i == 1917 ) return 1917;
if(i == 1918 ) return 1918;
if(i == 1919 ) return 1919;
if(i == 1920 ) return 1920;
if(i == 1921 ) return 1921;
if(i == 1922 ) return 1922;
if(i == 1923 ) return 1923;
if(i == 1924 ) return 1924;
if(i == 1925 ) return 1925;
if(i == 1926 ) return 1926;
if(i == 1927 ) return 1927;
if(i == 1928 ) return 1928;
if(i == 1929 ) return 1929;
if(i == 1930 ) return 1930;
if(i == 1931 ) return 1931;
if(i == 1932 ) return 1932;
if(i == 1933 ) return 1933;
if(i == 1934 ) return 1934;
if(i == 1935 ) return 1935;
if(i == 1936 ) return 1936;
if(i == 1937 ) return 1937;
if(i == 1938 ) return 1938;
if(i == 1939 ) return 1939;
if(i == 1940 ) return 1940;
if(i == 1941 ) return 1941;
if(i == 1942 ) return 1942;
if(i == 1943 ) return 1943;
if(i == 1944 ) return 1944;
if(i == 1945 ) return 1945;
if(i == 1946 ) return 1946;
if(i == 1947 ) return 1947;
if(i == 1948 ) return 1948;
if(i == 1949 ) return 1949;
if(i == 1950 ) return 1950;
if(i == 1951 ) return 1951;
if(i == 1952 ) return 1952;
if(i == 1953 ) return 1953;
if(i == 1954 ) return 1954;
if(i == 1955 ) return 1955;
if(i == 1956 ) return 1956;
if(i == 1957 ) return 1957;
if(i == 1958 ) return 1958;
if(i == 1959 ) return 1959;
if(i == 1960 ) return 1960;
if(i == 1961 ) return 1961;
if(i == 1962 ) return 1962;
if(i == 1963 ) return 1963;
if(i == 1964 ) return 1964;
if(i == 1965 ) return 1965;
if(i == 1966 ) return 1966;
if(i == 1967 ) return 1967;
if(i == 1968 ) return 1968;
if(i == 1969 ) return 1969;
if(i == 1970 ) return 1970;
if(i == 1971 ) return 1971;
if(i == 1972 ) return 1972;
if(i == 1973 ) return 1973;
if(i == 1974 ) return 1974;
if(i == 1975 ) return 1975;
if(i == 1976 ) return 1976;
if(i == 1977 ) return 1977;
if(i == 1978 ) return 1978;
if(i == 1979 ) return 1979;
if(i == 1980 ) return 1980;
if(i == 1981 ) return 1981;
if(i == 1982 ) return 1982;
if(i == 1983 ) return 1983;
if(i == 1984 ) return 1984;
if(i == 1985 ) return 1985;
if(i == 1986 ) return 1986;
if(i == 1987 ) return 1987;
if(i == 1988 ) return 1988;
if(i == 1989 ) return 1989;
if(i == 1990 ) return 1990;
if(i == 1991 ) return 1991;
if(i == 1992 ) return 1992;
if(i == 1993 ) return 1993;
if(i == 1994 ) return 1994;
if(i == 1995 ) return 1995;
if(i == 1996 ) return 1996;
if(i == 1997 ) return 1997;
if(i == 1998 ) return 1998;
if(i == 1999 ) return 1999;
} finally {
int x = 0;
x += 1;
x += 2;
x += 3;
x += 4;
x += 5;
x += 6;
x += 7;
x += 8;
x += 9;
}
return 0;
}
}
| 73,392 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6857948.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/6857948/T6857948.java | /*
* @test /nodynamiccopyright/
* @bug 6857948
* @summary 6857948: Calling a constructor with a doubly bogus argument causes an internal error
* @author Maurizio Cimadamore
*
* @compile/fail/ref=T6857948.out -XDrawDiagnostics T6857948.java
*/
class Foo {
Foo(String v) {}
};
class Test {
public static void main() {
Foo f = new Foo("Hello!",nosuchfunction()) {};
}
}
| 391 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Conditional.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/conditional/Conditional.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 5077054
* @summary Conditional operator applies assignment conversion
* @author Tim Hanson, BEA
*
* @compile/fail Conditional.java
*/
import java.util.*;
class Conditional {
void test() {
String[] sa = null;
List<String> ls = sa == null ? Arrays.asList(sa) :
Collections.emptyList();
}
}
| 1,403 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6500343a.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/conditional/6500343/T6500343a.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6500343
* @summary compiler generates bad code when translating conditional expressions
* @author Maurizio Cimadamore
*
*/
public class T6500343a {
static class Base {}
static interface I {}
static class A1 extends Base implements I {}
static class A2 extends Base implements I {}
static Object crash(I i, A1 a1, A2 a2, boolean b1, boolean b2) {
return b1 ? i : b2 ? a2 : a1;
// lub(I, lub(A1, A2)) ==> lub(I, Base&I) ==> I (doesn't compile on 1.4 ok >1.5)
}
public static void main(String[] args) {
T6500343a.crash(new A1(), new A1(), new A2(), true, false);
T6500343a.crash(new A1(), new A1(), new A2(), false, true);
T6500343a.crash(new A1(), new A1(), new A2(), false, false);
T6500343a.crash(new A1(), new A1(), new A2(), true, true);
}
}
| 1,904 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
T6500343b.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/conditional/6500343/T6500343b.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6500343
* @summary compiler generates bad code when translating conditional expressions
* @author Maurizio Cimadamore
*
*/
public class T6500343b {
final static int i1 = 0;
final static int i2 = 1;
static void crash(int i) {
switch (i) {
case (true ? 0 : 1):
case (i1 == 5 ? 1 : 2):
case (i1 == i2 ? 2 : 3):
}
}
public static void main(String[] args) {
T6500343b.crash(0);
}
}
| 1,541 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
QualifiedAccess_1.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/QualifiedAccess/QualifiedAccess_1.java | /**
* @test /nodynamiccopyright/
* @bug 4094658 4277296 4785453
* @summary Test enforcement of JLS 6.6.1 and 6.6.2 rules requiring that
* the type to which a component member belongs be accessible in qualified
* names.
*
* @compile pack1/P1.java
* @compile pack1/P2.java
* @compile/fail/ref=QualifiedAccess_1.out -XDrawDiagnostics QualifiedAccess_1.java
*/
import pack1.P1;
public class QualifiedAccess_1 {
// Inaccessible types in member declarations.
// These exercise 'Env.resolve'.
// Errors are localized poorly.
//
// Fields 'P3' and 'P5' are inaccessible.
P1 foo;
P1.P3 bar; // ERROR
P1.P3.P4 baz; // ERROR
P1.P3.P4.P5 quux; // ERROR
P1 m11() {return null;}
P1.P3 m12() {return null;} // ERROR
P1.P3.P4 m13() {return null;} // ERROR
P1.P3.P4.P5 m14() {return null;} // ERROR
void m21(P1 x) {}
void m22(P1.P3 x) {} // ERROR
void m23(P1.P3.P4 x) {} // ERROR
void m24(P1.P3.P4.P5 x) {} // ERROR
void test1() {
// Inaccessible types in local variable declarations.
// These exercise 'FieldExpression.checkCommon'.
//
// Fields 'P3' and 'P5' are inaccessible.
P1 foo = null;
P1.P3 bar = null; // ERROR
P1.P3.P4 baz = null; // ERROR
P1.P3.P4.P5 quux = null; // ERROR
}
void test2() {
// Inaccessible types in casts.
// These exercise 'FieldExpression.checkCommon'.
//
// Fields 'P3' and 'P5' are inaccessible.
Object foo = (P1)null;
Object bar = (P1.P3)null; // ERROR
Object baz = (P1.P3.P4)null; // ERROR
Object quux = (P1.P3.P4.P5)null; // ERROR
}
void test3() {
// Inaccessible types in 'instanceof' expressions.
// These exercise 'FieldExpression.checkCommon'.
//
// Fields 'P3' and 'P5' are inaccessible.
boolean foo = null instanceof P1;
boolean bar = null instanceof P1.P3; // ERROR
boolean baz = null instanceof P1.P3.P4; // ERROR
boolean quux = null instanceof P1.P3.P4.P5; // ERROR
}
}
| 2,410 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
QualifiedAccess_4.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/QualifiedAccess/QualifiedAccess_4.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 4094658
* @summary Test enforcement of JLS 6.6.1 and 6.6.2 rules requiring that
* the type to which a component member belongs be accessible in qualified
* names.
*
* @compile/fail QualifiedAccess_4.java
*/
import pack1.P1;
class CMain {
class Foo {
class Bar {}
}
// NOTE: Error localization and recovery is bad here,
// eliciting two other spurious complaints.
Foo.Bar yy = x.new Foo.Bar(); // ERROR - Type in qualified 'new' must be unqualified
}
| 1,567 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
QualifiedAccess_3.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/QualifiedAccess/QualifiedAccess_3.java | /**
* @test /nodynamiccopyright/
* @bug 4094658 4785453
* @summary Test enforcement of JLS 6.6.1 and 6.6.2 rules requiring that
* the type to which a component member belongs be accessible in qualified
* names.
*
* @compile/fail/ref=QualifiedAccess_3.out -XDrawDiagnostics QualifiedAccess_3.java
*/
import pack1.P1;
class CMain {
class Foo {
class Bar {}
}
static class Baz {
private static class Quux {
static class Quem {}
}
}
// These are all OK.
CMain z = new CMain();
Foo x = z.new Foo();
Foo.Bar y = x.new Bar();
void test() {
P1 p1 = new P1();
// These are NOT errors, and should NOT be detected, as observed.
/*------------------------------------*
Baz.Quux z = null;
Baz.Quux.Quem y = null;
*------------------------------------*/
P1.Foo.Bar x = null; // ERROR - 'P1.Foo' not accessible
int i = p1.a.length; // ERROR - Type of 'a' not accessible
// The type of the expression from which a component
// is selected must be accessible.
p1.p2.privatei = 3; // ERROR - Type of 'p1.p2' not accessible.
System.out.println (p1.p2.privatei); // ERROR - Type of 'p1.p2' not accessible.
}
}
| 1,317 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
QualifiedAccess_2.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/test/tools/javac/QualifiedAccess/QualifiedAccess_2.java | /**
* @test /nodynamiccopyright/
* @bug 4094658 4277300 4785453
* @summary Test enforcement of JLS 6.6.1 and 6.6.2 rules requiring that
* the type to which a component member belongs be accessible in qualified
* names.
*
* @compile pack1/P1.java
* @compile pack1/P2.java
* @compile/fail/ref=QualifiedAccess_2.out -XDrawDiagnostics QualifiedAccess_2.java
*/
import pack1.P1;
class A {
private static class B {
static class Inner {}
}
}
class X extends pack1.P1 {
X() { super("bar"); }
void foo() {
/*-----------------*
// BOGUS: Reports matching constructor not found.
// OK if 'Q' is made a public constructor.
Object y = new Q("foo");// ERROR - protected constructor Q inaccessible
*------------------*/
// Reports 'P1.R.S' not found at all. (private)
Object z = new R.S.T(); // ERROR - S is inaccessible
}
}
class Y {
class Foo {
class Bar {}
}
class C extends A.B {} // ERROR - B is inaccessible
class D extends A.B.Inner {} // ERROR - B is inaccessible
static class Quux {
private static class Quem {
P1.Foo.Bar x; // ERROR - Foo is inaccessible
static class MyError extends Error {}
}
}
}
class Z {
void foo() throws Y.Quux.Quem.MyError {
// ERROR - type of Quux not accesible (private)
throw new Y.Quux.Quem.MyError();
// ERROR - type of Quux not accesible (private)
}
}
| 1,574 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.