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
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/ReadOptionsTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import java.util.Arrays; import java...
9,075
26.670732
109
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/RocksDBExceptionTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.Test; import org.r...
3,787
31.655172
82
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/RocksDBTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.*; import org.junit....
65,891
36.71723
99
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/RocksIteratorTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import static org.assertj.core.api.As...
8,416
36.408889
81
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/RocksMemEnvTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.ClassRule; import o...
4,463
29.367347
80
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/RocksNativeLibraryResource.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.rules.ExternalResou...
519
26.368421
67
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/SecondaryDBTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import static org.assertj.core.api.A...
5,646
40.522059
98
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/SliceTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.ClassRule; import or...
2,419
28.876543
80
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/SnapshotTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.ClassRule; import or...
6,683
38.317647
80
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/SstFileManagerTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.Test; import java....
2,546
37.014925
116
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/SstFileReaderTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import static org.assertj.core.api.A...
5,116
31.801282
91
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/SstFileWriterTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import static org.assertj.core.api.A...
9,436
37.995868
86
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/SstPartitionerTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import static org.assertj.core.api.A...
1,514
33.431818
92
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/StatisticsCollectorTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import java.util.Collections; impor...
1,725
29.821429
80
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/StatisticsTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.ClassRule; import o...
5,757
33.071006
100
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/StatsCallbackMock.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; public class StatsCallbackMock imple...
654
30.190476
71
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/TableFilterTest.java
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. package org.rocksdb; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static java.nio.charset.StandardCharsets.UTF_8; import...
3,810
34.616822
83
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/TimedEnvTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.ClassRule; import o...
1,253
27.5
84
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/TransactionDBOptionsTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.Test; import java....
1,969
29.307692
93
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/TransactionDBTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.Rule; import org.ju...
7,162
39.01676
95
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/TransactionLogIteratorTest.java
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. package org.rocksdb; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import static org.assertj.core.api.Assertions.assertThat; public class TransactionLogIteratorTest { @ClassR...
4,781
33.157143
80
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/TransactionOptionsTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.Test; import java....
2,156
28.547945
68
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/TransactionTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.Test; import java....
10,732
33.734628
85
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/TtlDBTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.ClassRule; import o...
4,244
36.566372
100
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/Types.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; /** * Simple type conversion method...
1,030
22.431818
67
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/WALRecoveryModeTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.Test; import stati...
658
27.652174
80
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/WalFilterTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.ClassRule; import o...
5,355
31.26506
81
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/WriteBatchHandlerTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import java.util.Arrays; import java...
2,394
30.103896
80
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/WriteBatchTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). // // Copyright (c) 2011 The LevelDB Authors. All rights r...
17,689
32.440454
107
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/WriteBatchThreadedTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.After; import org.ju...
3,049
28.047619
97
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/WriteBatchWithIndexTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). // // Copyright (c) 2011 The LevelDB Authors. All rights r...
23,246
34.329787
95
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/WriteOptionsTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb; import org.junit.ClassRule; import o...
2,352
32.614286
80
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/test/RemoveEmptyValueCompactionFilterFactory.java
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. package org.rocksdb.test; import org.rocksdb.AbstractCompactionFilter; import org.rocksdb.AbstractCompactionFilterFactory; import org.rocksdb.RemoveEmptyValueCompactionFilter; /** * Simple CompactionFilterFactory class used in tests. Generates ...
788
34.863636
128
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/test/RocksJunitRunner.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.test; import org.junit.internal.JUnitS...
5,115
28.234286
99
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/test/TestableEventListener.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.test; import org.rocksdb.AbstractEven...
728
29.375
85
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/BytewiseComparatorIntTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.util; import org.junit.BeforeClass; i...
9,391
34.044776
151
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/BytewiseComparatorTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.util; import org.junit.ClassRule; imp...
16,671
30.338346
125
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/CapturingWriteBatchHandler.java
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. package org.rocksdb.util; import org.rocksdb.RocksDBException; import org.rocksdb.WriteBatch; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Objects; /** * A simple WriteBatch Handler which adds a ...
5,002
27.588571
81
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/EnvironmentTest.java
// Copyright (c) 2014, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.util; import org.junit.AfterClass; import org....
10,849
40.730769
100
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/IntComparatorTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.util; import org.junit.BeforeClass; i...
9,231
33.576779
151
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/JNIComparatorTest.java
package org.rocksdb.util; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; impor...
5,256
29.04
105
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/ReverseBytewiseComparatorIntTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.util; import org.junit.BeforeClass; i...
9,413
33.738007
151
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/SizeUnitTest.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.util; import org.junit.Test; import s...
872
30.178571
67
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/TestUtil.java
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). package org.rocksdb.util; import org.rocksdb.CompactionPr...
1,596
24.758065
75
java
rocksdb
rocksdb-master/java/src/test/java/org/rocksdb/util/WriteBatchGetter.java
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. package org.rocksdb.util; import org.rocksdb.RocksDBException; import org.rocksdb.WriteBatch; import java.util.Arrays; public class WriteBatchGetter extends WriteBatch.Handler { private int columnFamilyId = -1; private final byte[] key; ...
3,247
23.059259
74
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/instr/Example_CHECKCAST.java
package edu.cmu.cs.vbc.instr; /** * Explore how CHECKCAST is used in bytecode * * @author chupanw */ public class Example_CHECKCAST { public int[] checkPrimitiveArrayType() { int[] a = new int[10]; return (int[]) a; } public Integer[] checkObjectArrayType() { Integer[] a = new ...
721
20.235294
48
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/instr/Example_INSTANCEOF.java
package edu.cmu.cs.vbc.instr; /** * @author chupanw */ public class Example_INSTANCEOF { public void foo(Object o) { if (o instanceof Integer) { System.out.println("o is Integer"); } else { System.out.println("o is not Integer"); } } }
295
18.733333
51
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/instr/Example_INVOKEDYNAMIC.java
package edu.cmu.cs.vbc.instr; import java.util.LinkedList; import java.util.List; import java.util.function.Consumer; import java.util.stream.Collectors; /** * Examples of how INVOKEDYNAMIC is used in bytecode. * <p> * Seems that Java compiler mostly uses INVOKEDYNAMIC to create function objects. * * @author chu...
1,676
30.641509
118
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/UnbalancedStackExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * An example showing that stack may not be empty at the boundary of block * * @author chupanw */ public class UnbalancedStackExample { @VConditional boolean A; int a; public static void main(String[] args) { ...
1,120
20.980392
80
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/CharArrayExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * Adapted from IntArrayExample * * @author chupanw */ public class CharArrayExample { @VConditional private boolean A; private int arrayLength; public static void main(String[] args) { CharArrayExample exa...
2,387
21.317757
68
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/Main.java
package edu.cmu.cs.vbc.prog; /** * Created by ckaestne on 12/25/2015. */ public class Main { public static void main(String[] args) { new Main().run(); } public Main() { System.out.println(this.getClass().getClassLoader().toString()); } public void run() { I a = foo(); ...
823
15.48
98
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/LinkedListExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; /** * Test variational LinkedList * * @author chupanw */ public class LinkedListExample { @VConditional public static boolean A; @VCond...
2,340
22.178218
81
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/InvokeExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * Toy example for method invocation. * <p> * Method should be invoked on a {@link edu.cmu.cs.varex.V} object * * @author chupanw */ public class InvokeExample { @VConditional boolean A; Integer a; /** * Ini...
834
17.977273
66
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/InvokeDynamicExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.util.ArrayList; import java.util.LinkedList; /** * @author chupanw */ public class InvokeDynamicExample { @VConditional static boolean A; public static void main(String[] args) { InvokeDynamicExample exam...
1,124
24.568182
73
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/ExceptionExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.io.IOException; /** * @author chupanw */ public class ExceptionExample { @VConditional boolean A; @VConditional boolean B; @VConditional boolean C; @VConditional boolean numZero; int num; ...
9,636
27.427729
89
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/CutOffExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; public class CutOffExample { @VConditional public static boolean A; @VConditional public static boolean B; @VConditional public static boolean C; @VConditional public static boolean D; @VConditional public static boolean...
1,104
20.666667
64
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/VBlockAnalysisTest.java
package edu.cmu.cs.vbc.prog; /** * A collection of methods that have caused VBlockAnalysis to fail * @author chupanw */ public class VBlockAnalysisTest { /** * Extract from elevator.PL_Interface_impl.start() * * The finally part introduces a loop among Block 5 and Block 16, where Block 16 is ...
2,589
26.553191
156
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/IntArrayExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * This example comes from JVM specification * * @author chupanw */ public class IntArrayExample { @VConditional private boolean A; private int arrayLength; public static void main(String[] args) { new IntA...
2,049
21.777778
68
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/TernaryOperatorExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author chupanw */ public class TernaryOperatorExample { static boolean A; @VConditional static boolean B; static boolean C; @VConditional static boolean D; public static void main(String[] args) { ...
2,681
23.162162
70
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/InterfaceTest.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author chupanw */ public class InterfaceTest { @VConditional private boolean A; @VConditional private boolean B; public static void main(String[] args) { new InterfaceTest().test(); } public ...
1,116
15.671642
48
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/LoopWithContinue.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * A concrete example for the optimality discussion. * * Use Oracle JDK 1.8.0_161 to observe the effects. Use with VBlock logging * and {@link edu.cmu.cs.vbc.utils.TraceExpander} to observe optimality. */ public class LoopWithContin...
1,186
20.981481
75
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/MethodOverloadingExample.java
package edu.cmu.cs.vbc.prog; /** * @author chupanw */ public class MethodOverloadingExample { MethodOverloadingExample(Integer i) { } MethodOverloadingExample(int j) { } MethodOverloadingExample(String s) { } public void foo(Integer i) { System.out.println("foo(Integer)"); ...
2,430
26.314607
100
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/LongExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author chupanw */ public class LongExample { @VConditional boolean A; public static void main(String[] args) { LongExample foo = new LongExample(); long skipNum = 0L; if (foo.A) ski...
687
18.111111
53
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/ScannerExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.util.Scanner; public class ScannerExample { @VConditional public static boolean A; @VConditional public static boolean B; @VConditional public static boolean C; public static void main(String[] args) { ...
791
21.628571
54
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/MethodTest.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * testing conditional method calls */ public class MethodTest { @VConditional public boolean A; @VConditional public boolean B; @VConditional public boolean C; public static void main(String[] args) { ...
946
15.910714
48
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/MultiArrayExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author chupanw */ public class MultiArrayExample { @VConditional public static boolean A = true; public static void main(String[] args) { MultiArrayExample foo = new MultiArrayExample(); foo.create2DArr...
1,993
25.236842
59
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/StaticFieldsWithClinit.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author: chupanw */ public class StaticFieldsWithClinit { @VConditional public static boolean A; @VConditional public static boolean B; // this would give us a <clinit> method // check whether our instrumen...
966
20.488889
74
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/VBlockExample.java
package edu.cmu.cs.vbc.prog; /** * Try to reduce the number of VBlocks */ public class VBlockExample { public static void main(String[] args) { VBlockExample foo = new VBlockExample(); System.out.println(foo.factorial()); System.out.println(foo.factorialN(10)); foo.factorialN2(10)...
1,686
22.760563
81
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/HashMapExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.util.HashMap; /** * @author chupanw */ public class HashMapExample { @VConditional public static boolean A = true; private HashMap<String, Integer> map = new HashMap<>(); private HashMap<Item, Integer> map2 =...
2,205
21.742268
67
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/StaticFieldsExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author: chupanw */ public class StaticFieldsExample { @VConditional public static boolean A; @VConditional public static boolean B; public static void main(String[] args) { StaticFieldsExample example ...
696
18.361111
64
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/TryCatchExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author chupanw */ public class TryCatchExample { @VConditional public static boolean A; @VConditional public static boolean B; void tryCatch1(Integer a, Integer b) { Integer aa = a; Integer bb ...
3,190
26.991228
112
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/InitExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author chupanw */ public class InitExample { @VConditional boolean A; public static void main(String[] args) { InitExample example = new InitExample(); System.out.println(example.createSubClass().toStri...
1,642
18.559524
65
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/ArrayCloneExample.java
package edu.cmu.cs.vbc.prog; public class ArrayCloneExample { public static void main(String[] args) { ArrayCloneExample foo = new ArrayCloneExample(); foo.testInt(); foo.testIntTwoDim(); foo.testDouble(); foo.testDoubleTwoDim(); } void testInt() { int[] a =...
1,442
25.722222
62
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/Test1.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; public class Test1 { @VConditional public boolean A; @VConditional public boolean B; public static void main(String[] args) { new Test1().run(); } private void run() { int a = 3; if (A)...
515
15.645161
48
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/EnumExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; public class EnumExample { @VConditional public boolean A; @VConditional public boolean B; @VConditional public boolean C; Day day; public static void main(String[] args) { EnumExample example = n...
1,464
23.416667
66
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/FieldTest.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * test conditional writes to fields */ public class FieldTest { @VConditional public boolean A; @VConditional public boolean B; public static void main(String[] args) { new FieldTest().test0(); n...
1,718
18.1
58
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/Median.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.util.Scanner; /** * Adapted from the IntroClassJava dataset */ public class Median { @VConditional public static boolean c56; @VConditional public static boolean c57; @VConditional public static boolean c58; ...
3,087
34.906977
107
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/StringBuilderExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * @author chupanw */ public class StringBuilderExample { @VConditional boolean A; public StringBuilder buf; public StringBuilderExample() { if (A) { buf = new StringBuilder("hi"); } else ...
638
18.363636
60
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/ExpandObjectArrayExample.java
package edu.cmu.cs.vbc.prog; import de.fosd.typechef.featureexpr.FeatureExpr; import edu.cmu.cs.varex.V; import edu.cmu.cs.varex.annotation.VConditional; import org.apache.commons.cli.*; /** * Test {@link edu.cmu.cs.varex.ArrayOps#expandArray(V[], Class, FeatureExpr)} * * This example is based on {@link edu.cmu.cs...
1,403
25.490566
78
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/ArrayListExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.util.ArrayList; /** * @author chupanw */ public class ArrayListExample { @VConditional boolean A; private ArrayList<MyInteger> array; private ArrayListExample() { array = new ArrayList<>(10); ...
2,783
22.59322
83
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/MotivationExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; public class MotivationExample { @VConditional static boolean SMILEY = false; @VConditional static boolean WEATHER = true; @VConditional static boolean FAHRENHEIT = false; public static void main(String[] args) { System.out.printl...
1,016
17.833333
48
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/FooInterface.java
package edu.cmu.cs.vbc.prog; /** * @author chupanw */ public interface FooInterface { int increase(int i); int decrease(int i); }
141
13.2
31
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/HashSetExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.util.HashSet; /** * @author chupanw */ public class HashSetExample { @VConditional public static boolean A; @VConditional public static boolean B; public static void main(String[] args) { HashSet...
2,115
21.752688
54
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/SwitchExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * Example used for lifting switch statements. * @author chupanw */ public class SwitchExample { @VConditional boolean A; @VConditional boolean B; public static void main(String args[]) { SwitchExample fo...
3,347
21.026316
67
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/IfElseExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; /** * TODO: make this a test case * * @author: chupanw */ public class IfElseExample { @VConditional public boolean a; public static void main(String[] args) { new IfElseExample().simpleIfElse(); } public v...
822
19.073171
72
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/RefArrayExample.java
package edu.cmu.cs.vbc.prog; import edu.cmu.cs.varex.annotation.VConditional; import java.lang.Integer; /** * Adapted from JVM specification * * @author chupanw */ public class RefArrayExample { @VConditional boolean A; Integer arrayLength; public static void main(String[] args) { new R...
2,453
22.825243
77
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/ZipConstants.java
// package edu.cmu.cs.vbc.prog.zipme; interface ZipConstants { int LOCHDR = 30; long LOCSIG = 'P' | ('K' << 8) | (3 << 16) | (4 << 24); int LOCVER = 4; int LOCFLG = 6; int LOCHOW = 8; int LOCTIM = 10; int LOCCRC = 14; int LOCSIZ = 18; int LOCLEN = 22; int LOCNAM = 26;...
1,095
11.454545
59
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/PL_Interface.java
package edu.cmu.cs.vbc.prog.zipme; import java.util.List; public interface PL_Interface { public List<String> getExecutedActions(); public void start(int specification, int variation) throws Throwable; public void checkOnlySpecification(int specID); public boolean isAbortedRun(); }
310
14.55
73
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/Main.java
package edu.cmu.cs.vbc.prog.zipme; import sun.util.locale.BaseLocale; import java.io.IOException; import java.util.zip.ZipOutputStream; public class Main { public Main() { try { // PL_Interface_impl.main(null); String arg = "Bears are mammals of the family Ursidae. Bears are classified as...
4,144
57.380282
685
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/ZipEntry.java
// package edu.cmu.cs.vbc.prog.zipme; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; /** * This class represents a member of a zip archive. ZipFile and * ZipInputStream will give you instances of this class as information * about the members in an archive. On...
9,512
27.397015
157
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/CheckedOutputStream.java
// package edu.cmu.cs.vbc.prog.zipme; import java.io.IOException; import java.io.OutputStream; /** * OutputStream that computes a checksum of data being written using a * supplied Checksum object. * * @author Tom Tromey * @date May 17, 1999 * @see Checksum */ public class CheckedOutputStream extends OutputStr...
2,603
26.410526
151
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/DeflaterHuffman.java
// package edu.cmu.cs.vbc.prog.zipme; /** * This is the DeflaterHuffman class. * This class is <i>not</i> thread safe. This is inherent in the API, due * to the split of deflate and setInput. * * @author Jochen Hoenicke * @date Jan 6, 2000 */ /** * This is the DeflaterHuffman class. * This class is <i>not<...
20,059
34.630551
167
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/Adler32.java
// package edu.cmu.cs.vbc.prog.zipme; /** * Computes Adler32 checksum for a stream of data. An Adler32 * checksum is not as reliable as a CRC32 checksum, but a lot faster to * compute. * <p> * The specification for Adler32 may be found in RFC 1950. (ZLIB Compressed Data Format Specification version 3.3) * <p> ...
3,928
34.080357
300
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/ZipArchive_PartialInputStream.java
// package edu.cmu.cs.vbc.prog.zipme; import java.io.ByteArrayInputStream; import java.io.EOFException; public final class ZipArchive_PartialInputStream extends ByteArrayInputStream { private int dummyByteCount; public ZipArchive_PartialInputStream(byte[] buffer, int offset, int length) { super(buf...
2,550
25.572917
89
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/StreamManipulator.java
// package edu.cmu.cs.vbc.prog.zipme; /** * This class allows us to retrieve a specified amount of bits from * the input buffer, as well as copy big byte blocks. * It uses an int buffer to store up to 31 bits for direct * manipulation. This guarantees that we can get at least 16 bits, * but we only need at most...
4,988
30.18125
111
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/GZIPOutputStream_hook22.java
// DerivativeCompressGZIPCRC package edu.cmu.cs.vbc.prog.zipme; class GZIPOutputStream_hook22 { protected GZIPOutputStream _this; protected byte[] gzipFooter; protected int crcval; GZIPOutputStream_hook22(GZIPOutputStream _this, byte[] gzipFooter) { this._this = _this; this.gzipFoot...
1,008
25.552632
75
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/InflaterHuffmanTree.java
// package edu.cmu.cs.vbc.prog.zipme; public class InflaterHuffmanTree { private static final int MAX_BITLEN = 15; public static InflaterHuffmanTree defLitLenTree, defDistTree; static { try { byte[] codeLengths = new byte[288]; int i = 0; while (i < 144) ...
4,957
33.671329
87
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/ZipException.java
// package edu.cmu.cs.vbc.prog.zipme; import java.io.IOException; /** * Thrown during the creation or input of a zip file. * * @author Jochen Hoenicke * @author Per Bothner * @status updated to 1.4 */ public class ZipException extends IOException { /** * Compatible with JDK 1.0+. */ private ...
640
16.324324
70
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/ZipArchive_InflaterInputStream.java
// /** */ package edu.cmu.cs.vbc.prog.zipme; import java.io.IOException; import java.io.InputStream; public class ZipArchive_InflaterInputStream extends InflaterInputStream { private final int sz; public ZipArchive_InflaterInputStream(InputStream in, Inflater inf, int sz) { super(in, inf); ...
556
18.892857
81
java
vbc
vbc-master/src/test/java/edu/cmu/cs/vbc/prog/zipme/GZIPOutputStream.java
// DerivativeCompressGZIPCRC package edu.cmu.cs.vbc.prog.zipme; import java.io.IOException; import java.io.OutputStream; public class GZIPOutputStream extends DeflaterOutputStream { /** * CRC-32 value for uncompressed data */ protected CRC32 crc; /** * Creates a GZIPOutputStream with the...
3,226
30.637255
175
java