repo
stringlengths 1
191
⌀ | file
stringlengths 23
351
| code
stringlengths 0
5.32M
| file_length
int64 0
5.32M
| avg_line_length
float64 0
2.9k
| max_line_length
int64 0
288k
| extension_type
stringclasses 1
value |
|---|---|---|---|---|---|---|
soot
|
soot-master/src/it/java_tests/IntAssign.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class IntAssign {
public static void main(String [] args){
System.out.println(""+Integer.MIN_VALUE+0);
System.out.println(0-Integer.MIN_VALUE);
}
}
| 997
| 33.413793
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IntToChar.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class IntToChar {
public static void main(String [] args){
int x = 7;
char c = (char)x;
System.out.println(c);
}
}
| 972
| 31.433333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Inter2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class Inter2 {
public static void main(String [] args){
Inter2 i2 = new Inter2();
i2.run();
i2.go();
}
public void run(){
Object o = new I3.C();
Class c = o.getClass();
System.out.println(c.getModifiers());
o = new C2.C3();
c = o.getClass();
System.out.println(c.getModifiers());
}
public void go(){
Object o = new C2.C3();
Class c = o.getClass();
System.out.println(c.getModifiers());
}
}
interface I3 {
class C{}
}
class C2 {
static class C3{}
}
| 1,417
| 23.877193
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InterfaceTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class InterfaceTest {
public static void main(String [] args) {
System.out.println(1 & 0x0200);
System.out.println(17 & 0x0200);
}
}
| 981
| 34.071429
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IteratorTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
import java.util.*;
public class IteratorTest {
public static void main(String [] args){
}
public void run(){
List l = new ArrayList();
l.add("j");
l.add("e");
l.add("l");
Iterator it = l.iterator();
while (it.hasNext()){
}
}
}
| 1,157
| 25.318182
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/JAssert.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class JAssert {
public static void main(String [] args){
int x = 0;
assert x == 0 : MyError.throwError("bug if error thrown");
assert x < 2 ? true : false : MyError.throwError("bug if error thrown");
}
}
class MyError extends Error {
MyError(String s) { super(s); }
static boolean throwError(String s) {
throw new MyError(s);
}
}
| 1,218
| 30.25641
| 80
|
java
|
soot
|
soot-master/src/it/java_tests/JAssert2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class JAssert2 {
public static void main (String [] args) {
int x = 0;
JAssert2.class.getClassLoader().setClassAssertionStatus("MyAsserts", true);
MyAsserts.run();
}
}
class MyAsserts {
static void run(){
int x = 0;
assert x < 2 ? true: false;
assert x < 2 ? true: false: false;
assert x < 2 ? true: false: "bug" ;
}
}
| 1,215
| 31.864865
| 83
|
java
|
soot
|
soot-master/src/it/java_tests/JasminTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class JasminTest {
public static void main(String [] args){
int x = 9;
System.out.println(x);
}
}
| 947
| 31.689655
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LHSTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LHSTest {
int x;
public static void main(String [] args) {
LHSTest l = new LHSTest();
l.run();
}
private void run(){
int i = 0;
int j = 9;
int k = 4;
x = j;
System.out.println(x);
}
}
| 1,107
| 25.380952
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LabelDo.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LabelDo {
public static void main(String [] args) {
int x = 0;
one: do {
x++;
if (x > 5) break one;
System.out.println(x);
}while (true);
}
}
| 1,062
| 30.264706
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LabelFor.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LabelFor {
public static void main(String [] args) {
int x = 0;
one: for (; x < 10; x++) {
if (x > 5) break one;
System.out.println(x);
}
}
}
| 1,063
| 30.294118
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LabelWhile.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LabelWhile {
public static void main(String [] args) {
int x = 0;
one: while (true) {
x++;
if (x > 5) break one;
System.out.println(x);
}
}
}
| 1,061
| 31.181818
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LabeledStmtTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LabeledStmtTest {
public static void main(String [] args){
int i = 0;
int j = 0;
outer:while (i < 100) {
inner: while (j < 100) {
j = j + 1;
if (j * i < 50) continue;
System.out.println(j);
if (j == 75) break inner;
}
i = i + 1;
if (i == 20) break outer;
}
}
}
| 1,273
| 28.627907
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LineNumberTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LineNumberTest {
public static void main(String [] args) {
//Object o = new Integer(9);
int i = 10;
int x = 9;
int y = 9;
int z = 6;
if (i == 2) {
i = x + 1;
i = y - 1;
i = z * 2;
}
else if (i == 5){
z = 3;
y = 4;
}
while (i > 10 ) {
i = i - 3;
}
}
public LineNumberTest(){
super();
}
}
| 1,308
| 25.714286
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LineTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LineTest {
void bar(){}
void foo(){}
public static void main(String [] args){
}
}
| 930
| 30.033333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LitTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LitTest {
public static void main(String [] args) {
int i = 0;
double j = 0.9;
char x = 'c';
byte b = 8;
short s = 9;
long l = 10000;
float f = 0.99F;
String st = "this";
}
}
| 1,083
| 29.111111
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LocalArrayInit.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LocalArrayInit {
public static void main (String [] args){
int [] a = {1 , 2, 3};
a = new int [] {1 ,2 ,3};
}
}
| 972
| 31.433333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LocalAssigns.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LocalAssigns {
private int x = 9;
public static void main(String [] args){
LocalAssigns la = new LocalAssigns();
la.run();
}
public void run(){
int y = 0;
y = x;
System.out.println(y);
y += 9;
System.out.println(y);
y -= 9;
System.out.println(y);
y *= 9;
System.out.println(y);
y /= 9;
System.out.println(y);
y %= 9;
System.out.println(y);
y >>= 9;
System.out.println(y);
y >>>= 9;
System.out.println(y);
y <<= 9;
System.out.println(y);
y |= 9;
System.out.println(y);
y &= 9;
System.out.println(y);
y ^= 9;
System.out.println(y);
}
}
| 1,602
| 26.637931
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LocalClassTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LocalClassTest {
public static void main(String [] args){
LocalClassTest lct = new LocalClassTest();
lct.run();
}
public void run(){
final int i = 8;
class MClass {
public void run(){
System.out.println("class m: "+i);
}
}
class KClass {
public void run(){
System.out.println("class k");
}
}
class JClass {
public void run(){
System.out.println("class j");
new KClass();
}
}
}
}
| 1,435
| 28.306122
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LocalDecl.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LocalDecl {
public static void main(String [] args){
String s = new String("j");
}
}
| 936
| 32.464286
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LocalTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LocalTest {
public static void main(String [] args){
LocalTest lt = new LocalTest();
lt.run();
}
public void run(){
int i = 0;
i++;
}
}
| 1,020
| 29.029412
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LongInit.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LongInit {
public long number = 3;
public static void main(String [] args){
LongInit li = new LongInit();
System.out.println(li.number);
}
}
| 1,000
| 32.366667
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LongToChar.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LongToChar {
public static void main(String[] args) {
long x = 9876543210L;
char y = (char)x;
System.out.println(y);
}
}
| 985
| 30.806452
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LoopAnalysisTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LoopAnalysisTest {
public static void main(String [] agrs){
int i = 1;
do {
if (i == 1) break;
System.out.println(i);
System.out.println(i);
System.out.println(i);
System.out.println(i);
System.out.println(i);
System.out.println(i);
}while(true);
}
}
| 1,201
| 31.486486
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LoopTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LoopTest {
public static void main (String [] args){
int x = 9;
for (int i = 9; i < 10; i++){
x++;
}
for (;;){
if (x < 4) break;
x--;
}
do {
x += 2;
}while(x < 15);
while (x > 10){
x -= 3;
}
while (true){
if (x > 47) break;
x *= 3;
}
while (x > 4) {
x--;
if (x % 3 != 0) continue;
System.out.println(x);
}
int [] arr = new int[9];
for (int m = 0; m < 10; m++){
x = 4;
arr[4] = 8;
arr[4] = m;
arr[x] = 8;
}
}
}
| 1,573
| 23.215385
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LoopTest2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LoopTest2 {
int i = 9;
public static void main(String [] args){
LoopTest2 lt = new LoopTest2();
if (lt.sum(lt.i) > 10) return;
}
public int sum(int x){
return x*x;
}
}
| 1,053
| 29.114286
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/LoopTest3.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class LoopTest3 {
public static void main(String [] args){
int [][] x = new int [10][10];
for (int i = 0; i < 10; i++){
for (int j = 0; j < 10; j++){
x[i][j] = i * j;
}
}
for (int i = 0; i < i * i; i++){
}
int k = 8;
for (int i = 0; i < k * k; i++){
}
}
}
| 1,198
| 29.74359
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Main.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class Main {
public static void main (String args[])
{ Object[] myargs = new Object[3];
//System.out.println("myargs are " + myargs);
}
}
| 989
| 33.137931
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/MethodIntroductions2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class MethodIntroductions2 {
public static void main(String[] args) {
new MethodIntroductions2().realMain(args);
}
public void realMain(String[] args) {
AbstractSuperNoIntro as0n = new AbstractSuperNoIntro() { public
int foo() { return 7; } };
System.out.println(as0n.foo());
}
}
interface I {
public int foo();
}
abstract class AbstractSuperNoIntro implements I {}
| 1,246
| 30.175
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/MultiDimArrayTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class MultiDimArrayTest {
public static void main (String [] args) {
int [][] intArray = new int[10][10];
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
intArray[i][j] = i * j;
System.out.println(intArray[i][j]);
}
}
}
}
| 1,154
| 31.083333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/MultiLine.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class MultiLine {
public static void main(String [] args){
int i = 9;
int j = 8;
int k = 8;
int l = 7;
int h = 4;
i = j + k - l - h;
}
}
| 1,023
| 29.117647
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/MyBlock.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class MyBlock {
public static void main(String [] args){
{
int i = 0;
System.out.println(i);
}
{
int i = 9;
System.out.println(i);
}
int i = 8;
System.out.println(i);
}
}
| 1,100
| 28.756757
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/MyClass.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class MyClass {
public static double compute (double x){
double z;
x = Math.sin(x);
z = x;
return z;
}
public static void main(String [] args){
compute(4.4);
}
}
| 1,045
| 28.885714
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/MySuper.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class MySuper {
public int x = 9;
protected int y = 8;
public void go(){
System.out.println("go from MySuper");
}
protected void going(){
System.out.println("going from MySuper");
}
public static void main(String [] args){
MySuper m = new MySuper();
m.go();
m.going();
}
}
| 1,172
| 28.325
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NaNTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class NaNTest {
public float fx = Float.NaN;
public static void main(String [] args){
NaNTest n = new NaNTest();
n.run();
}
public void run(){
boolean b = 0 < fx;
System.out.println(!b);
System.out.println(fx);
}
}
| 1,102
| 28.810811
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NameTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
class NameTest {
public static void main (String [] args ){
}
}
class A {
}
| 907
| 29.266667
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NameTests.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class NameTests {
public static void main(String[] args) {
NameTests nt = new NameTests();
nt.run(new NameTests());
}
private void run(NameTests nameTests) { NameTests n = new NameTests(); }
}
| 1,055
| 33.064516
| 76
|
java
|
soot
|
soot-master/src/it/java_tests/NameTests2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class NameTests2 {
public static void main(String [] args) {
//int NameTests2;
NameTests2 nt = new NameTests2();
}
}
| 966
| 32.344828
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NestedClass.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class NestedClass {
public static void main(String [] args){
NestedClass nc = new NestedClass();
nc.run();
}
public void run (){
Link l = new Link();
l.go();
Linker lr = new Linker();
lr.gofor();
}
class Link {
public void go(){
System.out.println("go");
}
}
class Linker {
public void gofor(){
Link l = new Link();
l.go();
}
}
}
| 1,337
| 24.730769
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NewArray.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class NewArray {
public static void main(String [] args) {
int [] i = new int[4];
int [][] j = new int[7][8];
}
}
| 972
| 31.433333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NewArray2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class NewArray2 {
public static void main(String [] args) {
int [] i = new int[4];
int x = 4;
}
}
| 956
| 30.9
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NewArrayInit.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class NewArrayInit {
public static void main(String [] args) {
int [] a = new int [] { 1, 2, 3};
}
}
| 942
| 32.678571
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NewStmt.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class NewStmt {
public static void main(String [] args){
NewStmt ns;
ns = new NewStmt();
new NewStmt();
}
}
| 965
| 31.2
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NotEmpty.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
import java.util.*;
public class NotEmpty {
public static void main (String [] args) {
NotEmpty ne = new NotEmpty();
ne.run();
}
private void run(){
Stack s = new Stack();
s.push("J");
s.push("E");
s.push("N");
s.push("N");
s.push("N");
s.push("N");
s.push("N");
s.push("N");
while (!s.isEmpty()) {
System.out.println(s.pop());
}
}
}
| 1,299
| 26.659574
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/NullTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
import java.util.*;
public class NullTest {
public static void main( String [] args) {
ArrayList i = null;
ArrayList j = null;
if (i == null & j == null) {
i = new ArrayList();
}
}
}
| 1,067
| 29.514286
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/OrTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class OrTest {
public static void main (String [] args) {
OrTest ot = new OrTest();
ot.run();
}
private void run() {
long l;
int t1 = 34;
int t2 = 45;
l = t1 > t2 ? (long)(t1 << 7 | 5) << 21 | t2:
(long)(t2 << 7 | 5) << 21 | t1;
}
}
| 1,154
| 29.394737
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/OrderOfTypes.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class OrderOfTypes {
public static void main(String[] args) {}
}
class Root {
class RootInner {}
}
class Second extends First {
class SecondInner extends RootInner {}
}
class First extends Root {
}
| 1,037
| 27.833333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/OtherClass.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class OtherClass {
public static void main(String [] args){
}
public static void run() {
System.out.println("running OtherClass");
}
}
| 984
| 31.833333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ParentInterfaceUsingChildInnerInterfaceLJH.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
/** @testcase PR#645 PUREJAVA Parent interface using public inner interface of child in same file */
interface Child extends Parent {
public interface Inner {
public String ok();
}
}
/** Parent must be in same file as child and be declared AFTER */
interface Parent {
public Child.Inner getChildInner();
}
public class ParentInterfaceUsingChildInnerInterfaceLJH {
public static void main (String[] args) {
Example me = new Example();
String result = me.getChildInner().ok();
if(!((result != null) && result.startsWith("ok")))
System.out.println("expected ok... got " + result);
}
}
class Example implements Parent {
public Child.Inner getChildInner() {
return new Child.Inner() {
public String ok() {
return "ok: " + getClass().getName();
}
};
}
}
| 1,719
| 32.076923
| 100
|
java
|
soot
|
soot-master/src/it/java_tests/ParentUsingChildLJH.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
/** @testcase PUREJAVA PR#728 interface using preceding subinterface in its definition (order matters) */
interface Child extends Parent {
interface Toy { }
}
interface Parent { // order matters - must be after Child
Child.Toy battle();
}
public class ParentUsingChildLJH {
public static void main (String[] args) {
if(!Parent.class.isAssignableFrom(Child.class))
System.out.println("!Parent.class.isAssignableFrom(Child.class)");
Parent p = new Parent() {
public Child.Toy battle() {
return new Child.Toy(){};
}
};
Child.Toy battle = p.battle();
if (!(battle instanceof Child.Toy))
System.out.println("!battle instanceof Child.Toy");
}
}
| 1,592
| 33.630435
| 105
|
java
|
soot
|
soot-master/src/it/java_tests/Position.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class Position {
int line;
int col;
public Position(int line, int col) {
this.line = line;
this.col = col;
}
public int line(){
return line;
}
public int col(){
return col;
}
public static void main(String [] args){
Position p = new Position(3, 4);
}
}
| 1,164
| 26.738095
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrimClassLit.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrimClassLit {
public static void main(String [] args){
Class c = boolean.class;
Class c1 = boolean[].class;
Class c2 = int[].class;
Class c3 = float[].class;
Class c4 = byte[].class;
Class c5 = double[].class;
Class c6 = long[].class;
Class c7 = short[].class;
Class c9 = char.class;
Class c22 = int.class;
Class c32 = float.class;
Class c42 = byte.class;
Class c52 = double.class;
Class c62 = long.class;
Class c72 = short.class;
Class c92 = char[].class;
Class c10 = Object[].class;
Class c11 = Object.class;
Class c12 = Object[][][].class;
Class c13 = boolean[][].class;
Class c14 = long[][][][][].class;
}
}
| 1,620
| 32.770833
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrimClassLit2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrimClassLit2 {
public static void main(String [] args){
Class c10 = Object[].class;
}
}
| 936
| 32.464286
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrimTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrimTest {
public static void main(String [] args){
char c = 'g';
byte b = 2;
boolean l = true;
short s = 3;
System.out.println(c);
System.out.println(b);
System.out.println(l);
System.out.println(s);
}
}
| 1,112
| 30.8
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrimTypesTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrimTypesTest {
public static void main(String [] args) {
long l = 21389127389123L;
System.out.println("Test System Time: "+(l/1000.0));
}
}
| 996
| 33.37931
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrivateAccessFieldSets.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrivateAccessFieldSets {
private String s = "hi";
public static void main(String [] args){
PrivateAccessFieldSets pafs = new PrivateAccessFieldSets();
pafs.run();
}
public void run(){
new Object() {
public void run(){
s = "hello";
System.out.println(s);
}
}.run();
new Object() {
public void run(){
s += " there";
System.out.println(s);
}
}.run();
new Object() {
public void run(){
int x = s.length();
System.out.println(x);
}
}.run();
}
}
| 1,529
| 28.423077
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrivateAddAssign.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrivateAddAssign {
private int x = 9;
private int [] a = new int [] {3, 4, 5};
class Inner {
public void run(){
PrivateAddAssign bar = new PrivateAddAssign();
bar.x += 1;
System.out.println("bar.x: "+bar.x);
int i = 0;
a[i++] += 1;
System.out.println("a[0]: "+a[0]);
System.out.println("a[1]: "+a[1]);
System.out.println("a[2]: "+a[2]);
}
}
public static void main(String [] args){
PrivateAddAssign a = new PrivateAddAssign();
a.run();
}
private void run(){
Inner i = new Inner();
i.run();
}
}
| 1,507
| 29.77551
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrivateFieldArray.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrivateFieldArray {
private int [] x = new int[] {3, 5, 4};
public static void main(String [] args) {
PrivateFieldArray pfa = new PrivateFieldArray();
pfa.run();
}
private void run() {
Inner i = new Inner();
i.run();
}
class Inner {
public void run(){
int i = 0;
System.out.println(foo().x[i++]+=4);
foo().x = new int [] {6, 7, 8};
}
}
private PrivateFieldArray foo(){
return new PrivateFieldArray();
}
}
| 1,372
| 27.604167
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrivateFieldTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrivateFieldTest {
private int a = 9;
private int b = 9;
private int c = 9;
private int d = 9;
private int e = 9;
private int f = 9;
private int g = 9;
private int h = 9;
private int i = 9;
private int j = 9;
private int k = 9;
private int l = 9;
private int m = 9;
private int n = 9;
private int o = 9;
private int p = 9;
private int q = 9;
private int r = 9;
private int s = 9;
public static void main(String [] args){
PrivateFieldTest u = new PrivateFieldTest();
u.run();
}
public void run(){
Inner i = new Inner();
i.run();
}
public class Inner {
public void run(){
a += 9;
b += 0;
c += 5;
d -= 8;
e += 4;
f *= 3;
g -= 2;
h += 44;
i += h;
j -= g;
h++;
k--;
l++;
System.out.println(l);
}
}
}
| 1,861
| 24.506849
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrivateGets.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrivateGets {
private int x = 0;
private int y = 9;
public static void main(String [] args){
PrivateGets pg = new PrivateGets();
pg.run();
}
public void run(){
Inner i = new Inner();
i.run();
}
public class Inner {
public void run(){
System.out.println("x: "+x);
System.out.println("x: "+x);
}
}
}
| 1,245
| 26.688889
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/PrivateStringField.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class PrivateStringField {
private String s = "h";
public static void main(String [] args){
PrivateStringField psf = new PrivateStringField();
psf.run();
}
public void run(){
new Object(){
public void run(){
System.out.println(s+="ello");
}
}.run();
}
}
| 1,182
| 28.575
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/QualifierClass2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class QualifierClass2 {
public static void main(String [] args){
}
public class Qualifier2 {
public void run(){
go();
}
private void go(){
System.out.println("y");
}
}
private void go(){
System.out.println("x");
}
}
| 1,141
| 26.190476
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ReachingDefsTest1.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class ReachingDefsTest1 {
public static void main (String [] args) {
ReachingDefsTest1 rdt1 = new ReachingDefsTest1();
rdt1.m(8);
}
public void m(int i){
int x = 4;
int y = 3;
if (i < 10) {
x = 5;
}
else if (i == 10){
x = 6;
}
else {
x = 7;
}
int j = x * y;
}
public void n(int i){
int x = 4;
if (i < 10){
x = 5;
}
else if (x == 10){
x = 6;
}
System.out.println(x);
}
}
| 1,439
| 24.263158
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Recurse1.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class Recurse1 {
public static void main(String [] args){
Recurse1 r = new Recurse1();
System.out.println(r.fact(9));
}
public int fact(int n){
if (n > 1) {
return n * fact(n-1);
}
else {
return 1;
}
}
}
| 1,118
| 28.447368
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Recurse2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class Recurse2 {
public static void main(String [] args){
Recurse2 r = new Recurse2();
System.out.println(r.fact(9));
}
public int fact(int n){
if (n > 1) {
return n * next(n);
}
else {
return 1;
}
}
public int next(int n){
return fact(n-1);
}
}
| 1,177
| 27.047619
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ReflectProblem.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
import java.lang.reflect.*;
public class ReflectProblem {
public static void main(String [] args) throws Exception{
Field f = C.class.getField("cf");
System.out.println(f);
}
}
interface I{}
class C implements I{
public int cf;
}
| 1,078
| 28.972222
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/RelationalOps.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class RelationalOps {
public static void main(String [] args){
int counterLocal = 8;
if (counterLocal <= 0){
}
}
}
| 981
| 30.677419
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/RetTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class RetTest {
public static void main(String [] args){
RetTest r = new RetTest();
int c = r.run(9);
}
public int run(int i){
if (i == 8) {
return 7;
}
else {
return 8;
}
}
public void go(int i){
if (i == 9){
System.out.println("smile");
return;
}
else {
return;
}
}
}
| 1,262
| 25.3125
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ReturnCond.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class ReturnCond {
public static void main(String [] args){
ReturnCond rc = new ReturnCond();
boolean b = rc.run();
System.out.println(b);
}
public boolean run(){
int x = 0;
int y = 8;
return x > y;
}
}
| 1,104
| 27.333333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Reverse.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class Reverse {
public static void main (String [] args) {
System.out.println(toHexString(34));
}
public static String toHexString(int i) {
StringBuffer buf = new StringBuffer(8);
do {
buf.append(Character.forDigit(i & 0xF, 16));
i >>>= 4;
} while (i != 0);
return buf.reverse().toString();
}
}
| 1,205
| 31.594595
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ReverseIfContinue.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class ReverseIfContinue {
public static void main(String [] args) {
int i = 0;
while (i < 10) {
i++;
if (i < 4 ) continue;
System.out.println(i);
}
}
}
| 1,045
| 30.69697
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/STest1.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class STest1 {
private int x = 9;
public static void main(String [] args){
STest1 st1 = new STest1();
st1.run();
}
public void run(){
System.out.println(this.x);
this.go();
}
public void go(){
System.out.println("going");
}
}
| 1,135
| 26.707317
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/STest2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class STest2 extends SuperB {
private int x = 9;
public static void main(String [] args){
STest2 st2 = new STest2();
st2.run();
}
public void run(){
System.out.println(super.z);
super.go();
}
public void go(){
System.out.println("going");
}
}
class SuperB extends SuperA {
public int z = 6;
protected int w = 7;
public void go(){
System.out.println("go from SuperB");
}
public void go1(){
System.out.println("go1 from SuperB");
}
protected void going1(){
System.out.println("going1 from SuperB");
}
}
class SuperA {
public int x = 9;
protected int y = 8;
public void go(){
System.out.println("go from SuperA");
}
protected void going(){
System.out.println("going from SuperA");
}
}
| 1,689
| 24.606061
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/STest5.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
class Super1 {
public int x = 9;
}
public class STest5 extends Super1{
public int x = 8;
public static void main(String [] args){
STest5 st5 = new STest5();
st5.run();
}
public void run(){
System.out.println("this x: "+this.x);
System.out.println("super x: "+super.x);
}
}
| 1,150
| 27.775
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SemiColonTests.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SemiColonTests {
static String x = "J";;
public static void main(String [] args){
System.out.println(x+x+x);
}
}
| 966
| 30.193548
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ShiftOps.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class ShiftOps {
public static void main(String [] args){
long l = 2;
l = l >> 1;
System.out.println("l: "+l);
l = 2;
l = l << 1;
System.out.println("l: "+l);
l = 2;
l = l >>> 1;
System.out.println("l: "+l);
l = 2L;
l = l >> 1;
System.out.println("l: "+l);
l = 2L;
l = l << 1;
System.out.println("l: "+l);
l = 2L;
l = l >>> 1;
System.out.println("l: "+l);
}
}
| 1,368
| 27.520833
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ShiftTypes.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class ShiftTypes {
public static void main(String [] args){
}
public void run(){
long k = 9;
k >>= 1;
}
}
| 986
| 28.029412
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ShortAppend.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class ShortAppend {
public static void main (String [] args) {
short s = 9;
System.out.println("s: "+s);
}
}
| 963
| 31.133333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ShortTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class ShortTest {
public static void main (String [] args) {
ShortTest st = new ShortTest();
System.out.println(st.go(1,3));
}
protected final short go(int i, int j) {
return 0;
}
}
| 1,051
| 30.878788
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Simple.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
import java.util.*;
public class Simple {
private int x;
public static void main(String[] args) {
int j = 1;
int i = 2;;
if ( i + j > 1) {
System.out.println("Hello");
}
for (int s = 0; s < 10; s++) { j = j + 1; }
for (int t = 0; t < 10; t--) { j = j + 1; }
System.out.println("hello");
Simple.add(1,2);
Simple simple = new Simple();
Simple.getString().toString();
System.out.println(Simple.add(2,3));
simple.run();
}
public static String getString(){ return "Hello";}
public static int add(int i, int j) { return i + j; }
public Simple() {
//super();
this (8);
}
public Simple(int y ) {
this.x = y;
System.out.println(this.x);
}
public void run(){
int i = 9;
int j = 10;
j += i;
System.out.println(j);
int k = +(i + j);
int l = +k;
double m = +0.9;
int n = ~j;
boolean b = true;
boolean c = false;
boolean d = true;
if (b && c && d) {
System.out.println("Cond_and");
}
if (b || c) {
System.out.println("Cond_or");
}
if (b & c) {
System.out.println("Bit_and");
}
if (b | c) {
System.out.println("Bit_or");
}
if (b ^ c) {
System.out.println("Bit_Xor");
}
boolean x = true;
String y = x ? "Smile" : "Frown";
System.out.println(y);
if (!x) {
throw new RuntimeException();
}
int a = 9;
int b1 = 8;
int [][] intArr = new int [a+b1][9];
int [] arr = {1 , 2, 3};
System.out.println(arr[0]);
Integer int1 = new Integer(8);
ArrayList list = new ArrayList();
Object o1 = new Integer(8);
Object o2 = new Integer(9);
list.add(o1);
list.add(o2);
Iterator it = list.iterator();
while (it.hasNext()){
Integer intRep = (Integer)it.next();
System.out.println(intRep.intValue());
}
int i2 = 4;
while (i2 < 10 ) {
System.out.println(i2);
i2 = i2 + 2;
}
}
}
| 3,164
| 24.731707
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Simple2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
import java.util.*;
public class Simple2 {
private int x;
public static void main(String[] args) {
int j = 1;
int i = 2;
;
if (i + j > 1) { System.out.println("Hello" + i); }
Simple2.add(1, 2);
Simple2 simple = new Simple2();
System.out.println(Simple2.add(2, 3));
simple.run();
}
public static String getString() { return "Hello"; }
public static int add(int i, int j) { return i + j; }
public Simple2() { this(8); }
public Simple2(int y) {
super();
this.x = y;
System.out.println(this.x);
}
public void run() { int[] arr = { 9, 0, 8 }; }
}
| 1,519
| 27.679245
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleAssert.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SimpleAssert {
public static void main(String [] args){
SimpleAssert sa = new SimpleAssert();
sa.run();
}
public void run(){
int i = 0;
assert i == 0;
assert i == 0: i;
}
}
| 1,070
| 28.75
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleBinaryTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SimpleBinaryTest {
public static void main(String[] args) {
int i = 0;
int j = 1;
int k = 2;
int m = 4;
int n = 3;
i = j + k;
i = k - j;
i = k * m;
i = m / k;
i = m % n;
i = j + k * m - n;
}
public SimpleBinaryTest() { super(); }
}
| 1,168
| 28.225
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleCharOp.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SimpleCharOp {
public static void main(String [] args){
System.out.println(""+Character.MAX_VALUE);
}
}
| 951
| 33
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleChild.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
class Simple {
public Simple () {
System.out.println("Smile");
}
}
public class SimpleChild extends Simple {
public static void main(String[] args) { int i = 9; }
public SimpleChild() { super(); }
}
| 1,045
| 31.6875
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleFields.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SimpleFields {
Point p1 = new Point();
Point p2 = new Point();
public static void main(String [] args){
SimpleFields sf = new SimpleFields();
sf.run();
}
public void run(){
int i = 3;
p1.x = 9;
p1.y = 8;
p2.x = i;
p2.y = 4;
if ((p1.x - p2.x) > (p1.y - p2.y)){
p1.x = p1.y;
}
}
public void test(Point p){
if (p.x > 3){
p.y = 3;
}
}
}
class Point {
public int x;
public int y;
}
| 1,371
| 22.655172
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleIfTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SimpleIfTest {
public static void main(String [] args) {
SimpleIfTest s = new SimpleIfTest();
}
public SimpleIfTest () {
int x = 9;
int y = 8;
if (x <= y) {
x = x + 1;
}
}
}
| 1,079
| 28.189189
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleParity.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SimpleParity {
public static void main(String [] args){
int i = 9;
int j = 8;
int k = 0;
for (int h = 0; h < 10; h++){
k = k + j;
}
}
}
| 1,052
| 26.710526
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleSwitch.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SimpleSwitch {
public static void main(String [] args) {
SimpleSwitch ss = new SimpleSwitch();
ss.run(7);
}
public void run(int i){
switch(i){
case 2: {
System.out.println(2);
break;
}
case 7: {
System.out.println(7);
break;
}
default: {
System.out.println("default");
break;
}
}
}
}
| 1,382
| 27.22449
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/SimpleThis.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class SimpleThis {
public static void main (String [] args) {
SimpleThis st = new SimpleThis();
st.run();
}
public void run() {
for (int i = 0; i < 10; i++) {
this.go();
}
}
public void go(){
System.out.println("going");
}
}
| 1,128
| 27.948718
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StaticBlockTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class StaticBlockTest {
private static int [] column;
private int [] row;
static {
column = new int[34];
for (int i = 0; i < 34; i++) {
column[i] = i * i;
}
}
{
row = new int[9];
}
public static void main (String [] args) {
System.out.println(column[7]);
}
public StaticBlockTest() {
System.out.println("Smile");
}
public StaticBlockTest(int i) {
System.out.println("Smile"+i);
}
}
| 1,348
| 25.98
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StaticConstantsTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class StaticConstantsTest {
public static int MAX = 10;
public int x = 10;
{
System.out.println("hi");
}
static {
System.out.println();
}
public StaticConstantsTest() {
System.out.println(x);
}
public StaticConstantsTest(int i) {
System.out.println(i*x);
}
public static void main (String [] args) {
StaticConstantsTest sct = new StaticConstantsTest();
sct.run();
}
public void run() {
int [] arr = new int[MAX];
int i = x;
x = i * i;
}
}
| 1,416
| 24.763636
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StaticFieldInits.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class StaticFieldInits {
static int i = 9;
public static void main(String [] args){
System.out.println(i);
}
}
| 961
| 31.066667
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StaticFieldInits2.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class StaticFieldInits2 {
static int x = 9;
static int y = 10;
static boolean b1 = x > y;
public static void main(String [] args){
System.out.println(x);
System.out.println(y);
System.out.println(b1);
}
}
| 1,080
| 29.885714
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StaticMethodOtherClass.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
class OtherClass{
public static void run(){
}
}
public class StaticMethodOtherClass {
public static void main(String [] args){
OtherClass.run();
}
}
| 996
| 29.212121
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StrictClass.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public strictfp class StrictClass {
private int x;
protected int y;
public static int j;
volatile int k;
public StrictClass (){
float f = 0.9F;
}
public static void main(String [] args){
StrictClass s = new StrictClass();
}
}
| 1,095
| 27.842105
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Strictfp.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public strictfp class Strictfp {
float n = 8F;
static float m = 9F;
public static void main(String [] args){
Strictfp s = new Strictfp();
s.run();
}
public void run(){
float f = 9F;
float d = f / 2F;
new Strictfp(){
public void run(){
float g = 9F;
}
}.run();
}
}
| 1,197
| 26.860465
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StringBufferTest.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class StringBufferTest {
public static void main (String [] args) {
StringBufferTest sbt = new StringBufferTest();
}
public String toString() {
int data = 0;
StringBuffer sb = new StringBuffer();
sb.append("[");
sb.append(data);
sb.append("]");
return sb.toString();
}
}
| 1,190
| 27.357143
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StringConcatCond.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class StringConcatCond {
public static void main(String [] args){
int x = 9;
int y = 2;
System.out.println("hello"+(x>y));
}
}
| 984
| 31.833333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/StringConcatField.java
|
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 1997 - 2018 Raja Vallée-Rai and others
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
public class StringConcatField {
public static final String s = 1 + 2 + "jennifer"+ 3 + 4;
public static String s1 = 1 + 2 + "jennifer"+ 3 + 4;
public static void main(String [] args){
System.out.println(s);
System.out.println(s1);
System.out.println(1+2+"jennifer"+3+4);
}
}
| 1,135
| 33.424242
| 71
|
java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.