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/CondAndTest2.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 CondAndTest2 {
public static void main(String [] args){
String s1 = "S1";
String s2 = "S2";
String s3 = "S3";
CondAndTest2 cat = new CondAndTest2();
boolean result = cat.isValid(s1, s2, s3);
}
public boolean isValid(String s1, String s2, String s3){
boolean p1 = s1 == null ? true : false;
return ((s1 == null) && (s2 == null) && (s3 == null));
}
}
| 1,267
| 30.7
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/CondAndTest3.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 CondAndTest3 {
public static void main(String [] args){
boolean y = true;
if (false && y){
boolean x = true;
}
}
}
| 995
| 30.125
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/CondOrTest.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 CondOrTest {
public static void main(String [] args) {
boolean x = true;
boolean y = false;
if (x || y) {
System.out.println("Both True");
}
}
}
| 1,034
| 29.441176
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/CondTest.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 CondTest {
public static void main(String [] args){
CondTest c = new CondTest();
c.run(3);
}
public void run(int x){
if (x < 10) {
System.out.println(x+" is less then 10");
}
else if (x > 4) {
System.out.println(x+" is greater then 4");
}
else if (x > 0) {
System.out.println(x+" is greater then 0");
}
else if (x < 5) {
System.out.println(x+" is less then 5");
}
else {
}
}
}
| 1,392
| 27.428571
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/CondTest2.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 CondTest2 {
public static void main(String [] args){
int i = 1;
do {
if (i == 1) break;
i = i + 1;
i++;
i++;
i++;
i--;
i++;
}while(true);
}
}
| 1,089
| 28.459459
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ConditionTest.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 ConditionTest {
public static void main (String [] args) {
int i = 9;
String out = (i < 10) ? "Big" : "Little";
System.out.println(out);
}
}
| 1,004
| 32.5
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Conditional.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 Conditional {
public static void main(String [] args){
int x = 9;
int y = 3;
int z = (x > y) ? x : y;
System.out.println(x);
System.out.println(y);
System.out.println(z);
}
}
| 1,065
| 29.457143
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ConsEx.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 ConsEx {
public static void main(String [] agrs){
}
public ConsEx() throws MyException{
throw new MyException();
}
}
class MyException extends Exception{
}
| 1,017
| 28.941176
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ConstTest.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 ConstTest {
public static void main(String [] args){
ConstTest ct = new ConstTest();
ct.run();
}
public static final int x = 1+1;
public void run(){
switch(x){
}
char c = 'c';
}
}
| 1,077
| 28.135135
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Constants.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 Constants {
public static void main (String [] args) {
int i = 3 + 4 + 5 + 7;
int j = -(3 + 4);
System.out.println(i);
System.out.println(j);
int [] arr = new int [] {3, 4, 5, 4, 5, 8, 4};
System.out.println(arr[1+1+1]);
System.out.println(!false);
switches(1+4+5);
}
public static void switches(int i){
switch (i){
case 3+7: {System.out.println(10); break;}
}
}
}
| 1,322
| 30.5
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/DeeplyNestedAnon.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 DeeplyNestedAnon {
public static void main(String [] args){
DeeplyNestedAnon d = new DeeplyNestedAnon();
d.run();
}
public void run(){
final int x = 8;
Object o = new TopClass(5) {
public int getB(){
final int y = 9;
Object obj = new TopClass(){
public int getB(){
return y;
}
};
return 4;
}
public int getC(){
return 6;
}
};
o = new TopClass(){
public int getB(){
return 7;
}
};
}
}
class TopClass {
public TopClass(int x){
}
public TopClass(){
}
public int getB(){
return 2;
}
public int getC(){
return 3;
}
}
| 1,761
| 22.184211
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/DefUse.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 DefUse {
public static void main(String [] args){
int i;
int j;
i = 9;
j = i;
}
}
| 963
| 28.212121
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/DivTests.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 DivTests {
public static void main(String [] args) {
Double d = new Double(0.9);
Integer i = new Integer(9);
int t = 4;
double result = 6;
result += d.doubleValue() * i.intValue() / t;
System.out.println(result);
}
}
| 1,124
| 29.405405
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/DoWhile.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 DoWhile {
public static void main(String [] args) {
int i = 0;
do {
i = i + 1;
System.out.println(i*i);
} while (i < 10);
}
}
| 1,021
| 30.9375
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/DoubleArray.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 DoubleArray {
public static void main(String [] args){
double [][]m = {{1, 2, 3}, {2, 5, 6}, {3, 6, 9}};
System.out.println(m[0][0]);
}
}
| 998
| 32.3
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/DoubleAssignTest.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 DoubleAssignTest {
private double x;
private double y;
public static void main (String [] args) {
DoubleAssignTest dat = new DoubleAssignTest();
dat.run();
}
private void run() {
this.x = this.y = 0.9;
System.out.println(x);
}
}
| 1,158
| 31.194444
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/DoubleToShort.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 DoubleToShort {
public static void main(String[] args) {
double x = 9876543210.0;
short y = (short)x;
System.out.println(y);
short s = 9876;
double d = (double)s;
System.out.println(d);
}
}
| 1,078
| 30.735294
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/DriverLJH.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%
*/
// PR#192
public class DriverLJH {
private static java.util.Vector v = new java.util.Vector();
public static void main(String[] args) { test(); }
public static void test() {
DriverLJH temp = new DriverLJH();
Inner inner = temp.new Inner();
if (inner.isInst)
System.out.println("Inner instance flag is true");
}
class Inner {
public boolean isInst = true;
}
}
| 1,276
| 29.404762
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EmptyAfterField.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 EmptyAfterField {
public int x = 9;;
public static void main(String [] args){
}
}
| 926
| 30.965517
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EmptyAfterMethod.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 EmptyAfterMethod {
public static void main(String [] args) {
EmptyAfterMethod eam = new EmptyAfterMethod();
;;
eam.init();
}
protected void init(){};
}
| 1,021
| 30.9375
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EmptyCase.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 EmptyCase {
public static void main (String [] args) {
String test = "jr47wwey5";
for (int i = 0; i < test.length(); i++) {
char c = test.charAt(i);
switch(c){
case 'j': {System.out.println("Smile"); break;}
case '7': {System.out.println("Happy"); break;}
case '4':
case '5':
}
}
}
}
| 1,270
| 30.775
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EmptyFor.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 EmptyFor {
public static void main(String [] args) {
int i = 0;
for ( ; i< 100000; i += 12345){
System.out.println(i);
if (i < 100000) continue;
}
System.out.println(i);
}
}
| 1,078
| 30.735294
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EmptyInnerClass.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 EmptyInnerClass {
public static void main (String [] args){
Empty e = new EmptyInnerClass().new Empty();
}
class Empty {
}
public void run(){
int x = 9;
}
}
| 1,042
| 26.447368
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EmptyStmtTests.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 EmptyStmtTests {
public static void main(String [] args) {
System.out.println("Hello");
};
}
| 939
| 33.814815
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EnclosingClass.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 EnclosingClass {
private class PriClass {
public void run(){
System.out.println("go");
}
}
private void happy(){
System.out.println("smile");
}
public static void main(String [] args){
EnclosingClass e = new EnclosingClass();
e.run();
}
class PubClass {
public void run(){
new PriClass().run();
happy();
}
}
public void run(){
PubClass p = new PubClass();
p.run();
}
}
| 1,360
| 25.686275
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EqBool.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 EqBool {
public static void main(String [] args){
boolean b1 = true;
boolean b2 = true;
if (b1 == b2){
}
}
}
| 993
| 30.0625
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/EverythingTest.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 EverythingTest {
private int i = 0;
protected short s = 2;
public long l = 9L;
private static byte b = 4;
protected static float f = 5F;
public static double d = 3.09;
private char c = 'j';
private String st = "hi";
public static void main(String [] args){
//System.out.println(args[0]);
EverythingTest et = new EverythingTest(9);
et.run();
}
public EverythingTest(int x) {
init();
}
private void run(){
int [] a = new int [10];
for (int i = 0; i < 10; i++) {
a[i] = i;
}
int b = a[7];
float [] f = {10F, 3F, 4F, 7F};
float ch = f[2];
double du = b + ch;
double e = du - ch;
double g = e * ch;
double h = g / ch;
print(h);
boolean truth = false;
boolean falsity = !truth;
int x = 9;
print(x);
int y = -x;
print(y);
int z = +y;
print(z);
int j = z++ - 7;
print(j);
int k = ++z - 7;
print(k);
j = z-- - 7;
print(j);
k = --z - 7;
print(k);
}
private void init(){
}
private void print(int i){
System.out.println(i);
}
private void print(double d){
System.out.println(d);
}
}
| 2,241
| 21.42
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ExThrowTest2.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 ExThrowTest2 {
public static void main(String [] args){
ExThrowTest2 ett = new ExThrowTest2();
try {
ett.run(8, 9);
}
catch(Throwable e){
}
}
public void run(int x, int y) throws Throwable {
if (x < y) throw new Throwable("x must be bigger then y");
System.out.println("x - y: "+(x-y));
}
public class MyException extends RuntimeException{
public MyException(String s){
super(s);
}
}
}
| 1,343
| 29.545455
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Example.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 Example {
public static final void main( String[] args ) {
int x,y,z;
z = 1;
x = 2;
y = 3;
if( x <= y ) {
do {
y = y - 1;
} while( y > 0 );
} else {
x = x + 1;
}
System.out.println( z );
}
}
| 1,159
| 28.74359
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ExceptionTest.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 ExceptionTest {
public static void main(String [] args) {
try {
throw new Exception();
}
catch (Exception e) {
throw e;
}
finally {
return;
}
}
}
| 1,082
| 28.27027
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ExprInit.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 ExprInit {
int x = 3;
boolean ok = (x != 5);
public static void main(String [] args){
ExprInit e = new ExprInit();
e.run();
}
public void run(){
System.out.println(x);
System.out.println(ok);
}
}
| 1,085
| 28.351351
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ExtendProtectedSuper.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 ExtendProtectedSuper extends ProtectedSuper {
public static void main(String [] args){
ExtendProtectedSuper e = new ExtendProtectedSuper("Jennifer");
}
public ExtendProtectedSuper(String name){
super(name);
}
}
class ProtectedSuper {
String name;
protected ProtectedSuper(String name){
this.name = name;
System.out.println(this.name);
}
}
| 1,237
| 29.195122
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Faint.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 Faint {
public static void main(String [] args){
Faint f = new Faint();
f.doit();
}
public void doit(){
int i = 0;
int fc = 0;
for (i = 0; i < 10; i++ ){
fc++;
System.out.println(fc);
}
i = 5;
System.out.println(fc--);
}
}
| 1,162
| 28.820513
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldArrayInit.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 FieldArrayInit {
int [] a = {1 , 2 ,2};
public static void main(String [] args) {
FieldArrayInit fai = new FieldArrayInit();
fai.go();
}
private void go(){
a = new int [] { 1, 2, 3};
}
}
| 1,064
| 29.428571
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldAssign.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 FieldAssign {
public String s = "hi";
public void run(){
s += " ";
s += "there";
System.out.println(s);
}
public static void main(String [] args){
FieldAssign fa = new FieldAssign();
fa.run();
}
}
| 1,090
| 28.486486
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldAssign3.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 FieldAssign3 {
public int x = 9;
public static void main(String [] args){
FieldAssign3 fa = new FieldAssign3();
fa.run();
}
public void run(){
foo().x += 3;
}
public FieldAssign3 foo(){
return new FieldAssign3();
}
}
| 1,115
| 27.615385
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldAssigns.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 FieldAssigns {
private int x;
public static void main(String [] args){
FieldAssigns fa = new FieldAssigns();
fa.run();
}
public void run(){
x = 9;
System.out.println(x);
x += 9;
System.out.println(x);
x -= 9;
System.out.println(x);
x *= 9;
System.out.println(x);
x /= 9;
System.out.println(x);
x %= 9;
System.out.println(x);
x >>= 9;
System.out.println(x);
x >>>= 9;
System.out.println(x);
x <<= 9;
System.out.println(x);
x |= 9;
System.out.println(x);
x &= 9;
System.out.println(x);
x ^= 9;
System.out.println(x);
}
}
| 1,579
| 26.719298
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldAssigns2.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 FieldAssigns2 {
private int x = 7;
private int y = 8;
public static void main(String [] args){
FieldAssigns2 fa2 = new FieldAssigns2();
fa2.run();
}
public void run(){
x = y;
System.out.println(x);
x += y;
System.out.println(x);
x -= y;
System.out.println(x);
x *= y;
System.out.println(x);
x /= y;
System.out.println(x);
x %= y;
System.out.println(x);
x >>= y;
System.out.println(x);
x >>>= y;
System.out.println(x);
x <<= y;
System.out.println(x);
x |= y;
System.out.println(x);
x &= y;
System.out.println(x);
x ^= y;
System.out.println(x);
}
}
| 1,611
| 26.793103
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldBaseTest.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 FieldBaseTest {
Point p1 = new Point();
Point p2 = new Point();
public static void main(String [] args){
FieldBaseTest f = new FieldBaseTest();
f.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,374
| 22.706897
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldFloats.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 FieldFloats {
protected static final double XX = -7.09E2;
protected static final float FF = -7.0F;
protected final double YY = 7.09E2;
public static void main(String [] args){
System.out.println(new FieldFloats().XX);
}
}
| 1,086
| 32.96875
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldGets.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 C {
int x;
}
public class FieldGets {
public static void main(String[] args) {
C c = new C();
c.x = 3;
int i = 7;
int j = 8;
c.x = i + j;
System.out.println(c.x);
System.out.println(c.x);
System.out.println(c.x);
}
}
| 1,119
| 27
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldInits.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 FieldInits {
long bits;
int i = 9;
public FieldInits(){
bits = 8L;
}
public static void main(String [] args) {
FieldInits fi = new FieldInits();
}
}
| 1,025
| 29.176471
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldStringAssigns.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 FieldStringAssigns {
public String x = "hello";
public static void main(String [] args){
FieldStringAssigns fsa = new FieldStringAssigns();
fsa.run();
}
public void run(){
x += x;
System.out.println(x);
x += " there";
System.out.println(x);
}
}
| 1,143
| 31.685714
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldStringAssigns2.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 FieldStringAssigns2 {
public final String x = "hello";
public static void main(String [] args){
FieldStringAssigns2 fsa = new FieldStringAssigns2();
fsa.run();
}
public void run(){
//x += x;
//System.out.println(x);
String y = " there";
System.out.println(x+y);
}
}
| 1,164
| 32.285714
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldTest.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 FieldTest {
public String f = new String("k");
public static void main(String [] args){
FieldTest ft = new FieldTest();
ft.run();
}
public void run(){
int i;
System.out.println("my field: "+f);
}
}
| 1,091
| 28.513514
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldTest2.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 FieldTest2 {
private int x = 9;
public static int SMILE = 0;
public String hi = "HI";
public static void main(String [] args) {
FieldTest2 ft = new FieldTest2();
ft.run();
}
private void run() {
System.out.println(hi);
x = 10;
}
}
| 1,134
| 28.102564
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldTypes.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 FieldTypes {
private long l = 9;
private int u = 0;
public static void main(String [] args){
FieldTypes ft = new FieldTypes();
ft.run();
}
public void run(){
long g = 9;
l = 2;
}
}
| 1,074
| 28.054054
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FieldUnary.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 FieldUnary {
private int count = 9;
static FieldUnary getThis(){
return new FieldUnary();
}
public static void main(String [] args){
System.out.println(getThis().count += 1);
Inner i = new FieldUnary().new Inner();
i.run();
}
class Inner {
public void run(){
System.out.println(getThis().count += 1);
}
}
}
| 1,229
| 28.285714
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FileReaderTest.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.io.*;
import java.util.*;
public class FileReaderTest {
public static void main(String [] args) {
for (int i = 0; i < args.length; i++) {
try {
BufferedReader br = new BufferedReader(new FileReader(args[i]));
StringTokenizer st = new StringTokenizer(br.readLine());
myMethod(StringToInt(st.nextToken()), StringToInt(st.nextToken()), st.nextToken());
String line;
while ((line = br.readLine()) != "done") {
StringTokenizer st2 = new StringTokenizer(line);
myOtherMethod(StringToInt(st2.nextToken()), StringToInt(st2.nextToken()));
}
}
catch(IOException e) {
System.out.println("Error: "+e);
}
}
}
private static void myOtherMethod(int i, int j) {
System.out.println(i+j);
}
private static void myMethod(int i, int j, String s) {
System.out.println(i+j+s);
}
private static int StringToInt(String s) {
return (new Integer(s)).intValue();
}
}
| 2,038
| 30.369231
| 99
|
java
|
soot
|
soot-master/src/it/java_tests/FinalFieldTest.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 FinalFieldTest {
private final LinkedList attributes = new LinkedList(new MyAttributeColl());
public static void main(String [] args){
System.out.println("Hi");
FinalFieldTest fft = new FinalFieldTest();
fft.run();
}
public void run() {
System.out.println(attributes.toString());
}
private class MyAttributeColl extends ArrayList {
public String toString(){
return "Jennifer";
}
}
}
| 1,331
| 28.6
| 80
|
java
|
soot
|
soot-master/src/it/java_tests/FinalFields.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 FinalFields {
private final int i = 9;
private final String s = "j";
public static void main(String [] args){
FinalFields ff = new FinalFields();
System.out.println(ff.i);
ff.run();
}
public void run(){
System.out.println(s+"ennifer");
}
}
| 1,130
| 29.567568
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FinalLocalTest.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 FinalLocalTest {
public static void main(String [] args){
FinalLocalTest flt = new FinalLocalTest();
flt.run();
}
public void run(){
final int i = 0;
new Object() {
public void run(){
{
int i = 9;
System.out.println(i);
}
System.out.println(i);
}
}.run();
}
}
| 1,260
| 29.02381
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FinalStaticTest.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 FinalStaticTest {
public static final int x = 9;
public static final long y = 982L;
public static final double z = 9.0;
public static final float a = 9.23e3f;
public static final char c = 'c';
public static final byte by = 1;
public static final short sh = 2;
public static final String b = "Jennifer";
public static final String q = "string with \" quotes";
public static final int [] arr = new int [] {1, 1, 2, 3, 5, 8, 13, 21};
public static final Object o = new Object();
public static void main(String [] args){
System.out.println(x);
System.out.println(y);
System.out.println(z);
System.out.println(a);
System.out.println(b);
System.out.println("quotes \" in string");
}
}
| 1,620
| 34.23913
| 75
|
java
|
soot
|
soot-master/src/it/java_tests/FinallyAndReturnsLJH.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 FinallyAndReturnsLJH {
static String note = "original";
public static void main(String[] args) {
if (m() != "hi")
System.out.println("call to m() bad");
if (note != "finally")
System.out.println("note left from m() bad, note is " + note);
if (m1() != "hi1")
System.out.println("call to m1() bad");
if (note != "trying")
System.out.println("note left from m1() bad, note is " +note);
}
public static String m() {
try {
return "hi";
} finally {
note = "finally";
}
}
public static String m1() {
try { note = "trying";
} finally {
return "hi1";
}
}
}
| 1,570
| 28.641509
| 72
|
java
|
soot
|
soot-master/src/it/java_tests/FinallyRet.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 FinallyRet {
public static void main(String [] args){
m();
}
public static String m() {
try {
return "hi";
} finally {
String note = "finally";
}
}
}
| 1,064
| 27.783784
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FinallysAndReturns.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 FinallysAndReturns {
static String note = "original";
public static void main(String[] args) {
if (m() != "hi")
System.out.println("call to m() bad");
if (note != "finally")
System.out.println("note left from m() bad, note is " + note);
if (m1() != "hi1")
System.out.println("call to m1() bad");
if (note != "trying")
System.out.println("note left from m1() bad, note is " +note);
}
public static String m() {
try {
return "hi";
} finally {
note = "finally";
}
}
public static String m1() {
try { note = "trying";
} finally {
return "hi1";
}
}
}
| 1,568
| 28.603774
| 72
|
java
|
soot
|
soot-master/src/it/java_tests/First.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 First {
public static void main(String args[]) {
int sum = 0;
First f = new First();
f.foo();
for (int i = 1; i < 10; i++) {
int x, y;
x = i + 1;
y = i + 1;
sum = sum + x + y + 1;
}
System.out.println(sum);
}
public void foo() {
System.out.println("Hi there!");
}
}
| 1,136
| 24.840909
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FloatComp.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 FloatComp {
public static void main (String [] args) {
float f1 = 0.9F;
float f2 = 0.9F;
float f3 = 0.5F;
float f4 = 0.5F;
if (f1 == f2 && f3 == f4){
System.out.println(f4);
}
int i = 9;
int j = 8;
int k = 10;
int h = 2;
boolean b2 = (i == j || win());
}
private static boolean win(){
return true;
}
}
| 1,326
| 27.234043
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/FloatOp.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 FloatOp {
public static void main(String [] args){
System.out.println(-0.0f);
System.out.println((""+ Float.NEGATIVE_INFINITY) + -0.0f);
float f = -0.0f + 0.0f;
String s = "" + f;
run(s);
float y = f + 0;
}
public static void run(String s){
System.out.println(s);
}
}
| 1,180
| 30.918919
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Foo.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 Foo {
public static void main(String [] agrs){
Foo f = new Foo();
f.sum(new int [] {2,3,4,2,3,3,21,3});
}
public void sum(int[] a) {
int total = 0;
int i=0;
int b = a[0];
String j = null;
for (i=0; i<a.length; i++) {
total += a[i];
}
System.out.println(j);
int c = a[i-1];
}
}
| 1,145
| 26.95122
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ForLoop.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 ForLoop {
public static void main (String [] args) {
/*for (int i = 0; i < 10; i++) {
System.out.println(i);
}*/
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
System.out.println(i*j);
}
}
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
System.out.println(i*j);
}
}
}
}
| 1,287
| 30.414634
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Game.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 Game implements GameConstants {
public static void main(String [] args) {
System.out.println("Playing from: "+LOW+" to "+HIGH);
}
}
interface GameConstants {
public static int HIGH = 100;
public static int LOW = 1;
}
| 1,076
| 28.916667
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ForLoopSimple.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 ForLoopSimple {
public static void main(String [] args){
int j = 9;
for (int i = 0; i < 10; i++){
j = j*i;
}
}
}
| 996
| 31.16129
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ForLoopTest.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 ForLoopTest {
public static void main(String[] args) {
for (int i = 0; i < 10; i++)
System.out.print(i + " ");
for (int i = 10; i > 0; i--)
System.out.print(i + " ");
System.out.println();
int i;
class Local {
{
for (int i = 0; i < 10; i++)
System.out.println(i);
}
}
new Local();
}
}
| 1,275
| 29.380952
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ForLoopTest2.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 ForLoopTest2 {
public static void main (String [] args) {
int i = 1;
for (;;) {
if (i == 9) break;
if (i == 8) break;
i += i;
}
}
}
| 1,040
| 29.617647
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Graph.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 Graph {
public static void main(String [] args){
Graph g = new Graph(new int[][] {{1,2,3},{2,1,3},{2,2,4}});
g.loseEdges(1,2);
}
int edges[][];
public Graph(int[][] edges) { this.edges = edges; }
public Graph loseEdges(int i, int j) {
int n = edges.length;
int[][] newedges = new int[n][];
for (int k = 0; k < n; ++k) {
edgelist: {
int z;
search: {
if (k == i) {
for (z = 0; z < edges[k].length; ++z)
if (edges[k][z] == j)
break search;
} else if (k == j) {
for (z = 0; z < edges[k].length; ++z)
if (edges[k][z] == i)
break search;
}
// No edge to be deleted; share this list.
newedges[k] = edges[k];
break edgelist;
} //search
// Copy the list, omitting the edge at position z.
int m = edges[k].length - 1;
int ne[] = new int[m];
System.arraycopy(edges[k], 0, ne, 0, z);
System.arraycopy(edges[k], z+1, ne, z, m-z);
newedges[k] = ne;
} //edgelist
}
return new Graph(newedges);
}
}
| 2,254
| 35.370968
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Hello.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 Hello {
private int i;
public static void main(String[] args) {
System.out.println("Hello");
Hello h = new Hello();
h.run();
}
private void run() { for (this.i = 0; this.i < 10; this.i++) { System.out.println(this.i * this.i); } }
}
| 1,118
| 31.911765
| 107
|
java
|
soot
|
soot-master/src/it/java_tests/Hello2.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 Hello2
{
public static void main(String args[])
{
new Hello2().foo(1);
}
int c=0;
int foo(final int i)
{
class LocalClass
{
class InnerClass
{
int run ()
{
//System.out.println("in InnerClass run()");
class LocalClassNeverUsed
{
int run () // this is never called
{
return i;
}
}
new LocalClassNeverUsed().run();
return new LocalClass().run();
}
}
int run ()
{
//System.out.println("c: "+c);
//c--;
//System.out.println("c: "+c);
if (c--<0) /* prevent stack overflow*///{
//System.out.println("returning 0");
return 0;
//}
//System.out.println("will created InnerClass");
InnerClass ic = new InnerClass();
//System.out.println("created InnerClass");
return ic.run();
//return new InnerClass().run();
}
};
//System.out.println("returning from foo");
return new LocalClass().run();
}
}
| 1,931
| 25.833333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Hello3.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 Hello3
{
public static void main(String args[])
{
new Hello3().foo(1);
}
int foo(final int i)
{
class LocalClass2
{
int run ()
{
return i;
}
};
class LocalClass
{
int run ()
{
return new LocalClass2().run();
}
};
return new LocalClass().run();
}
}
| 1,310
| 25.755102
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/Helper.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 Helper {
public static void main(String [] args){
}
public void action(){
System.out.println("Helper");
}
}
| 964
| 30.129032
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/HelperWithParams.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 HelperWithParams {
public static void main(String [] args){
}
public HelperWithParams(int x, int y){
}
public HelperWithParams(){
}
public void action(){
System.out.println("Helper");
}
}
| 1,087
| 27.631579
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IVoke.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%
*/
interface I { }
class A implements I { }
public class IVoke {
public static void test(I i) {
// the use of i.getClass() leads to problem
System.out.println(i.getClass());
}
static public void main (String[] args) {
I a = new A();
test(a);
}
}
| 1,152
| 29.342105
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IVoke2.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%
*/
interface I {
public void run();
}
class A implements I {
public void run(){
System.out.println("smile");
}
}
public class IVoke2 {
public static void test(I i) {
// the use of i.getClass() leads to problem
System.out.println(i.getClass());
}
static public void main (String[] args) {
I a = new A();
a.run();
test(a);
}
}
| 1,261
| 27.044444
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/If.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 If {
public static void main(String [] args){
boolean x = false;
boolean y = true;
if (y && true){
System.out.println(y);
}
}
}
| 1,012
| 29.69697
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IfDefTest.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 IfDefTest {
public static void main(String [] args){
IfDefTest i = new IfDefTest();
i.run(9);
}
public void run(int i){
int x;
if (i < 10){
x = 6;
}
else if (i < 20){
x = 9;
}
else {
x = 8;
}
System.out.println(x);
}
}
| 1,199
| 26.906977
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IfInstanceTest.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 IfInstanceTest {
public static void main (String [] args) {
IfInstanceTest ift = new IfInstanceTest();
ift.run(new Integer(9));
}
private void run(Object o) {
if (o instanceof String) {
}
else if (!(o instanceof Integer)){
}
}
}
| 1,126
| 29.459459
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IfTest.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 IfTest {
int x = 0;
public static void main(String [] args){
int i = 9;
if (i > 10) {
i = i - 1;
System.out.println(i);
}
if (i < 10) {
System.out.println("Smile");
}
else {
System.out.println("Tomorrow");
}
if (i == 9) {
System.out.println("i = 9");
}
boolean result;
for (int j = 0; j < 10; j ++) {
result = true;
if (result) {
System.out.println("true");
}
if (!result){
System.out.println("false");
}
}
IfTest it = new IfTest();
it.run(7);
it.go();
}
private void go() {
int i = 0;
int j = 9;
if (i < j) {
i = i + 1;
}
}
private boolean run(int size) {
boolean result = true;
Integer t = new Integer(9);
if (t instanceof Integer) {
t = new Integer(100);
}
if (result) {
System.out.println("Smile");
}
if (size > 1) {
result = false;
}
else {
x = size;
}
return result;
}
}
| 2,129
| 21.659574
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IfTest2.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 IfTest2 {
public static void main(String [] args){
int x = 9;
if (x == 8) {
x = x + 1;
}
}
}
| 968
| 30.258065
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IfTest3.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 IfTest3 {
public static void main(String [] args){
int i = 9;
int j = 5;
if (i < 10) {
j++;
}
else {
j--;
}
}
}
| 1,036
| 27.805556
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IfTest5.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 IfTest5 {
public static void main(String[] args) {
int x,y;
x=1;
y=2;
if( x > 2 ) {
x = y;
if (y > 1) {
x = x+1;
}
else
x = x-1;
}
else
y = x;
}
}
| 1,142
| 26.878049
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IfTrueTest.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 IfTrueTest {
public static void main(String [] args){
int x = 0;
if (true) {
x = 8;
}
else {
x = 9;
}
}
}
| 1,019
| 27.333333
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/ImportTests.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.ArrayList;
public class ImportTests {
public static void main (String [] args) {
ImportTests t = new ImportTests();
t.run();
}
private void run() {
ArrayList al = new ArrayList();
}
}
| 1,062
| 31.212121
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/IncDecTest.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 IncDecTest {
public static void main(String [] args){
int x = 4;
x = x++ + ++x;
System.out.println(x);
}
}
| 970
| 31.366667
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InitTest1.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 InitTest1 {
static class Inner1 {
Inner1(){
System.out.println("Inner1");
}
}
public static void main(String [] args){
new Inner1();
InitTest1 it = new InitTest1();
it.run();
}
public void run(){
new Inner1();
}
}
| 1,140
| 26.829268
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InitTest2.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 InitTest2 {
static class Inner1 {
Inner1(){
this(1);
System.out.println("Inner1");
}
Inner1(int i ){
System.out.println("i: "+i);
}
}
public static void main(String [] args){
new Inner1();
InitTest2 it = new InitTest2();
it.run();
}
public void run(){
new Inner1();
}
}
| 1,236
| 26.488889
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InitTest3.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 InitTest3 {
public class Inner1 {
public void m() {
System.out.println("hello from inner 1");
}
}
public static void main(String [] args){
InitTest3 it = new InitTest3();
it.run();
new InitTest3().new Inner1 () {
public void m() {
System.out.println("hello from anon subtype of inner 1");
}
}.m();
}
public void run(){
new Inner1 () {
public void m() {
System.out.println("hello from anon subtype of inner 1");
}
}.m();
}
}
| 1,436
| 29.574468
| 73
|
java
|
soot
|
soot-master/src/it/java_tests/InitTest4.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 InitTest4 {
public class Inner1 {
public void m() {
System.out.println("hello from inner 1");
}
}
public static class Inner2 {
public void m() {
System.out.println("hello from inner 2");
}
}
public static interface InnerInterface1 {
public void go();
}
public interface InnerInterface2 {
public void go();
}
public static void main(String [] args){
InitTest4 it = new InitTest4();
it.run();
//Inner1 in = new Inner1();
class MyClass extends Inner2{
public void m() {
System.out.println("hello from anon subtype of inner 1");
}
};
/*class MyClass1 extends MyStaticClass1{
public void m() {
System.out.println("hello from anon subtype of inner 1");
}
};*/
new Inner2 () {
public void m(){
System.out.println("hello from inner 2 again");
}
}.m();
new InnerInterface1 () {
public void go(){
System.out.println("go");
}
}.go();
new InnerInterface2 () {
public void go(){
System.out.println("go2");
}
}.go();
}
public void run(){
new Inner1 () {
public void m() {
System.out.println("hello from anon subtype of inner 1");
}
}.m();
}
}
| 2,367
| 25.606742
| 73
|
java
|
soot
|
soot-master/src/it/java_tests/InitTest5.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 InitTest5 {
public class Inner1 {
public void m() {
System.out.println("hello from inner 1");
}
}
public static class Inner2 {
public void m() {
System.out.println("hello from inner 2");
}
}
public static interface InnerInterface1 {
public void go();
}
public interface InnerInterface2 {
public void go();
}
public static void main(String [] args){
InitTest5 it = new InitTest5();
it.run();
//Inner1 in = new Inner1();
class MyClass extends Inner2{
public void m() {
System.out.println("hello from anon subtype of inner 1");
}
};
/*class MyClass1 extends MyStaticClass1{
public void m() {
System.out.println("hello from anon subtype of inner 1");
}
};*/
new Inner2 () {
public void m(){
System.out.println("hello from inner 2 again");
}
}.m();
new InnerInterface1 () {
public void go(){
System.out.println("go");
}
}.go();
new InnerInterface2 () {
public void go(){
System.out.println("go2");
}
}.go();
//int y = 9;
new MyObject1(){//y) {
public void go(){
System.out.println("anon of non inner class");
}
};
}
public void run(){
new Inner1 () {
public void m() {
System.out.println("hello from anon subtype of inner 1");
}
}.m();
new Inner2 () {
public void m() {
System.out.println("class to extend is inner static but not in static method");
}
}.m();
}
}
class MyObject1 {
public void go2(){
System.out.println("go2");
}
}
| 2,805
| 25.471698
| 95
|
java
|
soot
|
soot-master/src/it/java_tests/InnerAccessLJH.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 InnerAccessLJH {
public static void main(String[] args) {
if (new C().getCount() == 3)
System.out.println("correct");
else
System.out.println("incorrect");
}
}
class C {
protected int i = 2;
private String s = "hi";
Runnable r = new Runnable() {
public void run() {
s += "s";
//s = s + "s";
}
};
public int getCount() {
return new Object() {
public int m() {
r.run();
return s.length();
}
}.m();
}
}
class DI extends D.Inner {
}
class D implements Map.Entry {
public Object getKey() { return null; }
public Object getValue() { return null; }
public Object setValue(Object o) { return o; }
static class Inner {}
}
class Outer {
class Middle {
class Inner {
void m() {
Inner.this.m1();
Middle.this.m1();
Outer.this.m1();
}
void m1() {}
}
void m1() {}
}
void m1() {}
}
| 1,788
| 20.297619
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerClassConstr.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 InnerClassConstr {
public static void main(String [] args){
Inner i = new InnerClassConstr().new Inner();
}
public class Inner {
public Inner() {
}
}
}
| 1,043
| 28.828571
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerClassTest.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 InnerClassTest {
public class Inner {
public void run() {
System.out.println("Hello - from inner");
}
}
public static void main(String [] args) {
System.out.println("Hello - from outer");
InnerClassTest ict = new InnerClassTest();
ict.run();
}
private void run() {
Inner i = new Inner();
i.run();
}
}
| 1,236
| 27.767442
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerHell.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 javax.swing.*;
public class InnerHell {
public static void main(String[] args) {
AbstractButton b = new MyButton();
}
}
class MyButton extends AbstractButton {
class AccessibleMyButton extends AccessibleJComponent {
}
}
| 1,072
| 29.657143
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerInConst.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 InnerInConst {
public InnerInConst(){
new Object () {
public void run(){
System.out.println("Hello");
}
}.run();
}
public static void main(String [] args){
InnerInConst i = new InnerInConst();
}
}
| 1,108
| 30.685714
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerInConstCall.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 InnerInConstCall {
public InnerInConstCall(){
this(new Runnable() {
public void run(){
System.out.println("Hello");
}
});
}
public InnerInConstCall(Runnable r){
r.run();
}
private void go(){
System.out.println("running go");
}
public static void main(String [] args){
InnerInConstCall c = new InnerInConstCall();
}
}
| 1,264
| 27.75
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerInConstCallWithQualifier.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 InnerInConstCallWithQualifier {
public static void main(String [] args){
new InnerInConstCallWithQualifier().go();
}
public InnerInConstCallWithQualifier(){
this(new QualifierClass().new QInner() {
public void run(){
}});
}
public InnerInConstCallWithQualifier(Object r){
}
private void go(){
System.out.println("running go");
}
}
class QualifierClass {
public class QInner {
public void run(){
}
}
}
| 1,354
| 26.1
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerStatic.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 InnerStatic {
public static void main(String [] args){
Inner1 i1 = new Inner1();
i1.run();
}
static class Inner1 {
public void run() {
new Inner2();
}
class Inner2 {
}
}
}
| 1,115
| 26.9
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerTest1.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 InnerTest1 {
int c = 0;
public static void main(String [] args){
InnerTest1 it1 = new InnerTest1();
it1.run();
}
public void run(){
if (c--<0) return;
//int x = new InnerClass().run();
//System.out.println("x: "+x);
}
int i = 10;
public class InnerClass{
public int run(){
System.out.println("Smile");
if (i--<0) return 0;
return new InnerClass().run();
}
}
}
| 1,334
| 28.021739
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InnerWhile.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 InnerWhile {
public static void main(String [] args){
InnerWhile iw = new InnerWhile();
iw.run();
}
public void run(){
int i = 0;
while (true){
class MyClass {
public void run(){
System.out.println("MyClass");
}
}
MyClass mc = new MyClass();
mc.run();
if (i == 10) break;
i++;
}
}
}
| 1,302
| 26.723404
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InstanceOf.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 InstanceOf {
public static void main(String [] args){
InstanceOf i = new InstanceOf();
i.run("S");
}
public void run(Object o){
if (o instanceof String){
String s = (String)o;
String y = s + s;
}
Object n = new Object();
}
}
| 1,141
| 29.864865
| 71
|
java
|
soot
|
soot-master/src/it/java_tests/InstanceOfTest.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 InstanceOfTest {
public static void main(String [] args) {
Object o = new Integer(9);
if (o instanceof Integer) {
int i = 0;
}
}
}
| 1,006
| 31.483871
| 71
|
java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.