repository
stringclasses
549 values
merge
stringlengths
40
40
parent_a
stringlengths
40
40
parent_b
stringlengths
40
40
path
stringlengths
13
252
conflict_in_file
int64
0
330
conflicts_in_file
int64
1
382
before
listlengths
0
20
side_a
listlengths
0
30
base
listlengths
0
1.67k
⌀
side_b
listlengths
0
30
after
listlengths
0
20
answer
listlengths
0
62
windows_line_endings
bool
2 classes
id
stringlengths
16
16
labels
listlengths
0
41
⌀
kind
stringclasses
8 values
tags
dict
licence
stringclasses
4 values
confluentinc/kafka-streams-examples
d92e54722208bec907c3ca1932d85f15f4943bee
2563ff914a252c3684f63919d5a424cd7788b0e5
f3d3abdeb80ca3466c7fcd4fa451648fb00974fd
src/main/java/io/confluent/examples/streams/PageViewRegionLambdaExample.java
1
2
[ " * }\n", " * </pre>\n", " * 4) Write some input data to the source topics (e.g. via {@link PageViewRegionExampleDriver}).\n", " * The already running example application (step 3) will automatically process this input data and\n", " * write the results to the output topic.\n", " * <pre>\n", " * {@code\n...
[ " * $ java -cp target/kafka-streams-examples-7.8.2-0-standalone.jar io.confluent.examples.streams.PageViewRegionExampleDriver\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.1.16-0-standalone.jar io.confluent.examples.streams.PageViewRegionExampleDriver\n", "||||||||| f8a904e19\n", " * $ java -cp target/kafka-streams-examples-7.1.15-standalone.jar io.confluent.examples.streams.PageViewRegionExa...
[ " * $ java -cp target/kafka-streams-examples-7.8.1-standalone.jar io.confluent.examples.streams.PageViewRegionExampleDriver\n" ]
[ " * }\n", " * </pre>\n", " * 5) Inspect the resulting data in the output topic, e.g. via {@code kafka-console-consumer}.\n", " * <pre>\n", " * {@code\n", " * $ bin/kafka-console-consumer --topic PageViewsByRegion --from-beginning \\\n", " * --bootstrap-server localhost:9092 ...
[ " * $ java -cp target/kafka-streams-examples-7.8.2-0-standalone.jar io.confluent.examples.streams.PageViewRegionExampleDriver\n" ]
false
f98382a9f60e5610
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
d92e54722208bec907c3ca1932d85f15f4943bee
2563ff914a252c3684f63919d5a424cd7788b0e5
f3d3abdeb80ca3466c7fcd4fa451648fb00974fd
src/main/java/io/confluent/examples/streams/WikipediaFeedAvroExample.java
1
2
[ " * }\n", " * </pre>\n", " * 4) Write some input data to the source topics (e.g. via {@link WikipediaFeedAvroExampleDriver}).\n", " * The already running example application (step 3) will automatically process this input data and\n", " * write the results to the output topic. The {@link WikipediaFeedAvroExa...
[ " * $ java -cp target/kafka-streams-examples-7.8.2-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroExampleDriver\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.1.16-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroExampleDriver\n", "||||||||| f8a904e19\n", " * $ java -cp target/kafka-streams-examples-7.1.15-standalone.jar io.confluent.examples.streams.WikipediaFeedA...
[ " * $ java -cp target/kafka-streams-examples-7.8.1-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroExampleDriver\n" ]
[ " * }\n", " * </pre>\n", " */\n", "\n", "public class WikipediaFeedAvroExample {\n", "\n", " static final String WIKIPEDIA_FEED = \"WikipediaFeed\";\n", " static final String WIKIPEDIA_STATS = \"WikipediaStats\";\n", "\n", " public static void main(final String[] args) {\n", " final String...
[ " * $ java -cp target/kafka-streams-examples-7.8.2-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroExampleDriver\n" ]
false
e904d607d9928832
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
d92e54722208bec907c3ca1932d85f15f4943bee
2563ff914a252c3684f63919d5a424cd7788b0e5
f3d3abdeb80ca3466c7fcd4fa451648fb00974fd
src/main/java/io/confluent/examples/streams/WikipediaFeedAvroLambdaExample.java
0
2
[ " * WikiFeed} class is auto-generated from its Avro schema by the maven avro plugin. See {@code\n", " * wikifeed.avsc} under {@code src/main/resources/avro/io/confluent/examples/streams/}. <p> <br> HOW\n", " * TO RUN THIS EXAMPLE <p> 1) Start Zookeeper, Kafka, and Confluent Schema Registry. Please refer to\n", ...
[ " * $ java -cp target/kafka-streams-examples-7.8.2-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroLambdaExample\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.1.16-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroLambdaExample\n", "||||||||| f8a904e19\n", " * $ java -cp target/kafka-streams-examples-7.1.15-standalone.jar io.confluent.examples.streams.WikipediaFeedA...
[ " * $ java -cp target/kafka-streams-examples-7.8.1-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroLambdaExample\n" ]
[ " * }\n", " * </pre>\n", " * 4) Write some input data to the source topics (e.g. via {@link WikipediaFeedAvroExampleDriver}).\n", " * The already running example application (step 3) will automatically process this input data and\n", " * write the results to the output topic. The {@link WikipediaFeedAvroExa...
[ " * $ java -cp target/kafka-streams-examples-7.8.2-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroLambdaExample\n" ]
false
1fad804229348725
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
c9b969aa132792e3ef840b52fa5072e4754bcd8a
835f4ebcff3029b3d7f5e9caa3d81612675943ea
ee8d83c4fbdd465f3f0939f1372f9d2146a70d5d
src/main/java/io/confluent/examples/streams/ApplicationResetExample.java
1
2
[ " * it will reprocess its input data by re-reading the input topic.\n", " * To reset your application you must run:\n", " * <pre>\n", " * {@code\n", " * $ bin/kafka-streams-application-reset --application-id application-reset-demo \\\n", " * --input-topics my-input-to...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar io.confluent.examples.streams.ApplicationResetExample localhost:9092 --reset\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar io.confluent.examples.streams.ApplicationResetExample localhost:9092 --reset\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-e...
[ " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar io.confluent.examples.streams.ApplicationResetExample localhost:9092 --reset\n" ]
[ " * }</pre>\n", " * 9) If your console consumer (from step 5) is still running, you should see the same output data again.\n", " * If it was stopped and you restart it, if will print the result \"twice\".\n", " * Resetting an application does not modify output topics, thus, for this example, the output topic ...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar io.confluent.examples.streams.ApplicationResetExample localhost:9092 --reset\n" ]
false
3b3a634566045075
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
c9b969aa132792e3ef840b52fa5072e4754bcd8a
835f4ebcff3029b3d7f5e9caa3d81612675943ea
ee8d83c4fbdd465f3f0939f1372f9d2146a70d5d
src/main/java/io/confluent/examples/streams/PageViewRegionExampleDriver.java
0
1
[ "import org.apache.kafka.common.serialization.StringSerializer;\n", "\n", "import java.io.IOException;\n", "import java.io.InputStream;\n", "import java.time.Duration;\n", "import java.util.Collections;\n", "import java.util.Properties;\n", "import java.util.Random;\n", "\n", "/**\n", " * This i...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar io.confluent.examples.streams.PageViewRegionExampleDriver\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar io.confluent.examples.streams.PageViewRegionExampleDriver\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.0.12-0-st...
[ " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar io.confluent.examples.streams.PageViewRegionExampleDriver\n" ]
[ " * }\n", " * </pre>\n", " * You should terminate with {@code Ctrl-C}.\n", " */\n", "public class PageViewRegionExampleDriver {\n", "\n", " public static void main(final String[] args) throws IOException {\n", " final String bootstrapServers = args.length > 0 ? args[0] : \"localhost:9092\";\n", ...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar io.confluent.examples.streams.PageViewRegionExampleDriver\n" ]
false
4da369906e62350d
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
c9b969aa132792e3ef840b52fa5072e4754bcd8a
835f4ebcff3029b3d7f5e9caa3d81612675943ea
ee8d83c4fbdd465f3f0939f1372f9d2146a70d5d
src/main/java/io/confluent/examples/streams/SessionWindowsExample.java
0
2
[ " * 1) Start Zookeeper, Kafka, and Confluent Schema Registry. Please refer to <a href='http://docs.confluent.io/current/quickstart.html#quickstart'>QuickStart</a>.\n", " * <p>\n", " * 2) Create the input/intermediate/output topics used by this example.\n", " * <pre>\n", " * {@code\n", " * $ bin/kafka-topi...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar io.confluent.examples.streams.SessionWindowsExample\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar io.confluent.examples.streams.SessionWindowsExample\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.0.12-0-standalo...
[ " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar io.confluent.examples.streams.SessionWindowsExample\n" ]
[ " * }\n", " * </pre>\n", " * 4) Write some input data to the source topics (e.g. via {@link SessionWindowsExampleDriver}). The\n", " * already running example application (step 3) will automatically process this input data and write\n", " * the results to the output topic.\n", " * <pre>\n", " * {@code\n...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar io.confluent.examples.streams.SessionWindowsExample\n" ]
false
b7ed7e49d3e508ad
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
c9b969aa132792e3ef840b52fa5072e4754bcd8a
835f4ebcff3029b3d7f5e9caa3d81612675943ea
ee8d83c4fbdd465f3f0939f1372f9d2146a70d5d
src/main/java/io/confluent/examples/streams/WikipediaFeedAvroExample.java
0
2
[ " * {@code WikiFeed} class is auto-generated from its Avro schema by the maven avro plugin. See\n", " * {@code wikifeed.avsc} under {@code src/main/resources/avro/io/confluent/examples/streams/}. <p>\n", " * <br> HOW TO RUN THIS EXAMPLE <p> 1) Start Zookeeper, Kafka, and Confluent Schema Registry. Please\n", ...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroExample\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroExample\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.0.12-0-stand...
[ " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroExample\n" ]
[ " * }\n", " * </pre>\n", " * 4) Write some input data to the source topics (e.g. via {@link WikipediaFeedAvroExampleDriver}).\n", " * The already running example application (step 3) will automatically process this input data and\n", " * write the results to the output topic. The {@link WikipediaFeedAvroExa...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar io.confluent.examples.streams.WikipediaFeedAvroExample\n" ]
false
194416bca222e87e
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
c9b969aa132792e3ef840b52fa5072e4754bcd8a
835f4ebcff3029b3d7f5e9caa3d81612675943ea
ee8d83c4fbdd465f3f0939f1372f9d2146a70d5d
src/main/java/io/confluent/examples/streams/interactivequeries/kafkamusic/KafkaMusicExample.java
1
2
[ " * io.confluent.examples.streams.interactivequeries.kafkamusic.KafkaMusicExample 7070\n", " * }\n", " * </pre>\n", " *\n", " * Here, `7070` sets the port for the REST endpoint that will be used by this application instance.\n", " *\n", " * Then, in a separate terminal, run the second instance of t...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar \\\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar \\\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.0.12-0-standalone.jar \\\n", "||||||||||| merged common ancest...
[ " * $ java -cp target/kafka-streams-examples-7.1.10-0-standalone.jar \\\n" ]
[ " * io.confluent.examples.streams.interactivequeries.kafkamusic.KafkaMusicExample 7071\n", " * }\n", " * </pre>\n", " *\n", " *\n", " * 4) Write some input data to the source topics (e.g. via {@link KafkaMusicExampleDriver}). The\n", " * already running example application (step 3) will automatical...
[ " * $ java -cp target/kafka-streams-examples-7.2.8-0-standalone.jar \\\n" ]
false
9642061f1600dc8b
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
3ac36d626b044217742d179bd188243d2ddf9833
05cb26b09f4ac42f560c4d62ac1d006002b3ac1e
59d70eeb8d15a30e8db901a7f37c8c4d730eed6a
src/main/java/io/confluent/examples/streams/MapFunctionLambdaExample.java
0
1
[ " * 1) Start Zookeeper and Kafka. Please refer to <a href='http://docs.confluent.io/current/quickstart.html#quickstart'>QuickStart</a>.\n", " * <p>\n", " * 2) Create the input and output topics used by this example.\n", " * <pre>\n", " * {@code\n", " * $ bin/kafka-topics --create --topic TextLinesTopic \\...
[ " * $ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar io.confluent.examples.streams.MapFunctionLambdaExample\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar io.confluent.examples.streams.MapFunctionLambdaExample\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.3.11-0-standa...
[ " * $ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar io.confluent.examples.streams.MapFunctionLambdaExample\n" ]
[ " * }\n", " * </pre>\n", " * 4) Write some input data to the source topic (e.g. via {@code kafka-console-producer}). The already\n", " * running example application (step 3) will automatically process this input data and write the\n", " * results to the output topics.\n", " * <pre>\n", " * {@code\n", ...
[ " * $ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar io.confluent.examples.streams.MapFunctionLambdaExample\n" ]
false
d69eaef94cadc4da
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
3ac36d626b044217742d179bd188243d2ddf9833
05cb26b09f4ac42f560c4d62ac1d006002b3ac1e
59d70eeb8d15a30e8db901a7f37c8c4d730eed6a
src/main/java/io/confluent/examples/streams/SecureKafkaStreamsExample.java
0
1
[ " * Zookeeper Client will go to AUTH_FAILED state.\n", " * Exception in thread \"main\" org.I0Itec.zkclient.exception.ZkAuthFailedException: Authentication\n", " * failure\n", " * }</pre>\n", " * If this happens, just wait a minute so that ZooKeeper can finish its startup, then try again.\n", " * <p>\n"...
[ " * [vagrant@kafka ~]$ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar \\\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * [vagrant@kafka ~]$ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar \\\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * [vagrant@kafka ~]$ java -cp target/kafka-streams-examples-7.3.11-0-standalone.jar \\\n", ...
[ " * [vagrant@kafka ~]$ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar \\\n" ]
[ " * io.confluent.examples.streams.SecureKafkaStreamsExample\n", " * }\n", " * </pre>\n", " * 4) Write some input data to the source topic (e.g. via {@code kafka-console-producer}). The already\n", " * running example application (step 3) will automatically process this input data...
[ " * [vagrant@kafka ~]$ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar \\\n" ]
false
1ac4a578cc5733b0
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
3ac36d626b044217742d179bd188243d2ddf9833
05cb26b09f4ac42f560c4d62ac1d006002b3ac1e
59d70eeb8d15a30e8db901a7f37c8c4d730eed6a
src/main/java/io/confluent/examples/streams/SessionWindowsExampleDriver.java
0
1
[ "import org.apache.kafka.clients.producer.ProducerConfig;\n", "import org.apache.kafka.clients.producer.ProducerRecord;\n", "import org.apache.kafka.common.serialization.Serdes;\n", "\n", "import java.time.Duration;\n", "import java.util.Collections;\n", "import java.util.Map;\n", "import java.util.Pr...
[ " * $ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar io.confluent.examples.streams.SessionWindowsExampleDriver\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar io.confluent.examples.streams.SessionWindowsExampleDriver\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.3.11-0-sta...
[ " * $ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar io.confluent.examples.streams.SessionWindowsExampleDriver\n" ]
[ " * }\n", " * </pre>\n", " */\n", "public class SessionWindowsExampleDriver {\n", "\n", " private static final int NUM_RECORDS_SENT = 8;\n", "\n", " public static void main(final String[] args) {\n", " final String bootstrapServers = args.length > 0 ? args[0] : \"localhost:9092\";\n", " fi...
[ " * $ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar io.confluent.examples.streams.SessionWindowsExampleDriver\n" ]
false
94e60174d0aced85
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
3ac36d626b044217742d179bd188243d2ddf9833
05cb26b09f4ac42f560c4d62ac1d006002b3ac1e
59d70eeb8d15a30e8db901a7f37c8c4d730eed6a
src/main/java/io/confluent/examples/streams/TopArticlesLambdaExample.java
0
2
[ " * HOW TO RUN THIS EXAMPLE\n", " * <p>\n", " * 1) Start Zookeeper, Kafka, and Confluent Schema Registry. Please refer to <a href='http://docs.confluent.io/current/quickstart.html#quickstart'>QuickStart</a>.\n", " * <p>\n", " * 2) Create the input/intermediate/output topics used by this example.\n", " * <...
[ " * $ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar io.confluent.examples.streams.TopArticlesLambdaExample\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar io.confluent.examples.streams.TopArticlesLambdaExample\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.3.11-0-standa...
[ " * $ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar io.confluent.examples.streams.TopArticlesLambdaExample\n" ]
[ " * }\n", " * </pre>\n", " * 4) Write some input data to the source topics (e.g. via {@link TopArticlesExampleDriver}).\n", " * The already running example application (step 3) will automatically process this input data and\n", " * write the results to the output topic. The {@link TopArticlesExampleDriver} ...
[ " * $ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar io.confluent.examples.streams.TopArticlesLambdaExample\n" ]
false
8e896d3f2eedf7b8
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
confluentinc/kafka-streams-examples
3ac36d626b044217742d179bd188243d2ddf9833
05cb26b09f4ac42f560c4d62ac1d006002b3ac1e
59d70eeb8d15a30e8db901a7f37c8c4d730eed6a
src/main/java/io/confluent/examples/streams/interactivequeries/WordCountInteractiveQueriesDriver.java
0
1
[ "import org.apache.kafka.clients.producer.ProducerConfig;\n", "import org.apache.kafka.clients.producer.ProducerRecord;\n", "import org.apache.kafka.common.serialization.StringSerializer;\n", "\n", "import java.util.Arrays;\n", "import java.util.List;\n", "import java.util.Properties;\n", "import java...
[ " * $ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar io.confluent.examples.streams.interactivequeries.WordCountInteractiveQueriesDriver\n" ]
[ "<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar io.confluent.examples.streams.interactivequeries.WordCountInteractiveQueriesDriver\n", "||||||||| merged common ancestors\n", "<<<<<<<<<<< Temporary merge branch 1\n", " * $ java -cp target/kafka-stre...
[ " * $ java -cp target/kafka-streams-examples-7.4.8-0-standalone.jar io.confluent.examples.streams.interactivequeries.WordCountInteractiveQueriesDriver\n" ]
[ " * }\n", " * </pre>\n", " * You should terminate with Ctrl-C\n", " */\n", "public class WordCountInteractiveQueriesDriver {\n", "\n", " public static void main(final String [] args) throws Exception {\n", " final String bootstrapServers = args.length > 0 ? args[0] : \"localhost:9092\";\n", " ...
[ " * $ java -cp target/kafka-streams-examples-7.5.7-0-standalone.jar io.confluent.examples.streams.interactivequeries.WordCountInteractiveQueriesDriver\n" ]
false
13cf4b926eb18945
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
464a26f54bf041e4c04ef1b8e2b808f58bd223b5
ba43557d7e14e88783358dffe99e7e93238463ef
b28cbde6a1d19b5e531e209cd17833082f4f66ff
src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RsItemHandler.java
0
1
[ "\n", " @NotNull\n", " private final INetwork network;\n", "\n", " public RsItemHandler(@NotNull INetwork network) {\n", " this.network = network;\n", " }\n", "\n", " @NotNull\n", " @Override\n", " public ItemStack insertItem(int slot, @NotNull ItemStack stack, boolea...
[ " return network.extractItem(item, filter.getCount(), filter.getNbt() != null ? IComparer.COMPARE_NBT : IComparer.COMPARE_QUANTITY, simulate ? Action.SIMULATE : Action.PERFORM);\n" ]
[ " return network.extractItem(item, Math.max(64, filter.getCount()), filter.getNbt() != null ? IComparer.COMPARE_NBT : IComparer.COMPARE_QUANTITY, simulate ? Action.SIMULATE : Action.PERFORM);\n" ]
[ " ItemStack extracted = network.extractItem(item, filter.getCount(), IComparer.COMPARE_NBT, simulate ? Action.SIMULATE : Action.PERFORM);\n", " AdvancedPeripherals.debug(\"Extracted item: \" + extracted + \" from filter: \" + filter);\n", " return extracted;\n" ]
[ " }\n", "\n", "}\n" ]
[ " ItemStack extracted = network.extractItem(item, filter.getCount(), IComparer.COMPARE_NBT, simulate ? Action.SIMULATE : Action.PERFORM);\n", " AdvancedPeripherals.debug(\"Extracted item: \" + extracted + \" from filter: \" + filter);\n", " return extracted;\n" ]
false
837b8ab4afdbd2e3
[ "B1", "B2", "B3" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
464a26f54bf041e4c04ef1b8e2b808f58bd223b5
ba43557d7e14e88783358dffe99e7e93238463ef
b28cbde6a1d19b5e531e209cd17833082f4f66ff
src/main/java/de/srendi/advancedperipherals/common/util/inventory/FluidFilter.java
0
1
[ "\n", "import java.util.Map;\n", "\n", "public class FluidFilter {\n", "\n", " private Fluid fluid = Fluids.EMPTY;\n", " private TagKey<Fluid> tag = null;\n", " private CompoundTag nbt = null;\n", " private int count = 1000;\n", " private String fingerprint = \"\";\n", "\n", " ...
[ " itemArgument.tag = TagKey.create(Registries.FLUID, new ResourceLocation(name.substring(1)));\n", " } else if ((itemArgument.fluid = ItemUtil.getRegistryEntry(name, ForgeRegistries.FLUIDS)) == null) {\n" ]
[ " itemArgument.tag = TagKey.create(Registry.FLUID_REGISTRY, new ResourceLocation(name.substring(1)));\n", " } else if ((itemArgument.fluid = ItemUtil.getRegistryEntry(name, ForgeRegistries.FLUIDS)) == null) {\n" ]
[ " fluidFilter.tag = TagKey.create(Registry.FLUID_REGISTRY, new ResourceLocation(name.substring(1)));\n", " } else if ((fluidFilter.fluid = ItemUtil.getRegistryEntry(name, ForgeRegistries.FLUIDS)) == null) {\n" ]
[ " return Pair.of(null, \"FLUID_NOT_FOUND\");\n", " }\n", " } catch (LuaException luaException) {\n", " return Pair.of(null, \"NO_VALID_FLUID\");\n", " }\n", " }\n", " if (item.containsKey(\"nbt\")) {\n", " ...
[ " fluidFilter.tag = TagKey.create(Registries.FLUID, new ResourceLocation(name.substring(1)));\n", " } else if ((fluidFilter.fluid = ItemUtil.getRegistryEntry(name, ForgeRegistries.FLUIDS)) == null) {\n" ]
false
2cd2cc68ee9e4ba9
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
464a26f54bf041e4c04ef1b8e2b808f58bd223b5
ba43557d7e14e88783358dffe99e7e93238463ef
b28cbde6a1d19b5e531e209cd17833082f4f66ff
src/main/java/de/srendi/advancedperipherals/common/util/inventory/ItemFilter.java
0
1
[ "\n", "public class ItemFilter {\n", "\n", " private Item item = Items.AIR;\n", " private TagKey<Item> tag = null;\n", " private CompoundTag nbt = null;\n", " private int count = 64;\n", " private String fingerprint = \"\";\n", " public int fromSlot = -1;\n", " public int toSl...
[ " itemArgument.tag = TagKey.create(Registries.ITEM, new ResourceLocation(name.substring(1)));\n", " } else if ((itemArgument.item = ItemUtil.getRegistryEntry(name, ForgeRegistries.ITEMS)) == null) {\n" ]
[ " itemArgument.tag = TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation(name.substring(1)));\n", " } else if ((itemArgument.item = ItemUtil.getRegistryEntry(name, ForgeRegistries.ITEMS)) == null) {\n" ]
[ " itemFilter.tag = TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation(name.substring(1)));\n", " } else if ((itemFilter.item = ItemUtil.getRegistryEntry(name, ForgeRegistries.ITEMS)) == null) {\n" ]
[ " return Pair.of(null, \"ITEM_NOT_FOUND\");\n", " }\n", " } catch (LuaException luaException) {\n", " return Pair.of(null, \"NO_VALID_ITEM\");\n", " }\n", " }\n", " if (item.containsKey(\"nbt\")) {\n", " tr...
[ " itemFilter.tag = TagKey.create(Registries.ITEM, new ResourceLocation(name.substring(1)));\n", " } else if ((itemFilter.item = ItemUtil.getRegistryEntry(name, ForgeRegistries.ITEMS)) == null) {\n" ]
false
5b1c892a6237dc2d
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
5be343fff06e599ce2e5981b521f215357a6deed
9b0f17aa86d767c38ae602615d4039c18491548e
35671f115318002de667e3ff16b57aa7ede5d214
src/main/java/de/srendi/advancedperipherals/common/network/APNetworking.java
0
3
[ "package de.srendi.advancedperipherals.common.network;\n", "\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n", "import de.srendi.advancedperipherals.common.network.base.IPacket;\n" ]
[ "import de.srendi.advancedperipherals.common.network.toclient.KeyboardMouseCapturePacket;\n" ]
[]
[ "import de.srendi.advancedperipherals.common.network.toclient.OverlayModuleClientRequestPacket;\n" ]
[ "import de.srendi.advancedperipherals.common.network.toclient.RenderableObjectBulkSyncPacket;\n", "import de.srendi.advancedperipherals.common.network.toclient.RenderableObjectClearPacket;\n", "import de.srendi.advancedperipherals.common.network.toclient.RenderableObjectDeletePacket;\n", "import de.srendi.adv...
[ "import de.srendi.advancedperipherals.common.network.toclient.KeyboardMouseCapturePacket;\n", "import de.srendi.advancedperipherals.common.network.toclient.OverlayModuleClientRequestPacket;\n" ]
false
27a3fff91758aacb
[ "A1", "B1" ]
A then B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
5be343fff06e599ce2e5981b521f215357a6deed
9b0f17aa86d767c38ae602615d4039c18491548e
35671f115318002de667e3ff16b57aa7ede5d214
src/main/java/de/srendi/advancedperipherals/common/network/APNetworking.java
1
3
[ "import de.srendi.advancedperipherals.common.network.toclient.RenderableObjectBulkSyncPacket;\n", "import de.srendi.advancedperipherals.common.network.toclient.RenderableObjectClearPacket;\n", "import de.srendi.advancedperipherals.common.network.toclient.RenderableObjectDeletePacket;\n", "import de.srendi.adv...
[ "import de.srendi.advancedperipherals.common.network.toserver.KeyboardMouseClickPacket;\n", "import de.srendi.advancedperipherals.common.network.toserver.KeyboardMouseMovePacket;\n", "import de.srendi.advancedperipherals.common.network.toserver.KeyboardMouseScrollPacket;\n" ]
[]
[ "import de.srendi.advancedperipherals.common.network.toserver.OverlayModuleClientInfoPacket;\n" ]
[ "import de.srendi.advancedperipherals.common.network.toserver.SaddleTurtleControlPacket;\n", "import net.minecraft.core.BlockPos;\n", "import net.minecraft.network.FriendlyByteBuf;\n", "import net.minecraft.resources.ResourceLocation;\n", "import net.minecraft.server.MinecraftServer;\n", "import net.minec...
[ "import de.srendi.advancedperipherals.common.network.toserver.KeyboardMouseClickPacket;\n", "import de.srendi.advancedperipherals.common.network.toserver.KeyboardMouseMovePacket;\n", "import de.srendi.advancedperipherals.common.network.toserver.KeyboardMouseScrollPacket;\n", "import de.srendi.advancedperipher...
false
7009e7cb14b0d426
[ "A1", "A2", "A3", "B1" ]
A then B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
5be343fff06e599ce2e5981b521f215357a6deed
9b0f17aa86d767c38ae602615d4039c18491548e
35671f115318002de667e3ff16b57aa7ede5d214
src/main/java/de/srendi/advancedperipherals/common/network/APNetworking.java
2
3
[ "\n", "import java.util.Optional;\n", "import java.util.function.Function;\n", "\n", "public class APNetworking {\n", "\n", " private static final String PROTOCOL_VERSION = ModLoadingContext.get().getActiveContainer().getModInfo().getVersion().toString();\n", "\n", " public static final Simple...
[]
[ " registerServerToClient(RenderableObjectSyncPacket.class, RenderableObjectSyncPacket::decode);\n", " registerServerToClient(RenderableObjectDeletePacket.class, RenderableObjectDeletePacket::decode);\n", " registerServerToClient(RenderableObjectClearPacket.class, RenderableObjectClearPacket...
[ " registerServerToClient(RenderableObjectSyncPacket.class, RenderableObjectSyncPacket::decode);\n", " registerServerToClient(RenderableObjectDeletePacket.class, RenderableObjectDeletePacket::decode);\n", " registerServerToClient(RenderableObjectClearPacket.class, RenderableObjectClearPacket...
[ "\n", " registerClientToServer(GlassesHotkeyPacket.class, GlassesHotkeyPacket::decode);\n", " registerClientToServer(KeyboardMouseClickPacket.class, KeyboardMouseClickPacket::decode);\n", " registerClientToServer(KeyboardMouseMovePacket.class, KeyboardMouseMovePacket::decode);\n", " ...
[]
false
74a76bbb58610e0d
[]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
c2bc0a0f7d4121831ad715fce8881ca41b8e29bb
972044460551a285b504d64c073a6b573eecbeb7
3444a30e75fd12f94470754b9d2410f2b8873a78
src/main/java/de/srendi/advancedperipherals/common/blocks/blockentities/InventoryManagerEntity.java
0
1
[ "package de.srendi.advancedperipherals.common.blocks.blockentities;\n", "\n", "import de.srendi.advancedperipherals.common.addons.computercraft.peripheral.InventoryManagerPeripheral;\n", "import de.srendi.advancedperipherals.common.blocks.base.IInventoryBlock;\n", "import de.srendi.advancedperipherals.commo...
[ "import net.neoforged.server.ServerLifecycleHooks;\n" ]
[ "import net.minecraftforge.server.ServerLifecycleHooks;\n" ]
[ "import net.minecraftforge.server.ServerLifecycleHooks;\n", "\n" ]
[ "import org.jetbrains.annotations.NotNull;\n", "import org.jetbrains.annotations.Nullable;\n", "import java.util.UUID;\n", "\n", "public class InventoryManagerEntity extends PeripheralBlockEntity<InventoryManagerPeripheral> implements IInventoryBlock<InventoryManagerContainer> {\n", "\n", " private U...
[ "import net.neoforged.server.ServerLifecycleHooks;\n" ]
false
015abcdbbdbaf1d0
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
c2bc0a0f7d4121831ad715fce8881ca41b8e29bb
972044460551a285b504d64c073a6b573eecbeb7
3444a30e75fd12f94470754b9d2410f2b8873a78
src/main/java/de/srendi/advancedperipherals/common/util/ChunkManager.java
0
2
[ " for (String key : forcedData.getAllKeys()) {\n", " manager.forcedChunks.put(UUID.fromString(key), LoadChunkRecord.deserialize(forcedData.getCompound(key)));\n", " }\n", " return manager;\n", " }\n", "\n", " @SubscribeEvent\n", " public static void beforeServe...
[ " if (tickCounter % (APConfig.PERIPHERALS_CONFIG.chunkLoadValidTime.get() / 2) == 0) {\n" ]
[ " // run cleanup per chunkLoadValidTime / 10\n", " final int checkIntervalInTick = APConfig.PERIPHERALS_CONFIG.chunkLoadValidTime.get() * 20 / 10;\n", " if (tickCounter >= checkIntervalInTick) {\n", " tickCounter = 0;\n" ]
[ " // run cleanup per chunkLoadValidTime / 10\n", " final int checkIntervalInTick = APConfig.PERIPHERALS_CONFIG.chunkLoadValidTime.get() * 20 / 10;\n", " if (tickCounter % checkIntervalInTick == 0) {\n" ]
[ " ChunkManager.get(ServerLifecycleHooks.getCurrentServer().overworld()).cleanup();\n", " }\n", " }\n", " }\n", "\n", " public synchronized boolean addForceChunk(ServerLevel level, UUID owner, ChunkPos pos) {\n", " AdvancedPeripherals.debug(\"Trying to load f...
[ " // run cleanup per chunkLoadValidTime / 10\n", " final int checkIntervalInTick = APConfig.PERIPHERALS_CONFIG.chunkLoadValidTime.get() * 20 / 10;\n", " if (tickCounter % checkIntervalInTick == 0) {\n" ]
false
2fd6f59ae083c147
[ "B1", "B2", "B3" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
83da1532851938f3de928c689ac972cffabc7b08
e1f7b00a3d9d990d86fb6c0c740916f671442097
81d2bcbb05c365116488e40e88cac4a08090dba2
src/main/java/de/srendi/advancedperipherals/common/addons/minecolonies/MineColonies.java
0
1
[ " List<Object> result = new ArrayList<>();\n", " if (researches != null) {\n", " for (ResourceLocation researchName : researches) {\n", " //All global possible researches\n", " IGlobalResearchTree globalTree = IGlobalResearchTree.getInstance();\n", " ...
[ " for (ItemStorage item : research.getCostList())\n", " cost.add(LuaConverter.itemStackToObject(item.getItemStack(), item.getAmount()));\n" ]
[ " for (ItemStorage item : research.getCostList())\n", " cost.add(LuaConverter.stackToObject(item.getItemStack(), item.getAmount()));\n" ]
[ " for (IResearchCost item : research.getCostList()) {\n", " Map<String, Object> researchCost = new HashMap<>();\n", " List<Map<String, Object>> researchCostItems = new ArrayList<>();\n" ]
[ "\n", " for (Item costItem : item.getItems())\n", " researchCostItems.add(LuaConverter.itemToObject(costItem));\n", "\n", " researchCost.put(\"validItems\", researchCostItems);\n", " researchCost.put(\"count\", item.getCount()...
[ " for (IResearchCost item : research.getCostList()) {\n", " Map<String, Object> researchCost = new HashMap<>();\n", " List<Map<String, Object>> researchCostItems = new ArrayList<>();\n" ]
false
6801fcb18c6c8eef
[ "B1", "B2", "B3" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
83da1532851938f3de928c689ac972cffabc7b08
e1f7b00a3d9d990d86fb6c0c740916f671442097
81d2bcbb05c365116488e40e88cac4a08090dba2
src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java
0
1
[ "package de.srendi.advancedperipherals.common.util;\n", "\n", "import dan200.computercraft.api.lua.LuaException;\n", "import dan200.computercraft.shared.util.NBTUtil;\n", "import de.srendi.advancedperipherals.common.addons.computercraft.peripheral.InventoryManagerPeripheral;\n", "import de.srendi.advanced...
[ "import net.minecraft.world.level.material.Fluid;\n" ]
[]
[ "import net.minecraft.world.level.block.state.properties.Property;\n" ]
[ "import net.minecraftforge.common.IForgeShearable;\n", "import net.minecraftforge.fluids.FluidStack;\n", "import net.minecraftforge.fluids.FluidType;\n", "import org.jetbrains.annotations.NotNull;\n", "\n", "import java.util.Collections;\n", "import java.util.HashMap;\n", "import java.util.List;\n", ...
[ "import net.minecraft.world.level.block.state.properties.Property;\n", "import net.minecraft.world.level.material.Fluid;\n" ]
false
04b6351325448e14
[ "B1", "A1" ]
B then A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
a921e37426746526ae7cc89622f60e742c7050dc
1de7972c0e3439d3e2401061faea619b792fb27b
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/addons/botania/ManaFlowerIntegration.java
0
1
[ " public String getPeripheralType() {\n", " return \"manaFlower\";\n", " }\n", "\n", " @LuaFunction(mainThread = true)\n", " public final boolean isFloating(GeneratingFlowerBlockEntity blockEntity) {\n", " return blockEntity.isFloating();\n", " }\n", "\n", " @LuaFun...
[ " public final boolean isOnEnchantedSoil(GeneratingFlowerBlockEntity blockEntity) {\n", " return blockEntity.overgrowth;\n" ]
[ " public final boolean isOnEnchantedSoil() {\n", " return blockEntity.overgrowth;\n" ]
[ " public final boolean isOnEnchantedSoil() {\n", " return isOnSpecialSoil();\n", " }\n", "\n", " private boolean isOnSpecialSoil() {\n", " if (blockEntity.isFloating()) {\n", " return false;\n", " } else {\n", " return blockEntity.getLevel().getBlo...
[ " }\n", "\n", " @LuaFunction(mainThread = true)\n", " public final boolean isFull(GeneratingFlowerBlockEntity blockEntity) {\n", " return blockEntity.getMana() >= blockEntity.getMaxMana();\n", " }\n", "\n", " @LuaFunction(mainThread = true)\n", " public final boolean isEmpty...
[ " public final boolean isOnEnchantedSoil(GeneratingFlowerBlockEntity blockEntity) {\n", " return blockEntity.overgrowth;\n" ]
false
56ae5ad384935e04
[ "A1", "A2" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
a921e37426746526ae7cc89622f60e742c7050dc
1de7972c0e3439d3e2401061faea619b792fb27b
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/util/fakeplayer/APFakePlayer.java
1
7
[ " HitResult hit = findHit(true, false);\n", " if (hit.getType() == HitResult.Type.MISS) {\n", " return Pair.of(false, \"Nothing to break\");\n" ]
[ " BlockPos pos = new BlockPos((int) hit.getLocation().x, (int) hit.getLocation().y, (int) hit.getLocation().z);\n" ]
[ " BlockPos pos = new BlockPos(hit.getLocation().x, hit.getLocation().y, hit.getLocation().z);\n" ]
[ " }\n", " BlockPos pos = new BlockPos(hit.getLocation());\n" ]
[ " BlockState state = world.getBlockState(pos);\n", " Block block = state.getBlock();\n", "\n", " ItemStack tool = getInventory().getSelected();\n", " if (tool.isEmpty()) {\n", " return Pair.of(false, \"Cannot dig without tool\");\n" ]
[ " }\n", " BlockPos pos = new BlockPos(hit.getLocation())\n" ]
false
cf14bd6e0870aeeb
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
a921e37426746526ae7cc89622f60e742c7050dc
1de7972c0e3439d3e2401061faea619b792fb27b
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/util/fakeplayer/APFakePlayer.java
3
7
[ " if (ForgeHooks.onInteractEntityAt(this, entity, result.getLocation(), InteractionHand.MAIN_HAND) != null) {\n", " return InteractionResult.FAIL;\n", " }\n", "\n", " return entity.interactAt(this, result.getLocation(), InteractionHand.MAIN_HAND);\n", " }\n", "\n", "...
[ "\n", " if (event.getUseItem() != Event.Result.DENY) {\n", " InteractionResult result = stack.onItemUseFirst(new UseOnContext(level(), this, InteractionHand.MAIN_HAND, stack, blockHit));\n", " if (result != InteractionResult.PASS)\n" ]
[ "\n", " if (event.getUseItem() != Event.Result.DENY) {\n", " InteractionResult result = stack.onItemUseFirst(new UseOnContext(level, this, InteractionHand.MAIN_HAND, stack, blockHit));\n", " if (result != InteractionResult.PASS)\n" ]
[ " }\n", " boolean denied = event.getUseItem() == Event.Result.DENY;\n", " if (!denied) {\n", " InteractionResult result = stack.onItemUseFirst(new UseOnContext(level, this, InteractionHand.MAIN_HAND, stack, blockHit));\n", " if (result != Intera...
[ " return result;\n", " }\n", "\n", " boolean bypass = getMainHandItem().doesSneakBypassUse(level, pos, this);\n", " if (isShiftKeyDown() || bypass || event.getUseBlock() == Event.Result.ALLOW) {\n", " InteractionResult useT...
[ " }\n", " boolean denied = event.getUseItem() == Event.Result.DENY;\n", " if (!denied) {\n", " InteractionResult result = stack.onItemUseFirst(new UseOnContext(this.level(), this, InteractionHand.MAIN_HAND, stack, blockHit));\n", " if (result !=...
false
8f174842836687b8
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
a921e37426746526ae7cc89622f60e742c7050dc
1de7972c0e3439d3e2401061faea619b792fb27b
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/util/fakeplayer/APFakePlayer.java
4
7
[ " return result;\n", " }\n", "\n", " boolean bypass = getMainHandItem().doesSneakBypassUse(level, pos, this);\n", " if (isShiftKeyDown() || bypass || event.getUseBlock() == Event.Result.ALLOW) {\n", " InteractionResult useT...
[ " boolean bypass = getMainHandItem().doesSneakBypassUse(level(), pos, this);\n", " if (getPose() != Pose.CROUCHING || bypass || event.getUseBlock() == Event.Result.ALLOW) {\n", " InteractionResult useType = gameMode.useItemOn(this, level(), stack, InteractionHand.MAIN_HAND, ...
[ " boolean bypass = getMainHandItem().doesSneakBypassUse(level, pos, this);\n", " if (getPose() != Pose.CROUCHING || bypass || event.getUseBlock() == Event.Result.ALLOW) {\n", " InteractionResult useType = gameMode.useItemOn(this, level, stack, InteractionHand.MAIN_HAND, bloc...
[ " if (stack.isEmpty() || getCooldowns().isOnCooldown(stack.getItem())) {\n" ]
[ " return InteractionResult.PASS;\n", " }\n", "\n", "\n", " if (stack.getItem() instanceof BlockItem blockItem) {\n", " Block block = blockItem.getBlock();\n", " if (block instanceof CommandBlock || block instanceof StructureBlock) {\n", ...
[ " if (stack.isEmpty() || getCooldowns().isOnCooldown(stack.getItem())) {\n" ]
false
92d88d264ab65a3f
[ "B1" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
a921e37426746526ae7cc89622f60e742c7050dc
1de7972c0e3439d3e2401061faea619b792fb27b
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/util/fakeplayer/FakePlayerProviderTurtle.java
0
1
[ "\n", "import java.util.WeakHashMap;\n", "import java.util.function.Function;\n", "\n", "public final class FakePlayerProviderTurtle {\n", "\n", " /*\n", " Highly inspired by https://github.com/SquidDev-CC/plethora/blob/minecraft-1.12/src/main/java/org/squiddev/plethora/integration/computercraft...
[ " player.setServerLevel((ServerLevel) turtle.getLevel());\n", " BlockPos position = turtle.getPosition();\n" ]
[ " player.setLevel((ServerLevel) turtle.getLevel());\n", " BlockPos position = turtle.getPosition();\n" ]
[ " player.setLevel((ServerLevel) turtle.getLevel());\n" ]
[ " // Player position\n", " BlockPos position = turtle.getPosition();\n", " player.moveTo(position.getX() + 0.5, position.getY() + 0.5, position.getZ() + 0.5, direction.toYRot(), 0);\n", " // Player inventory\n", " Inventory playerInventory = player.getInventory();\n", " ...
[ " player.setLevel((ServerLevel) turtle.getLevel());\n" ]
false
607f5484df09d542
[ "B1" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
2766015b9b416b6e9672ea9e9db51c0066bfe744
764a54d8251bbdcc0742389852efdd65a94b2d9c
a102aa56049542af3ad22436d82c0cd88577de83
src/main/java/de/srendi/advancedperipherals/common/util/ChunkManager.java
0
1
[ "package de.srendi.advancedperipherals.common.util;\n", "\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n", "import de.srendi.advancedperipherals.common.configuration.APConfig;\n", "import net.minecraft.core.registries.Registries;\n", "import net.minecraft.nbt.CompoundTag;\n", "import n...
[ "import net.neoforged.common.world.ForgeChunkManager;\n", "import net.neoforged.event.TickEvent;\n", "import net.neoforged.event.server.ServerStartedEvent;\n", "import net.neoforged.event.server.ServerStoppingEvent;\n", "import net.neoforged.eventbus.api.SubscribeEvent;\n", "import net.neoforged.fml.commo...
[ "import net.minecraftforge.common.world.ForgeChunkManager;\n", "import net.minecraftforge.event.TickEvent;\n", "import net.minecraftforge.event.server.ServerStartedEvent;\n", "import net.minecraftforge.event.server.ServerStoppingEvent;\n", "import net.minecraftforge.eventbus.api.SubscribeEvent;\n", "impor...
[ "import net.minecraftforge.common.world.ForgeChunkManager;\n", "import net.minecraftforge.event.TickEvent;\n", "import net.minecraftforge.event.server.ServerStartedEvent;\n", "import net.minecraftforge.eventbus.api.SubscribeEvent;\n", "import net.minecraftforge.fml.common.Mod;\n", "import net.minecraftfor...
[ "import org.apache.logging.log4j.Level;\n", "import org.jetbrains.annotations.NotNull;\n", "\n", "import java.time.LocalDateTime;\n", "import java.time.ZoneOffset;\n", "import java.util.*;\n", "\n", "@Mod.EventBusSubscriber(modid = AdvancedPeripherals.MOD_ID)\n", "public class ChunkManager extends S...
[ "import net.neoforged.common.world.ForgeChunkManager;\n", "import net.neoforged.event.TickEvent;\n", "import net.neoforged.event.server.ServerStartedEvent;\n", "import net.neoforged.event.server.ServerStoppingEvent;\n", "import net.neoforged.eventbus.api.SubscribeEvent;\n", "import net.neoforged.fml.commo...
false
b9701388a6e7bc77
[ "A1", "A2", "A3", "A4", "A5", "A6", "A7" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
c9c37aef4e3a06ee194df5b4994390708782f7af
c1c67fba27cdbdc7d1a3041a4d54d212d5cf7476
4ee4f91a8b88d257044c6d04083799f05eea6023
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/RsBridgePeripheral.java
0
2
[ " return MethodResult.of(getNode().isActive());\n", " }\n", "\n", "\n", " @Override\n", " @LuaFunction(mainThread = true)\n", " public final MethodResult listItems() {\n", " if (!isAvailable())\n", " return notConnected();\n", "\n", " return MethodResu...
[ " RefinedStorage.getCraftableItems(getNetwork()).forEach(item -> items.add(RefinedStorage.parseItemStack(item.copy(), getNetwork())));\n" ]
[ " RefinedStorage.getCraftableItems(getNetwork()).forEach(item -> items.add(RefinedStorage.getObjectFromStack(item.copy(), getNetwork())));\n" ]
[ " RefinedStorage.getCraftableItems(getNetwork()).forEach(item -> items.add(RefinedStorage.getObjectFromStack(item, getNetwork())));\n" ]
[ " return MethodResult.of(items);\n", " }\n", "\n", " @Override\n", " @LuaFunction(mainThread = true)\n", " public final MethodResult listCraftableFluids() {\n", " if (!isAvailable())\n", " return notConnected();\n", "\n", " List<Object> fluids = new Arra...
[ " RefinedStorage.getCraftableItems(getNetwork()).forEach(item -> items.add(RefinedStorage.parseItemStack(item, getNetwork())));\n" ]
false
aec2373726af80cf
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
c9c37aef4e3a06ee194df5b4994390708782f7af
c1c67fba27cdbdc7d1a3041a4d54d212d5cf7476
4ee4f91a8b88d257044c6d04083799f05eea6023
src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RefinedStorage.java
0
3
[ "\n", " private static INetworkNode read(CompoundTag tag, NetworkNode node) {\n", " node.read(tag);\n", " return node;\n", " }\n", "\n", " public static ItemStack findStackFromStack(INetwork network, @Nullable ICraftingManager crafting, ItemStack item) {\n", " return find...
[ " for (ItemStack stack : pattern.getOutputs()) {\n", " if (filter.test(stack.copy()))\n" ]
[ " for(ItemStack stack : pattern.getOutputs()) {\n", " if (filter.test(stack.copy()))\n" ]
[ " for(ItemStack stack : pattern.getOutputs()) {\n", " if (filter.test(stack))\n" ]
[ " return stack.copy();\n", " }\n", " }\n", "\n", " return ItemStack.EMPTY;\n", " }\n", "\n", " public static FluidStack findFluidFromStack(INetwork network, @Nullable ICraftingManager crafting, FluidStack stack) {\n", " return findFluidFromFil...
[ " for (ItemStack stack : pattern.getOutputs()) {\n", " if (filter.test(stack))\n" ]
false
5e407c8ab5993374
[ "A1", "B2" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
c9c37aef4e3a06ee194df5b4994390708782f7af
c1c67fba27cdbdc7d1a3041a4d54d212d5cf7476
4ee4f91a8b88d257044c6d04083799f05eea6023
src/main/java/de/srendi/advancedperipherals/common/util/inventory/FluidFilter.java
0
1
[ "\n", " public FluidFilter setCount(int count) {\n", " this.count = count;\n", " return this;\n", " }\n", "\n", " @Override\n", " public boolean testAE(GenericStack genericStack) {\n", " if (genericStack.what() instanceof AEFluidKey aeFluidKey) {\n", " r...
[ " // If the filter does not have nbt values, a tag or a fingerprint, just test if the items are the same\n", " if (fluid != Fluids.EMPTY) {\n", " if (tag == null && nbt == null)\n", " return stack.getFluid().isSame(fluid);\n" ]
[ " // If the filter does not have nbt values, a tag or a fingerprint, just test if the items are the same\n", " if (fluid != Fluids.EMPTY) {\n", " if (tag == null && nbt == null && fingerprint.isEmpty())\n", " return stack.getFluid().isSame(fluid);\n" ]
[ " if (fluid != Fluids.EMPTY && !stack.getFluid().isSame(fluid)) {\n", " return false;\n" ]
[ " }\n", " if (tag != null && !stack.getFluid().is(tag)) {\n", " return false;\n", " }\n", " if (nbt != null && !stack.getOrCreateTag().equals(nbt)) {\n", " return false;\n", " }\n", " return true;\n", " }\n", "\n", " public in...
[ " if (fluid != Fluids.EMPTY && !stack.getFluid().isSame(fluid)) {\n", " return false;\n" ]
false
f90f78cd2d242790
[ "B1", "B2" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
c9c37aef4e3a06ee194df5b4994390708782f7af
c1c67fba27cdbdc7d1a3041a4d54d212d5cf7476
4ee4f91a8b88d257044c6d04083799f05eea6023
src/main/java/de/srendi/advancedperipherals/common/village/VillagerTrades.java
0
2
[ "package de.srendi.advancedperipherals.common.village;\n", "\n", "import dan200.computercraft.shared.Registry;\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.APBlocks;\n", "import de.srendi.advancedperipherals.common.setup.APItems;\n", "import de.srendi.advancedperipherals.common.setup.APVillagers;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Blocks;\n" ]
[ "import de.srendi.advancedperipherals.common.configuration.APConfig;\n", "import de.srendi.advancedperipherals.common.setup.Blocks;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.CCRegistration;\n", "import de.srendi.advancedperipherals.common.util.inventory.ItemUtil;\n", "import net.minecraftforge.event.village.VillagerTradesEvent;\n", "import net.minecraftforge.event.village.WandererTradesEvent;\n", "import net.minecraftforge.even...
[ "import de.srendi.advancedperipherals.common.configuration.APConfig;\n", "import de.srendi.advancedperipherals.common.setup.APBlocks;\n", "import de.srendi.advancedperipherals.common.setup.APItems;\n", "import de.srendi.advancedperipherals.common.setup.APVillagers;\n" ]
false
6b70ffcb7568ec60
[ "B1", "A1", "A2", "A3" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
c9c37aef4e3a06ee194df5b4994390708782f7af
c1c67fba27cdbdc7d1a3041a4d54d212d5cf7476
4ee4f91a8b88d257044c6d04083799f05eea6023
src/main/java/de/srendi/advancedperipherals/common/village/VillagerTrades.java
1
2
[ "import de.srendi.advancedperipherals.common.setup.CCRegistration;\n", "import de.srendi.advancedperipherals.common.util.inventory.ItemUtil;\n", "import net.minecraftforge.event.village.VillagerTradesEvent;\n", "import net.minecraftforge.event.village.WandererTradesEvent;\n", "import net.minecraftforge.even...
[ " TradeBuilder.createTrade(event, APBlocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createTrade(event, Registry.ModBlocks.TURTLE_ADVANCED.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 2...
[ " TradeBuilder.createTrade(event, Blocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createTrade(event, Registry.ModBlocks.TURTLE_ADVANCED.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 2, ...
[ " if (APConfig.WORLD_CONFIG.enableWanderingTraderTrades.get()) {\n", " TradeBuilder.createTrade(event, Blocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createT...
[ " }\n", "\n", " @SubscribeEvent\n", " public static void registerVillagerTrades(VillagerTradesEvent event) {\n", " if (event.getType() == APVillagers.COMPUTER_SCIENTIST.get()) {\n", "\n", " TradeBuilder.createTrade(event, APBlocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.IT...
[ " if (APConfig.WORLD_CONFIG.enableWanderingTraderTrades.get()) {\n", " TradeBuilder.createTrade(event, APBlocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.creat...
false
d627d047d8900c6b
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
a926f34d6dbfdfcef33e7626ac13b6f133f04044
df0a6468924864903c30203aec49033c5876778e
936ca4ed48ca39a76ba016a0149ab12adac7838b
src/main/java/de/srendi/advancedperipherals/AdvancedPeripherals.java
0
1
[ "import net.minecraftforge.common.MinecraftForge;\n", "import net.minecraftforge.eventbus.api.IEventBus;\n", "import net.minecraftforge.fml.ModLoadingContext;\n", "import net.minecraftforge.fml.common.Mod;\n", "import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;\n", "import net.minecraftfor...
[ " public static final APAddons addons = new APAddons();\n" ]
[ " public static final APAddons addons = new APAddons();\n", " public static final CreativeModeTab TAB = new CreativeModeTab(\"advancedperipheralstab\") {\n", "\n", " @Override\n", " @NotNull\n", " public ItemStack makeIcon() {\n", " return new ItemStack(Blocks.CHAT_...
[ " public static final APAddons ADDONS = new APAddons();\n", " public static final CreativeModeTab TAB = new CreativeModeTab(\"advancedperipheralstab\") {\n", "\n", " @Override\n", " @NotNull\n", " public ItemStack makeIcon() {\n", " return new ItemStack(Blocks.CHAT_...
[ "\n", " public AdvancedPeripherals() {\n", " LOGGER.info(\"AdvancedPeripherals says hello!\");\n", " IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus();\n", "\n", " APConfig.register(ModLoadingContext.get());\n", "\n", " modBus.addListener(this::commonSet...
[ " public static final APAddons ADDONS = new APAddons();\n" ]
false
f1ab641d724d53d1
[ "B1" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
a926f34d6dbfdfcef33e7626ac13b6f133f04044
df0a6468924864903c30203aec49033c5876778e
936ca4ed48ca39a76ba016a0149ab12adac7838b
src/main/java/de/srendi/advancedperipherals/common/blocks/base/BaseBlockEntityBlock.java
0
1
[ "package de.srendi.advancedperipherals.common.blocks.base;\n", "\n", "import de.srendi.advancedperipherals.lib.peripherals.IPeripheralTileEntity;\n", "import net.minecraft.core.BlockPos;\n", "import net.minecraft.server.level.ServerPlayer;\n", "import net.minecraft.tags.BlockTags;\n" ]
[ "import net.minecraft.tags.TagKey;\n", "import net.minecraft.world.Container;\n", "import net.minecraft.world.Containers;\n", "import net.minecraft.world.InteractionHand;\n", "import net.minecraft.world.InteractionResult;\n", "import net.minecraft.world.MenuProvider;\n" ]
[ "import net.minecraft.tags.TagKey;\n", "import net.minecraft.world.*;\n" ]
[ "import net.minecraft.world.*;\n" ]
[ "import net.minecraft.world.entity.LivingEntity;\n", "import net.minecraft.world.entity.player.Player;\n", "import net.minecraft.world.item.ItemStack;\n", "import net.minecraft.world.level.Level;\n", "import net.minecraft.world.level.block.EntityBlock;\n", "import net.minecraft.world.level.block.RenderSha...
[ "import net.minecraft.world.Container;\n", "import net.minecraft.world.Containers;\n", "import net.minecraft.world.InteractionHand;\n", "import net.minecraft.world.InteractionResult;\n", "import net.minecraft.world.MenuProvider;\n" ]
false
3c2af627ccf8620e
[ "A2", "A3", "A4", "A5", "A6" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
a926f34d6dbfdfcef33e7626ac13b6f133f04044
df0a6468924864903c30203aec49033c5876778e
936ca4ed48ca39a76ba016a0149ab12adac7838b
src/main/java/de/srendi/advancedperipherals/common/data/BlockTagsProvider.java
0
1
[ "package de.srendi.advancedperipherals.common.data;\n", "\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n" ]
[ "import de.srendi.advancedperipherals.common.blocks.base.IHarvesterBlock;\n", "import net.minecraft.core.HolderLookup;\n", "import net.minecraft.data.PackOutput;\n" ]
[ "import de.srendi.advancedperipherals.common.blocks.base.IHarvesterBlock;\n", "import net.minecraft.core.Registry;\n", "import net.minecraft.data.DataGenerator;\n" ]
[ "import de.srendi.advancedperipherals.common.blocks.base.IHarvestableBlock;\n", "import net.minecraft.core.Registry;\n", "import net.minecraft.data.DataGenerator;\n" ]
[ "import net.minecraft.data.tags.TagsProvider;\n", "import net.minecraft.resources.ResourceLocation;\n", "import net.minecraft.world.level.block.Block;\n", "import net.minecraftforge.common.data.ExistingFileHelper;\n", "import net.minecraftforge.registries.DeferredRegister;\n", "import net.minecraftforge.r...
[ "import de.srendi.advancedperipherals.common.blocks.base.IHarvestableBlock;\n", "import net.minecraft.core.HolderLookup;\n", "import net.minecraft.data.PackOutput;\n" ]
false
5930ef5eb29f825e
[ "B1", "A2", "A3" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
3a51419e12d6bc4fb2c3d922053e8faba28d5892
2b8c5f242629234e6d8474db9f9f19ac33874538
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/ChatBoxPeripheral.java
0
4
[ " if (component == null) {\n", " return MethodResult.of(null, \"illegal message\");\n", " }\n", "\n", " if (checkBrackets(arguments.optString(2))) {\n", " return MethodResult.of(null, \"incorrect bracket string (e.g. [], {}, <>, ...)\");\n", ...
[ " }\n", " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange)) {\n" ]
[ " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n" ]
[ " if (CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n" ]
[ " player.sendSystemMessage(preparedMessage);\n", " }\n", " }\n", " return MethodResult.of(true);\n", " });\n", " }\n", "\n", " @LuaFunction(mainThread = true)\n", " public final MethodResult sendMessage(@NotNull IArguments argum...
[ " }\n", " if (CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange)) {\n" ]
false
9a6c3956d09e9cb4
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
3a51419e12d6bc4fb2c3d922053e8faba28d5892
2b8c5f242629234e6d8474db9f9f19ac33874538
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/ChatBoxPeripheral.java
1
4
[ " String message = arguments.getString(0);\n", " int maxRange = APConfig.PERIPHERALS_CONFIG.chatBoxMaxRange.get();\n", " int range = arguments.optInt(4, -1);\n", " ResourceKey<Level> dimension = getLevel().dimension();\n", " if (checkBrackets(arguments....
[ " }\n", " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange)) {\n" ]
[ " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n" ]
[ " if (CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n" ]
[ " player.sendSystemMessage(preparedMessage);\n", " }\n", " }\n", " return MethodResult.of(true);\n", " });\n", " }\n", "\n", " @LuaFunction(mainThread = true)\n", " public final MethodResult sendFormattedMessageToPlayer(@NotNull...
[ " }\n", " if (CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange)) {\n" ]
false
39a989f2a3dd2ac8
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
3a51419e12d6bc4fb2c3d922053e8faba28d5892
2b8c5f242629234e6d8474db9f9f19ac33874538
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/ChatBoxPeripheral.java
2
4
[ " return MethodResult.of(null, \"illegal message\");\n", " }\n", "\n", " if (checkBrackets(arguments.optString(3))) {\n", " return MethodResult.of(null, \"incorrect bracket string (e.g. [], {}, <>, ...)\");\n", " }\n", "\n", " M...
[ " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange)) {\n" ]
[ " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n" ]
[ " if (CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n" ]
[ " player.sendSystemMessage(preparedMessage);\n", " }\n", " return MethodResult.of(true);\n", " });\n", " }\n", "\n", "\n", " @LuaFunction(mainThread = true)\n", " public final MethodResult sendFormattedToastToPlayer(@NotNull IArguments arguments) ...
[ " if (CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange)) {\n" ]
false
dfdcdd3e95b41471
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
3a51419e12d6bc4fb2c3d922053e8faba28d5892
2b8c5f242629234e6d8474db9f9f19ac33874538
356a814fa851b99328015c717f5350bef62b1126
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/ChatBoxPeripheral.java
3
4
[ " return MethodResult.of(null, \"incorrect player name/uuid\");\n", " }\n", "\n", " if (checkBrackets(arguments.optString(3))) {\n", " return MethodResult.of(null, \"incorrect bracket string (e.g. [], {}, <>, ...)\");\n", " }\n", "\n", " ...
[ " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange)) {\n" ]
[ " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n" ]
[ " if (CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n" ]
[ " player.sendSystemMessage(preparedMessage, false);\n", " }\n", " return MethodResult.of(true);\n", " });\n", " }\n", "\n", " @LuaFunction(mainThread = true)\n", " public final MethodResult sendToastToPlayer(@NotNull IArguments arguments) throws Lua...
[ " if (CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange)) {\n" ]
false
df082b179f3d9a91
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
02a0732c4efb28fe1a4c766d6d74542712bccd97
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
630d9b746f80368d3ccfed73514348edd2d214f4
src/main/java/de/srendi/advancedperipherals/AdvancedPeripherals.java
0
1
[ "package de.srendi.advancedperipherals;\n", "\n", "import de.srendi.advancedperipherals.common.addons.APAddons;\n", "import de.srendi.advancedperipherals.common.configuration.APConfig;\n" ]
[ "import de.srendi.advancedperipherals.common.network.PacketHandler;\n", "import de.srendi.advancedperipherals.common.setup.APRegistration;\n", "import de.srendi.advancedperipherals.common.village.VillageStructures;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Registration;\n", "import de.srendi.advancedperipherals.common.village.VillageStructures;\n", "import de.srendi.advancedperipherals.network.MNetwork;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Registration;\n", "import de.srendi.advancedperipherals.network.MNetwork;\n" ]
[ "import net.minecraft.resources.ResourceLocation;\n", "import net.minecraftforge.common.MinecraftForge;\n", "import net.minecraftforge.eventbus.api.IEventBus;\n", "import net.minecraftforge.fml.ModLoadingContext;\n", "import net.minecraftforge.fml.common.Mod;\n", "import net.minecraftforge.fml.event.lifec...
[ "import de.srendi.advancedperipherals.common.network.PacketHandler;\n", "import de.srendi.advancedperipherals.common.setup.APRegistration;\n", "import de.srendi.advancedperipherals.common.village.VillageStructures;\n" ]
false
f324b1cb1671f34a
[ "A1", "A2", "A3" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
02a0732c4efb28fe1a4c766d6d74542712bccd97
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
630d9b746f80368d3ccfed73514348edd2d214f4
src/main/java/de/srendi/advancedperipherals/common/data/RecipesProvider.java
1
5
[ "import dan200.computercraft.shared.ModRegistry;\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.APBlocks;\n", "import de.srendi.advancedperipherals.common.setup.APItems;\n", "import de.srendi.advancedperipherals.common.util.RawValue;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Blocks;\n", "import de.srendi.advancedperipherals.common.util.RawValue;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Blocks;\n" ]
[ "import net.minecraft.data.PackOutput;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.APBlocks;\n", "import de.srendi.advancedperipherals.common.setup.APItems;\n", "import de.srendi.advancedperipherals.common.util.RawValue;\n" ]
false
39e8d834236c979c
[ "A1", "A2", "A3" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
02a0732c4efb28fe1a4c766d6d74542712bccd97
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
630d9b746f80368d3ccfed73514348edd2d214f4
src/main/java/de/srendi/advancedperipherals/common/data/RecipesProvider.java
2
5
[ "import net.minecraft.data.PackOutput;\n" ]
[ "import net.minecraft.data.recipes.FinishedRecipe;\n", "import net.minecraft.data.recipes.RecipeCategory;\n", "import net.minecraft.data.recipes.RecipeProvider;\n", "import net.minecraft.data.recipes.ShapedRecipeBuilder;\n", "import net.minecraft.data.recipes.ShapelessRecipeBuilder;\n", "import net.minecr...
[ "import net.minecraft.data.recipes.FinishedRecipe;\n", "import net.minecraft.data.recipes.RecipeCategory;\n", "import net.minecraft.data.recipes.RecipeProvider;\n", "import net.minecraft.data.recipes.ShapedRecipeBuilder;\n", "import net.minecraft.data.recipes.ShapelessRecipeBuilder;\n" ]
[ "import net.minecraft.data.recipes.*;\n" ]
[ "import net.minecraft.resources.ResourceLocation;\n", "import net.minecraft.tags.ItemTags;\n", "import net.minecraft.world.item.ItemStack;\n", "import net.minecraft.world.item.Items;\n", "import net.minecraft.world.item.alchemy.PotionUtils;\n", "import net.minecraft.world.item.alchemy.Potions;\n", "impo...
[ "import net.minecraft.data.recipes.FinishedRecipe;\n", "import net.minecraft.data.recipes.RecipeCategory;\n", "import net.minecraft.data.recipes.RecipeProvider;\n", "import net.minecraft.data.recipes.ShapedRecipeBuilder;\n", "import net.minecraft.data.recipes.ShapelessRecipeBuilder;\n", "import net.minecr...
false
d25fc2014d647a41
[ "A1", "A2", "A3", "A4", "A5", "A6" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
02a0732c4efb28fe1a4c766d6d74542712bccd97
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
630d9b746f80368d3ccfed73514348edd2d214f4
src/main/java/de/srendi/advancedperipherals/common/data/RecipesProvider.java
3
5
[ " ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, APBlocks.PERIPHERAL_CASING.get())\n", " .define('I', Tags.Items.INGOTS_IRON)\n", " .define('i', Items.IRON_BARS)\n", " .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)\n", " .pattern(\"Ii...
[ " ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, APBlocks.REDSTONE_INTEGRATOR.get())\n", " .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)\n", " .define('A', CASING)\n", " .define('C', Items.COMPARATOR)\n", " .pattern(\"RCR\")\n", " ...
[ " ConditionalRecipe.builder().addCondition(modLoaded(\"minecolonies\")).addRecipe(ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.COLONY_INTEGRATOR.get()).define('O', ItemTags.LOGS).define('A', CASING).define('R', Ingredient.fromValues(Stream.of(new RawValue(new ResourceLocation(\"minecolonies\", ...
[ " //ConditionalRecipe.builder().addCondition(modLoaded(\"minecolonies\")).addRecipe(ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.COLONY_INTEGRATOR.get()).define('O', ItemTags.LOGS).define('A', CASING).define('R', Ingredient.fromValues(Stream.of(new RawValue(new ResourceLocation(\"minecolonies\"...
[ "\n", " ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, APBlocks.BLOCK_READER.get())\n", " .define('O', Items.OBSERVER)\n", " .define('I', Tags.Items.INGOTS_IRON)\n", " .define('M', ModRegistry.Blocks.WIRED_MODEM_FULL.get())\n", " .def...
[ " ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, APBlocks.REDSTONE_INTEGRATOR.get())\n", " .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)\n", " .define('A', CASING)\n", " .define('C', Items.COMPARATOR)\n", " .pattern(\"RCR\")\n", " ...
false
e638b62b69e1a8f5
[ "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
02a0732c4efb28fe1a4c766d6d74542712bccd97
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
630d9b746f80368d3ccfed73514348edd2d214f4
src/main/java/de/srendi/advancedperipherals/common/data/RecipesProvider.java
4
5
[ "\n", " ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, APBlocks.BLOCK_READER.get())\n", " .define('O', Items.OBSERVER)\n", " .define('I', Tags.Items.INGOTS_IRON)\n", " .define('M', ModRegistry.Blocks.WIRED_MODEM_FULL.get())\n", " .def...
[ " ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, APBlocks.GEO_SCANNER.get())\n", " .define('O', Items.OBSERVER)\n", " .define('D', Tags.Items.GEMS_DIAMOND)\n", " .define('C', CASING)\n", " .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE...
[ " ConditionalRecipe.builder().addCondition(modLoaded(\"refinedstorage\")).addRecipe(ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.RS_BRIDGE.get()).define('Q', RSItems.QUARTZ_ENRICHED_IRON.get()).define('A', CASING).define('I', RSBlocks.INTERFACE.get()).pattern(\"QIQ\").pattern(\"IAI\").pattern(\...
[ " //ConditionalRecipe.builder().addCondition(modLoaded(\"refinedstorage\")).addRecipe(ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.RS_BRIDGE.get()).define('Q', RSItems.QUARTZ_ENRICHED_IRON.get()).define('A', CASING).define('I', RSBlocks.INTERFACE.get()).pattern(\"QIQ\").pattern(\"IAI\").pattern...
[ "\n", " ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, APBlocks.NBT_STORAGE.get())\n", " .define('C', Tags.Items.CHESTS)\n", " .define('A', CASING)\n", " .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)\n", " .define('I', Tags.Items.I...
[ " ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, APBlocks.GEO_SCANNER.get())\n", " .define('O', Items.OBSERVER)\n", " .define('D', Tags.Items.GEMS_DIAMOND)\n", " .define('C', CASING)\n", " .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE...
false
0e7b2243770a6d34
[ "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10", "A11" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
f4ba1da2a75c8273f7048f6e92754d1c07020fa9
c1c97b3033e592cd8e518eff4e928c95a1c3ab4d
ad6863348b974e68118df60920d1b5f4c7f279a8
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/ChatBoxPeripheral.java
0
2
[ " @LuaFunction(mainThread = true)\n", " public final MethodResult sendFormattedMessageToPlayer(@NotNull IArguments arguments) throws LuaException {\n", " return withChatOperation(ignored -> {\n", " String message = arguments.getString(0);\n", " String playerName = argument...
[ " MutableComponent preparedMessage = appendPrefix(arguments.optString(2, APConfig.PERIPHERALS_CONFIG.defaultChatBoxPrefix.get()), arguments.optString(3, \"[]\"), arguments.optString(4, \"\")).append(component);\n", " if (!APConfig.PERIPHERALS_CONFIG.chatBoxMultiDimensional.get() && player.le...
[ " MutableComponent preparedMessage = appendPrefix(arguments.optString(2, APConfig.PERIPHERALS_CONFIG.defaultChatBoxPrefix.get()), arguments.optString(3, \"[]\"), arguments.optString(4, \"\")).append(component);\n", " if (!APConfig.PERIPHERALS_CONFIG.chatBoxMultiDimensional.get() && player.ge...
[ " MutableComponent preparedMessage = appendPrefix(\n", " arguments.optString(2, APConfig.PERIPHERALS_CONFIG.defaultChatBoxPrefix.get()),\n", " arguments.optString(3, \"[]\"),\n", " arguments.optString(4, \"\").replaceAll(\"&\", \"\\u00a7\")\n", " ...
[ " return MethodResult.of(false, \"NOT_SAME_DIMENSION\");\n", "\n", " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n", " player.sendSystemMessage(preparedMessage);\n", " return MethodResult.of(true);\n", " ...
[ " MutableComponent preparedMessage = appendPrefix(\n", " arguments.optString(2, APConfig.PERIPHERALS_CONFIG.defaultChatBoxPrefix.get()),\n", " arguments.optString(3, \"[]\"),\n", " arguments.optString(4, \"\").replaceAll(\"&\", \"\\u00a7\")\n", " ...
false
3e9a8a6d96d192e4
[ "B1", "B2", "B3", "B4", "B5", "A2" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
f4ba1da2a75c8273f7048f6e92754d1c07020fa9
c1c97b3033e592cd8e518eff4e928c95a1c3ab4d
ad6863348b974e68118df60920d1b5f4c7f279a8
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/ChatBoxPeripheral.java
1
2
[ " return MethodResult.of(true);\n", " });\n", " }\n", "\n", " @LuaFunction(mainThread = true)\n", " public final MethodResult sendMessageToPlayer(@NotNull IArguments arguments) throws LuaException {\n", " return withChatOperation(ignored -> {\n", " String m...
[ " MutableComponent preparedMessage = appendPrefix(arguments.optString(2, APConfig.PERIPHERALS_CONFIG.defaultChatBoxPrefix.get()), arguments.optString(3, \"[]\"), arguments.optString(4, \"\")).append(message);\n", " if (!APConfig.PERIPHERALS_CONFIG.chatBoxMultiDimensional.get() && player.leve...
[ " MutableComponent preparedMessage = appendPrefix(arguments.optString(2, APConfig.PERIPHERALS_CONFIG.defaultChatBoxPrefix.get()), arguments.optString(3, \"[]\"), arguments.optString(4, \"\")).append(message);\n", " if (!APConfig.PERIPHERALS_CONFIG.chatBoxMultiDimensional.get() && player.getL...
[ " MutableComponent preparedMessage = appendPrefix(\n", " arguments.optString(2, APConfig.PERIPHERALS_CONFIG.defaultChatBoxPrefix.get()),\n", " arguments.optString(3, \"[]\"),\n", " arguments.optString(4, \"\").replaceAll(\"&\", \"\\u00a7\")\n", " ...
[ " return MethodResult.of(false, \"NOT_SAME_DIMENSION\");\n", "\n", " if (range == -1 || CoordUtil.isInRange(getPos(), getLevel(), player, range, maxRange))\n", " player.sendSystemMessage(preparedMessage, false);\n", " return MethodResult.of(true);\n", " ...
[ " MutableComponent preparedMessage = appendPrefix(\n", " arguments.optString(2, APConfig.PERIPHERALS_CONFIG.defaultChatBoxPrefix.get()),\n", " arguments.optString(3, \"[]\"),\n", " arguments.optString(4, \"\").replaceAll(\"&\", \"\\u00a7\")\n", " ...
false
c4128257f92187fc
[ "B1", "B2", "B3", "B4", "B5", "A2" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
d07cc596b0a76963bc3e497642ea1f3bec5d929f
d573d1217c2bbc259d9b3afd318dca6618c87ef9
src/main/java/de/srendi/advancedperipherals/APCreativeTab.java
1
2
[ "import net.minecraft.world.item.CreativeModeTab;\n", "import net.minecraft.world.item.ItemStack;\n", "import net.minecraftforge.event.CreativeModeTabEvent;\n", "import net.minecraftforge.eventbus.api.SubscribeEvent;\n", "import net.minecraftforge.fml.common.Mod;\n", "import net.minecraftforge.registries....
[ " APRegistration.ITEMS.getEntries().stream().map(RegistryObject::get).forEach(out::accept);\n" ]
[ " Registration.ITEMS.getEntries().stream().map(RegistryObject::get).forEach(out::accept);\n" ]
[ " Registration.ITEMS.getEntries().stream().map(RegistryObject::get).forEach(out::accept);\n", " out.acceptAll(pocketUpgrade(CCRegistration.ID.COLONY_POCKET));\n", " out.acceptAll(pocketUpgrade(CCRegistration.ID.CHATTY_POCKET));\n", " out.acceptAll(pocketUpgrade(CCRe...
[ " });\n", " builder.icon(() -> new ItemStack(APBlocks.CHAT_BOX.get()));\n", " builder.title(Component.translatable(\"advancedperipherals.name\"));\n", " }\n", "\n", " private static Collection<ItemStack> pocketUpgrade(ResourceLocation pocketId) {\n", " return Set.of(Ite...
[ " APRegistration.ITEMS.getEntries().stream().map(RegistryObject::get).forEach(out::accept);\n", " out.acceptAll(pocketUpgrade(CCRegistration.ID.COLONY_POCKET));\n", " out.acceptAll(pocketUpgrade(CCRegistration.ID.CHATTY_POCKET));\n", " out.acceptAll(pocketUpgrade(CC...
false
9db8b72fe1d1e201
[ "A1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "B9", "B10", "B11", "B12", "B13", "B14", "B15", "B16", "B17", "B18", "B19", "B20", "B21" ]
mix of lines
{ "test_file": false, "benchmark_size": false, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
d07cc596b0a76963bc3e497642ea1f3bec5d929f
d573d1217c2bbc259d9b3afd318dca6618c87ef9
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MeBridgePeripheral.java
2
19
[ " return APConfig.PERIPHERALS_CONFIG.enableMEBridge.get();\n", " }\n", "\n", " private ICraftingService getCraftingService() {\n", " return node.getGrid().getCraftingService();\n", " }\n", "\n", " private boolean canRun() {\n", " return node.isActive();\n", " }\...
[ " ItemStack stack = ItemUtil.getItemStack(arguments.getTable(0), monitor);\n", " if (stack.isEmpty())\n", " return MethodResult.of(0, \"Could not find item\");\n", " AEItemKey targetStack = AEItemKey.of(stack);\n" ]
[ " ItemStack stack = ItemUtil.getItemStack(arguments.getTable(0), monitor);\n", " AEItemKey targetStack = AEItemKey.of(stack);\n", " if (targetStack == null) throw new LuaException(\"Illegal AE2 state ...\");\n" ]
[ " MeItemHandler itemHandler = new MeItemHandler(monitor, tile);\n", " Pair<ItemFilter, String> filter = ItemFilter.parse(arguments.getTable(0));\n" ]
[ "\n" ]
[ " MeItemHandler itemHandler = new MeItemHandler(monitor, tile);\n", " Pair<ItemFilter, String> filter = ItemFilter.parse(arguments.getTable(0));\n" ]
false
c5d536b37a3cd042
[ "B1", "B2" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
d07cc596b0a76963bc3e497642ea1f3bec5d929f
d573d1217c2bbc259d9b3afd318dca6618c87ef9
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MeBridgePeripheral.java
8
19
[ "\n" ]
[ " if (stack.getCount() == 0)\n", " return MethodResult.of(0);\n" ]
[ " if (aeStack == null) throw new LuaException(\"Illegal AE2 state ...\");\n", "\n", " if (stack.getCount() == 0) return 0;\n" ]
[ " if(filter.rightPresent())\n", " return MethodResult.of(0, filter.getRight());\n", "\n", " return MethodResult.of(InventoryUtil.moveItem(targetInventory, itemHandler, filter.getLeft()), null);\n", " }\n" ]
[ "\n", " /**\n", " * imports a fluid to the system from a valid tank\n", " *\n", " * @param arguments the arguments given by the computer\n", " * @param targetTank the give tank\n", " * @return the imported amount or null with a string if something went wrong\n", " */\n", "...
[ " return MethodResult.of(InventoryUtil.moveItem(targetInventory, itemHandler, filter.getLeft()), null);\n", " }\n" ]
false
2e0e9d4a2025a102
[ "B4", "B5" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
d07cc596b0a76963bc3e497642ea1f3bec5d929f
d573d1217c2bbc259d9b3afd318dca6618c87ef9
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/RsBridgePeripheral.java
1
20
[ "import de.srendi.advancedperipherals.common.addons.computercraft.owner.BlockEntityPeripheralOwner;\n", "import de.srendi.advancedperipherals.common.addons.refinedstorage.RefinedStorage;\n", "import de.srendi.advancedperipherals.common.addons.refinedstorage.RefinedStorageNode;\n", "import de.srendi.advancedpe...
[ "import net.minecraft.world.level.block.entity.BlockEntity;\n", "import net.minecraftforge.common.capabilities.ForgeCapabilities;\n" ]
[ "import net.minecraft.world.level.block.entity.BlockEntity;\n" ]
[]
[ "import net.minecraftforge.fluids.FluidStack;\n" ]
[]
false
b0bde63396c066f1
[]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
09772d07cac938cab7ec8d1847cfb7da6bf2afaa
d07cc596b0a76963bc3e497642ea1f3bec5d929f
d573d1217c2bbc259d9b3afd318dca6618c87ef9
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/RsBridgePeripheral.java
6
20
[ " List<Object> items = new ArrayList<>();\n", " RefinedStorage.getCraftableItems(getNetwork()).forEach(item -> items.add(RefinedStorage.getObjectFromStack(item, getNetwork())));\n", " return MethodResult.of(items);\n", " }\n", "\n" ]
[ " @Override\n", " public final MethodResult listCraftableFluids() {\n", " if (!canRun())\n", " return MethodResult.of(null, \"System not connected or offline\");\n" ]
[ " @LuaFunction(mainThread = true)\n", " public final Object listCraftableFluids() {\n", " if (!isConnected())\n", " return null;\n" ]
[ " @LuaFunction(mainThread = true)\n", " public final Object listCraftableFluids() {\n", " if (!isConnected())\n", " return notConnected();\n", "\n" ]
[ " List<Object> fluids = new ArrayList<>();\n", " RefinedStorage.getCraftableFluids(getNetwork()).forEach(fluid -> fluids.add(RefinedStorage.getObjectFromFluid(fluid, getNetwork())));\n", " return MethodResult.of(fluids);\n", " }\n", "\n" ]
[ " @LuaFunction(mainThread = true)\n", " public final Object listCraftableFluids() {\n", " if (!isConnected())\n", " return notConnected();\n", "\n" ]
false
1b4468709e8c8d53
[ "B1", "B2", "B3", "B4", "B5" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
0421601825a983cbbe7c9b9086076216e4be4abd
dc08070075d49e3c73ea4a7f20a97bf33cef6070
fae581e8a058d59aebdb46446bea43f867423763
src/main/java/de/srendi/advancedperipherals/common/configuration/AdvancedPeripheralsConfig.java
0
2
[ " final ForgeConfigSpec.IntValue ENERGY_DETECTOR_MAX_FLOW;\n", " final ForgeConfigSpec.IntValue GEO_SCANNER_MAX_FREE_RADIUS;\n", " final ForgeConfigSpec.IntValue GEO_SCANNER_MAX_COST_RADIUS;\n", " final ForgeConfigSpec.IntValue GEO_SCANNER_ADDITIONAL_BLOCK_COST;\n", " fina...
[ " final ForgeConfigSpec.BooleanValue ENABLE_GEO_SCANNER;\n" ]
[]
[ " final ForgeConfigSpec.BooleanValue ENABLE_COLONY_INTEGRATOR;\n" ]
[ "\n", " //World Features\n", " final ForgeConfigSpec.BooleanValue ENABLE_VILLAGER_STRUCTURES;\n", "\n", " CommonConfig(final ForgeConfigSpec.Builder builder) {\n", " builder.comment(\"\").push(\"Restrictions\");\n", "\n", " CHAT_BOX_COOLDOWN = builder.comment...
[ " final ForgeConfigSpec.BooleanValue ENABLE_GEO_SCANNER;\n", " final ForgeConfigSpec.BooleanValue ENABLE_COLONY_INTEGRATOR;\n" ]
false
3888253453213c3f
[ "A1", "B1" ]
A then B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
0421601825a983cbbe7c9b9086076216e4be4abd
dc08070075d49e3c73ea4a7f20a97bf33cef6070
fae581e8a058d59aebdb46446bea43f867423763
src/main/java/de/srendi/advancedperipherals/common/configuration/AdvancedPeripheralsConfig.java
1
2
[ " GEO_SCANNER_ADDITIONAL_BLOCK_COST = builder.comment(\"Defines block cost in RF for any extra block out of cost-free radius\").defineInRange(\"geoScannerAdditionalBlockCost\", 100, 100, Integer.MAX_VALUE);\n", " GEO_SCANNER_MAX_ENERGY_STORAGE = builder.comment(\"Defines max energy stored in...
[ " ENABLE_GEO_SCANNER = builder.comment(\"Enable the geo scanner or not.\").define(\"enableGeoScanner\", true);\n" ]
[]
[ " ENABLE_COLONY_INTEGRATOR = builder.comment(\"Enable the colony integrator or not.\").define(\"enableColonyIntegrator\", true);\n" ]
[ "\n", " ENABLE_VILLAGER_STRUCTURES = builder.comment(\"Enable the villager structures for the computer scientist.\").define(\"enableVillagerStructures\", true);\n", " builder.pop();\n", " }\n", " }\n", "}" ]
[ " ENABLE_GEO_SCANNER = builder.comment(\"Enable the geo scanner or not.\").define(\"enableGeoScanner\", true);\n", " ENABLE_COLONY_INTEGRATOR = builder.comment(\"Enable the colony integrator or not.\").define(\"enableColonyIntegrator\", true);\n" ]
false
32237f09994de79d
[ "A1", "B1" ]
A then B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
0421601825a983cbbe7c9b9086076216e4be4abd
dc08070075d49e3c73ea4a7f20a97bf33cef6070
fae581e8a058d59aebdb46446bea43f867423763
src/main/java/de/srendi/advancedperipherals/common/configuration/ConfigHandler.java
0
1
[ " AdvancedPeripheralsConfig.energyDetectorMaxFlow = ConfigHolder.COMMON_CONFIG.ENERGY_DETECTOR_MAX_FLOW.get();\n", " AdvancedPeripheralsConfig.geoScannerMaxFreeRadius = ConfigHolder.COMMON_CONFIG.GEO_SCANNER_MAX_FREE_RADIUS.get();\n", " AdvancedPeripheralsConfig.geoScannerMaxCostRadius = Co...
[ " AdvancedPeripheralsConfig.enableGeoScanner = ConfigHolder.COMMON_CONFIG.ENABLE_GEO_SCANNER.get();\n" ]
[]
[ " AdvancedPeripheralsConfig.enableColonyIntegrator = ConfigHolder.COMMON_CONFIG.ENABLE_COLONY_INTEGRATOR.get();\n" ]
[ "\n", " AdvancedPeripheralsConfig.enableVillagerStructures = ConfigHolder.COMMON_CONFIG.ENABLE_VILLAGER_STRUCTURES.get();\n", " }\n", "}\n" ]
[ " AdvancedPeripheralsConfig.enableGeoScanner = ConfigHolder.COMMON_CONFIG.ENABLE_GEO_SCANNER.get();\n", " AdvancedPeripheralsConfig.enableColonyIntegrator = ConfigHolder.COMMON_CONFIG.ENABLE_COLONY_INTEGRATOR.get();\n" ]
false
90d6ef5e17ac341a
[ "A1", "B1" ]
A then B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
0421601825a983cbbe7c9b9086076216e4be4abd
dc08070075d49e3c73ea4a7f20a97bf33cef6070
fae581e8a058d59aebdb46446bea43f867423763
src/main/java/de/srendi/advancedperipherals/common/setup/Blocks.java
0
1
[ " new TranslationTextComponent(\"item.advancedperipherals.tooltip.me_bridge\")));\n", " public static final RegistryObject<Block> RS_BRIDGE = register(\"rs_bridge\", () -> new APTileEntityBlock<>(TileEntityTypes.RS_BRIDGE, false, ModList.get().isLoaded(\"refinedstorage\")),\n", " ...
[ " ()-> new APBlockItem(Blocks.BLOCK_READER.get(), null, null,\n", " new TranslationTextComponent(\"item.advancedperipherals.tooltip.block_reader\")));\n", " public static final RegistryObject<Block> GEO_SCANNER = register(\"geo_scanner\", () -> new APTileEntityBlock<>(TileEntityType...
[ " ()-> new APBlockItem(Blocks.BLOCK_READER.get(), null, null,\n", " new TranslationTextComponent(\"item.advancedperipherals.tooltip.block_reader\")));\n" ]
[ " () -> new APBlockItem(Blocks.BLOCK_READER.get(), null, null,\n", " new TranslationTextComponent(\"item.advancedperipherals.tooltip.block_reader\")));\n", " public static final RegistryObject<Block> COLONY_INTEGRATOR = register(\"colony_integrator\", () -> new APTileEntityBlock...
[ "\n", " static void register() {\n", " }\n", "\n", " private static <T extends Block> RegistryObject<T> registerNoItem(String name, Supplier<T> block) {\n", " return Registration.BLOCKS.register(name, block);\n", " }\n", "\n", " private static <T extends Block> RegistryObject<T...
[ " ()-> new APBlockItem(Blocks.BLOCK_READER.get(), null, null,\n", " new TranslationTextComponent(\"item.advancedperipherals.tooltip.block_reader\")));\n", " public static final RegistryObject<Block> GEO_SCANNER = register(\"geo_scanner\", () -> new APTileEntityBlock<>(TileEntityType...
false
119c7f9ca268d7b9
[ "A1", "A2", "A3", "A4", "A5", "B3", "B4", "B5" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
ff0c113afb4d272b3ef8ec91e3aa9edf158bcd2a
7aa2617891fdf8f9502ccba572322738878a3821
a47b98e92254eaeb77c1efc0ccb4b36f93b85fff
src/main/java/de/srendi/advancedperipherals/AdvancedPeripherals.java
0
2
[ "package de.srendi.advancedperipherals;\n", "\n", "import de.srendi.advancedperipherals.common.configuration.APConfig;\n" ]
[ "import de.srendi.advancedperipherals.common.network.PacketHandler;\n", "import de.srendi.advancedperipherals.common.setup.APBlocks;\n", "import de.srendi.advancedperipherals.common.setup.APRegistration;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Blocks;\n", "import de.srendi.advancedperipherals.common.setup.Registration;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Registration;\n" ]
[ "import de.srendi.advancedperipherals.common.village.VillageStructures;\n", "import net.minecraft.resources.ResourceLocation;\n", "import net.minecraftforge.common.MinecraftForge;\n", "import net.minecraftforge.eventbus.api.IEventBus;\n", "import net.minecraftforge.fml.ModLoadingContext;\n", "import net.m...
[ "import de.srendi.advancedperipherals.common.network.PacketHandler;\n", "import de.srendi.advancedperipherals.common.setup.APBlocks;\n", "import de.srendi.advancedperipherals.common.setup.APRegistration;\n" ]
false
282683a28c37d401
[ "A1", "A2", "A3" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
ff0c113afb4d272b3ef8ec91e3aa9edf158bcd2a
7aa2617891fdf8f9502ccba572322738878a3821
a47b98e92254eaeb77c1efc0ccb4b36f93b85fff
src/main/java/de/srendi/advancedperipherals/AdvancedPeripherals.java
1
2
[ "import net.minecraft.resources.ResourceLocation;\n", "import net.minecraftforge.common.MinecraftForge;\n", "import net.minecraftforge.eventbus.api.IEventBus;\n", "import net.minecraftforge.fml.ModLoadingContext;\n", "import net.minecraftforge.fml.common.Mod;\n", "import net.minecraftforge.fml.event.lifec...
[ " public static final CreativeModeTab TAB = new CreativeModeTab(\"advancedperipheralstab\") {\n", "\n", " @Override\n", " @NotNull\n", " public ItemStack makeIcon() {\n", " return new ItemStack(APBlocks.CHAT_BOX.get());\n", " }\n", "\n", " };\n" ]
[ " public static final CreativeModeTab TAB = new CreativeModeTab(\"advancedperipheralstab\") {\n", "\n", " @Override\n", " @NotNull\n", " public ItemStack makeIcon() {\n", " return new ItemStack(Blocks.CHAT_BOX.get());\n", " }\n", "\n", " };\n" ]
[ " public static final APCreativeTab TAB = new APCreativeTab();\n" ]
[ "\n", " public AdvancedPeripherals() {\n", " LOGGER.info(\"AdvancedPeripherals says hello!\");\n", " IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus();\n", "\n", " APConfig.register(ModLoadingContext.get());\n", "\n", " modBus.addListener(this::commonSet...
[ " public static final APCreativeTab TAB = new APCreativeTab();\n" ]
false
19abd4d73c9f2346
[ "B1" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
490eda0952a266793f67a8421ef8b24ba397d808
44977a62790b60666bad4c594d0a446a648aabb1
89dc8771ecaeb5f36069ddb69613b3e42cf15b3a
src/main/java/de/srendi/advancedperipherals/common/blocks/blockentities/MeBridgeEntity.java
0
1
[ " protected MeBridgePeripheral createPeripheral() {\n", " return new MeBridgePeripheral(this);\n", " }\n", "\n", " @Override\n", " public <T extends BlockEntity> void handleTick(Level level, BlockState state, BlockEntityType<T> type) {\n", " if (!this.level.isClientSide) {\n", ...
[ " AdvancedPeripherals.debug(\"DEBUG2 \" + mainNode.isReady(), org.apache.logging.log4j.Level.ERROR);\n", " }\n", " for (CraftJob job : jobs)\n", " job.maybeCraft();\n", "\n" ]
[ " AdvancedPeripherals.debug(\"DEBUG2 \" + mainNode.isReady(), org.apache.logging.log4j.Level.ERROR);\n", " }\n", " for (CraftJob job : jobs) {\n", " job.maybeCraft();\n", " }\n" ]
[ " }\n", "\n", " // Try to start the job if the job calculation finished\n", " jobs.forEach(CraftJob::maybeCraft);\n", "\n", " // Remove the job if the crafting started, we can't do anything with it anymore\n" ]
[ " jobs.removeIf(CraftJob::isCraftingStarted);\n", " }\n", " }\n", "\n", " @NotNull\n", " @Override\n", " public Optional<Player> player() {\n", " return Optional.empty();\n", " }\n", "\n", " @NotNull\n", " @Override\n", " public Optional<IActi...
[ " }\n", "\n", " // Try to start the job if the job calculation finished\n", " jobs.forEach(CraftJob::maybeCraft);\n", "\n", " // Remove the job if the crafting started, we can't do anything with it anymore\n" ]
false
06d6aae52e936551
[ "B1", "B2", "B3", "B4", "B5", "B6" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
490eda0952a266793f67a8421ef8b24ba397d808
44977a62790b60666bad4c594d0a446a648aabb1
89dc8771ecaeb5f36069ddb69613b3e42cf15b3a
src/main/java/de/srendi/advancedperipherals/common/data/EnUsLanguageProvider.java
0
3
[ " addPocket(CCRegistration.ID.COLONY_POCKET, \"Colony\");\n", " addPocket(CCRegistration.ID.CHATTY_POCKET, \"Chatty\");\n", " addPocket(CCRegistration.ID.ENVIRONMENT_POCKET, \"Environment\");\n", " addPocket(CCRegistration.ID.GEOSCANNER_POCKET, \"Geo\");\n", " addPocket(CC...
[ " addTooltip(\"disabled\", \"&cThis item is disabled in config, so you can craft it, but it'll not have any functionality.\");\n", " addTooltip(APItems.COMPUTER_TOOL.get(), \"&7This tool was made to tune our blocks. But for now, it's just a blue useless wrench.\");\n", " addTooltip(APBlocks...
[ " addTooltip(\"disabled\", \"&cThis item is disabled in config, so you can craft it, but it'll not have any functionality.\");\n", " addTooltip(Items.COMPUTER_TOOL.get(), \"&7This tool was made to tune our blocks. But for now, it's just a blue useless wrench.\");\n", " addTooltip(Blocks.ENE...
[ " addTooltip(\"disabled\", \"&cThis item is disabled in the config, so you can craft it, but it'll not have any functionality.\");\n", " addTooltip(Items.COMPUTER_TOOL.get(), \"&7This tool was made to tune our blocks. But for now, it's just a blue useless wrench.\");\n", " addTooltip(Blocks...
[ " addTooltip(\"memory_card.bound\", \"&7Bound to &b%s&7.\");\n" ]
[ " addTooltip(\"disabled\", \"&cThis item is disabled in config, so you can craft it, but it'll not have any functionality.\");\n", " addTooltip(APItems.COMPUTER_TOOL.get(), \"&7This tool was made to tune our blocks. But for now, it's just a blue useless wrench.\");\n", " addTooltip(APBlocks...
false
77b0986d845b2249
null
needs new code
{ "test_file": false, "benchmark_size": false, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
490eda0952a266793f67a8421ef8b24ba397d808
44977a62790b60666bad4c594d0a446a648aabb1
89dc8771ecaeb5f36069ddb69613b3e42cf15b3a
src/main/java/de/srendi/advancedperipherals/common/data/EnUsLanguageProvider.java
1
3
[ " addTooltip(\"memory_card.bound\", \"&7Bound to &b%s&7.\");\n" ]
[ " addTooltip(APBlocks.INVENTORY_MANAGER.get(), \"&7This block is able to send or receive specific items from a player inventory.\");\n", " addTooltip(APBlocks.REDSTONE_INTEGRATOR.get(), \"&7This block is able to interact with redstone. Works exactly like the redstone api of an computer.\");\n", " ...
[ " addTooltip(Blocks.INVENTORY_MANAGER.get(), \"&7This block is able to send or receive specific items from a player inventory.\");\n", " addTooltip(Blocks.REDSTONE_INTEGRATOR.get(), \"&7This block is able to interact with redstone. Works exactly like the redstone api of an computer.\");\n", " ...
[ " addTooltip(Blocks.INVENTORY_MANAGER.get(), \"&7This block is able to send or receive specific items from a player inventory.\");\n", " addTooltip(Blocks.REDSTONE_INTEGRATOR.get(), \"&7This block is able to interact with redstone. Works exactly like the redstone api of an computer.\");\n", " ...
[ " }\n", "\n", " private void addText() {\n", " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".removed_player\", \"Cleared the memory card\");\n", " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".added_player\", \"Added you to the memory card\");\n" ]
[ " addTooltip(APBlocks.INVENTORY_MANAGER.get(), \"&7This block is able to send or receive specific items from a player inventory.\");\n", " addTooltip(APBlocks.REDSTONE_INTEGRATOR.get(), \"&7This block is able to interact with redstone. Works exactly like the redstone api of an computer.\");\n", " ...
false
833ea70bb94f39a4
null
needs new code
{ "test_file": false, "benchmark_size": false, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
490eda0952a266793f67a8421ef8b24ba397d808
44977a62790b60666bad4c594d0a446a648aabb1
89dc8771ecaeb5f36069ddb69613b3e42cf15b3a
src/main/java/de/srendi/advancedperipherals/common/data/EnUsLanguageProvider.java
2
3
[ " }\n", "\n", " private void addText() {\n", " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".removed_player\", \"Cleared the memory card\");\n", " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".added_player\", \"Added you to the memory card\");\n" ]
[ " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".automata_core_feed_by_player\", \"You trying to feed entity to soul, but your own body refuses to do this. Maybe something more mechanical can do this?\");\n", " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".smart_glasses.peripherals\", \"Periphera...
[ " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".automata_core_feed_by_player\", \"You trying to feed entity to soul, but your own body refuses to do this. Maybe something more mechanical can do this?\");\n" ]
[ " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".automata_core_feed_by_player\", \"You're trying to feed an entity to a soul, but your own body refuses to do this. Maybe something more mechanical can do this?\");\n" ]
[ " }\n", "\n", " private void addKeybinds() {\n", " add(\"keybind.advancedperipherals.category\", \"Advanced Peripherals\");\n", " addKeybind(KeyBindings.DESCRIPTION_KEYBINDING, \"Show Description\");\n", " }\n", "\n", " private void addAdvancement(@NotNull String advancement,...
[ " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".automata_core_feed_by_player\", \"You're trying to feed an entity to a soul, but your own body refuses to do this. Maybe something more mechanical can do this?\");\n", " add(\"text.\" + AdvancedPeripherals.MOD_ID + \".smart_glasses.peripherals\", \"P...
false
e2b51343797aee80
[ "B1", "A2", "A3" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
ab0d58a93460f626ee5bf52839281fa6fe40e95b
ab4b47cce91ec7655b4212bfb19c734c72d313f9
4acaa1c435dd95e03fd61e0e052948c7c198c4f9
src/main/java/de/srendi/advancedperipherals/common/commands/APCommands.java
0
1
[ "import net.minecraft.commands.Commands;\n", "import net.minecraft.network.chat.ClickEvent;\n", "import net.minecraft.network.chat.Component;\n", "import net.minecraft.network.chat.ComponentUtils;\n", "import net.minecraft.network.chat.HoverEvent;\n", "import net.minecraft.server.level.ServerPlayer;\n", ...
[ " event.getDispatcher().register(Commands.literal(\"advancedperipherals\")\n", " .then(Commands.literal(\"getHashItem\")\n", " .executes(context -> getHashItem(context.getSource()))));\n" ]
[ " event.getDispatcher().register(Commands.literal(\"advancedperipherals\").then(Commands.literal(\"getHashItem\").executes(context -> getHashItem(context.getSource()))));\n" ]
[ " event.getDispatcher().register(Commands.literal(ROOT_LITERAL)\n", " .then(Commands.literal(\"getHashItem\").executes(context -> getHashItem(context.getSource())))\n", " .then(Commands.literal(FORCELOAD_LITERAL)\n", " .executes(context -> forceloadHelp(context.getS...
[ " }\n", "\n", " private static int getHashItem(CommandSourceStack source) throws CommandSyntaxException {\n", " ServerPlayer playerEntity = source.getPlayerOrException();\n", " if (playerEntity.getMainHandItem().isEmpty()) {\n", " source.sendFailure(Component.literal(\"You n...
[ " event.getDispatcher().register(Commands.literal(ROOT_LITERAL)\n", " .then(Commands.literal(\"getHashItem\")\n", " .executes(context -> getHashItem(context.getSource()))).then(Commands.literal(FORCELOAD_LITERAL)\n", " .executes(context -> forceloadH...
false
b8741d84e6dbbdb5
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
ab0d58a93460f626ee5bf52839281fa6fe40e95b
ab4b47cce91ec7655b4212bfb19c734c72d313f9
4acaa1c435dd95e03fd61e0e052948c7c198c4f9
src/main/java/de/srendi/advancedperipherals/common/util/CoordUtil.java
0
1
[ "\n", " if (front.getAxis() == Direction.Axis.Y) {\n", " return switch (side) {\n", " case FRONT -> front;\n", " case BACK -> front.getOpposite();\n", " case TOP -> top;\n", " case BOTTOM -> top.getOpposite();\n", " ...
[ "\n" ]
[ "\n", " throw new LuaException(computerSide + \" is not a expected side\");\n" ]
[]
[ " }\n", "\n", "}\n" ]
[ "\n" ]
false
3c761b7bf6c945b4
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
ab0d58a93460f626ee5bf52839281fa6fe40e95b
ab4b47cce91ec7655b4212bfb19c734c72d313f9
4acaa1c435dd95e03fd61e0e052948c7c198c4f9
src/main/java/de/srendi/advancedperipherals/common/util/ServerWorker.java
0
1
[ "package de.srendi.advancedperipherals.common.util;\n", "\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n", "import net.minecraftforge.event.TickEvent;\n", "import net.minecraftforge.eventbus.api.SubscribeEvent;\n", "import net.minecraftforge.fml.common.Mod;\n", "\n", "import java.uti...
[ " private static final Queue<Runnable> callQueue = new ArrayDeque<>();\n", " private static int tasksRan = 0;\n" ]
[ " private static final Queue<Runnable> callQueue = new ArrayDeque<>();\n" ]
[ " private static final Queue<Runnable> callQueue = new ConcurrentLinkedQueue<>();\n" ]
[ "\n", " public static void add(final Runnable call) {\n", " callQueue.add(call);\n", " }\n", "\n", " @SubscribeEvent\n", " public static void serverTick(TickEvent.ServerTickEvent event) {\n", " if (event.phase == TickEvent.Phase.END) {\n", " while (!callQueue.isE...
[ " private static final Queue<Runnable> callQueue = new ConcurrentLinkedQueue<>();\n", " private static int tasksRan = 0;\n" ]
false
f7e7224e5489a1ff
[ "B1", "A2" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
43f229793b2671219f71fbb15c55f2da9b6fc7c8
23d3b917ba66ad2bef04f691e4d4087c51591a01
6888ed52024fb10ef7ba3ccc717e51d125a8febb
src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/AppEngApi.java
0
2
[ "\n", " return used;\n", " }\n", "\n", " public static long getAvailableItemStorage(IGridNode node) {\n", " return getTotalItemStorage(node) - getUsedItemStorage(node);\n", " }\n", "\n", " public static long getAvailableFluidStorage(IGridNode node) {\n", " return g...
[ " if (!(entity instanceof DriveBlockEntity driveEntity))\n" ]
[ " DriveBlockEntity entity = (DriveBlockEntity) iterator.next().getService(IStorageProvider.class);\n", " if (entity == null)\n" ]
[ " if (!(entity instanceof DriveBlockEntity drive))\n" ]
[ " continue;\n", "\n" ]
[ " if (!(entity instanceof DriveBlockEntity driveEntity))\n" ]
false
dbd287190050cb0d
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
43f229793b2671219f71fbb15c55f2da9b6fc7c8
23d3b917ba66ad2bef04f691e4d4087c51591a01
6888ed52024fb10ef7ba3ccc717e51d125a8febb
src/main/java/de/srendi/advancedperipherals/common/addons/powah/FurnatorIntegration.java
0
2
[ "package de.srendi.advancedperipherals.common.addons.powah;\n", "\n", "import dan200.computercraft.api.lua.LuaFunction;\n" ]
[ "import de.srendi.advancedperipherals.lib.peripherals.APGenericPeripheral;\n" ]
[ "import de.srendi.advancedperipherals.lib.peripherals.BlockEntityIntegrationPeripheral;\n" ]
[ "import de.srendi.advancedperipherals.lib.peripherals.BlockEntityIntegrationPeripheral;\n", "import de.srendi.advancedperipherals.common.util.LuaConverter;\n" ]
[ "import net.minecraft.world.item.ItemStack;\n", "import owmii.powah.block.furnator.FurnatorTile;\n", "\n", "public class FurnatorIntegration implements APGenericPeripheral {\n", "\n", " @Override\n", " public String getPeripheralType() {\n", " return \"furnator\";\n", " }\n", "\n",...
[ "import de.srendi.advancedperipherals.lib.peripherals.APGenericPeripheral;\n", "import de.srendi.advancedperipherals.lib.peripherals.BlockEntityIntegrationPeripheral;\n", "import de.srendi.advancedperipherals.common.util.LuaConverter;\n" ]
false
88849e36b36851dc
[ "A1", "B1", "B2" ]
A then B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
43f229793b2671219f71fbb15c55f2da9b6fc7c8
23d3b917ba66ad2bef04f691e4d4087c51591a01
6888ed52024fb10ef7ba3ccc717e51d125a8febb
src/main/java/de/srendi/advancedperipherals/common/addons/powah/ReactorIntegration.java
1
4
[ " if (blockEntity.core().isEmpty())\n", " return 0.0d;\n", " return blockEntity.core().get().getEnergy().getEnergyStored();\n", " }\n", "\n", " @LuaFunction(mainThread = true)\n", " public final double getMaxEnergy(ReactorPartTile blockEntity) {\n", " if (block...
[ " public final ItemStack getInventoryUraninite(ReactorPartTile blockEntity) {\n", " if (blockEntity.core().isEmpty())\n", " return ItemStack.EMPTY;\n", " return blockEntity.core().get().getInventory().getStackInSlot(1);\n" ]
[ " public final ItemStack getInventoryUraninite() {\n", " if (blockEntity.core().isEmpty())\n", " return ItemStack.EMPTY;\n", " return blockEntity.core().get().getInventory().getStackInSlot(1);\n" ]
[ " public final Object getInventoryUraninite() {\n", " if (blockEntity.core().isEmpty()) {\n", " return null;\n", " }\n", " ItemStack stack = blockEntity.core().get().getStack(1);\n", " if (stack.isEmpty()) {\n", " return null;\n", " }\n", "...
[ " }\n", "\n", " @LuaFunction(mainThread = true)\n" ]
[ " public final Object getInventoryUraninite(ReactorPartTile blockEntity) {\n", " if (blockEntity.core().isEmpty()) {\n", " return null;\n", " }\n", " ItemStack stack = blockEntity.core().get().getStack(1);\n", " if (stack.isEmpty()) {\n", " return nul...
false
ad8656ec3341f689
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
43f229793b2671219f71fbb15c55f2da9b6fc7c8
23d3b917ba66ad2bef04f691e4d4087c51591a01
6888ed52024fb10ef7ba3ccc717e51d125a8febb
src/main/java/de/srendi/advancedperipherals/common/addons/powah/ReactorIntegration.java
3
4
[ " }\n", "\n", " @LuaFunction(mainThread = true)\n" ]
[ " public final ItemStack getInventoryCarbon(ReactorPartTile blockEntity) {\n", " if (blockEntity.core().isEmpty())\n", " return ItemStack.EMPTY;\n", " return blockEntity.core().get().getInventory().getStackInSlot(2);\n" ]
[ " public final ItemStack getInventoryCarbon() {\n", " if (blockEntity.core().isEmpty())\n", " return ItemStack.EMPTY;\n", " return blockEntity.core().get().getInventory().getStackInSlot(2);\n" ]
[ " public final Object getInventoryCarbon() {\n", " if (blockEntity.core().isEmpty()) {\n", " return null;\n", " }\n", " ItemStack stack = blockEntity.core().get().getStack(2);\n", " if (stack.isEmpty()) {\n", " return null;\n", " }\n", " ...
[ " }\n", "}\n" ]
[ " public final Object getInventoryCarbon(ReactorPartTile blockEntity) {\n", " if (blockEntity.core().isEmpty()) {\n", " return null;\n", " }\n", " ItemStack stack = blockEntity.core().get().getStack(2);\n", " if (stack.isEmpty()) {\n", " return null;\...
false
8bf68470f65aa790
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
43f229793b2671219f71fbb15c55f2da9b6fc7c8
23d3b917ba66ad2bef04f691e4d4087c51591a01
6888ed52024fb10ef7ba3ccc717e51d125a8febb
src/main/java/de/srendi/advancedperipherals/common/village/VillagerTrades.java
0
1
[ "import dan200.computercraft.shared.ModRegistry;\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n", "import de.srendi.advancedperipherals.common.configuration.APConfig;\n", "import de.srendi.advancedperipherals.common.setup.Blocks;\n", "import de.srendi.advancedperipherals.common.setup.CCReg...
[ " TradeBuilder.createTrade(event, Blocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createTrade(event, ModRegistry.Blocks.TURTLE_ADVANCED.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 2, ...
[ " TradeBuilder.createTrade(event, Blocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createTrade(event, Registry.ModBlocks.TURTLE_ADVANCED.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 2, ...
[ " if (APConfig.WORLD_CONFIG.enableWanderingTraderTrades.get()) {\n", " TradeBuilder.createTrade(event, Blocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createT...
[ " }\n", "\n", " @SubscribeEvent\n", " public static void registerVillagerTrades(VillagerTradesEvent event) {\n", " if (event.getType() == Villagers.COMPUTER_SCIENTIST.get()) {\n", "\n", " TradeBuilder.createTrade(event, Blocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_F...
[ " if (APConfig.WORLD_CONFIG.enableWanderingTraderTrades.get()) {\n", " TradeBuilder.createTrade(event, Blocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createT...
false
20192446c4dbdeb9
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
394937e2b6baf4a8530de0764800764e3e5f1581
6680fff15e001853e958f8124b495f0057ac241a
78df4411cb63f6e1227829a45dec9459e7e12174
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/base/IntegrationPeripheralProvider.java
0
1
[ "import net.minecraft.core.BlockPos;\n", "import net.minecraft.core.Direction;\n", "import net.minecraft.world.level.Level;\n", "import net.minecraft.world.level.block.entity.BlockEntity;\n", "import net.minecraftforge.common.util.LazyOptional;\n", "import org.jetbrains.annotations.NotNull;\n", "\n", ...
[]
[ " if (ModList.get().isLoaded(\"mekanismgenerators\")) {\n", " registerIntegration(new FissionIntegration());\n", " registerIntegration(new FusionIntegration());\n", " registerIntegration(new TurbineIntegration());\n", " }\n", " if (ModList.get().isLoad...
[ " if (ModList.get().isLoaded(\"mekanismgenerators\")) {\n", " registerIntegration(new FissionIntegration());\n", " registerIntegration(new FusionIntegration());\n", " registerIntegration(new TurbineIntegration());\n", " }\n", " if (ModList.get().isLoad...
[ " }\n", "\n", " public LazyOptional<IPeripheral> getIntegration(BlockEntity tileEntity) {\n", " for (Integration<?> integration : integrations) {\n", " if (integration.isTileEntity(tileEntity)) {\n", " Integration<?> Integration = integration.getNewInstance();\n", ...
[]
false
a902df32d5b02f93
[]
side A
{ "test_file": false, "benchmark_size": false, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
49de57ac6012130a28b2a1a0e1febbfd4949ccd1
6182229574c6bfa6376fe6a31d2f2b09bced162b
c7db526624cc89a89905ba8c08324027c2185490
src/main/java/de/srendi/advancedperipherals/common/blocks/blockentities/PlayerDetectorEntity.java
0
2
[ "package de.srendi.advancedperipherals.common.blocks.blockentities;\n", "\n", "import de.srendi.advancedperipherals.common.addons.computercraft.peripheral.PlayerDetectorPeripheral;\n", "import de.srendi.advancedperipherals.common.blocks.base.PeripheralBlockEntity;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.APBlockEntityTypes;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.BlockEntityTypes;\n" ]
[ "import de.srendi.advancedperipherals.common.events.Events;\n", "import de.srendi.advancedperipherals.common.setup.BlockEntityTypes;\n" ]
[ "import net.minecraft.core.BlockPos;\n", "import net.minecraft.world.level.Level;\n", "import net.minecraft.world.level.block.entity.BlockEntity;\n", "import net.minecraft.world.level.block.entity.BlockEntityType;\n", "import net.minecraft.world.level.block.state.BlockState;\n", "import org.jetbrains.anno...
[ "import de.srendi.advancedperipherals.common.events.Events;\n", "import de.srendi.advancedperipherals.common.setup.APBlockEntityTypes;\n" ]
false
1cee389c96c83d57
[ "B1", "A1" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
49de57ac6012130a28b2a1a0e1febbfd4949ccd1
6182229574c6bfa6376fe6a31d2f2b09bced162b
c7db526624cc89a89905ba8c08324027c2185490
src/main/java/de/srendi/advancedperipherals/common/data/PocketUpgradesProvider.java
0
1
[ "package de.srendi.advancedperipherals.common.data;\n", "\n", "import dan200.computercraft.api.pocket.PocketUpgradeDataProvider;\n", "import dan200.computercraft.api.pocket.PocketUpgradeSerialiser;\n", "import de.srendi.advancedperipherals.common.setup.APBlocks;\n", "import de.srendi.advancedperipherals.c...
[ " simpleWithCustomItem(CCRegistration.ID.CHATTY_POCKET, CCRegistration.CHAT_BOX_POCKET.get(), APBlocks.CHAT_BOX.get().asItem()).add(addUpgrade);\n", " simpleWithCustomItem(CCRegistration.ID.PLAYER_POCKET, CCRegistration.PLAYER_DETECTOR_POCKET.get(), APBlocks.PLAYER_DETECTOR.get().asItem()).add(addUp...
[ " simpleWithCustomItem(CCRegistration.ID.CHATTY_POCKET, CCRegistration.CHAT_BOX_POCKET.get(), Blocks.CHAT_BOX.get().asItem()).add(addUpgrade);\n", " simpleWithCustomItem(CCRegistration.ID.PLAYER_POCKET, CCRegistration.PLAYER_DETECTOR_POCKET.get(), Blocks.PLAYER_DETECTOR.get().asItem()).add(addUpgrad...
[ " simpleWithCustomItem(CCRegistration.ID.CHATTY_POCKET, CCRegistration.CHAT_BOX_POCKET.get(), Blocks.CHAT_BOX.get().asItem()).add(addUpgrade);\n", " simpleWithCustomItem(CCRegistration.ID.PLAYER_POCKET, CCRegistration.PLAYER_DETECTOR_POCKET.get(), Blocks.PLAYER_DETECTOR.get().asItem()).add(addUpgrad...
[ " }\n", "}\n" ]
[ " simpleWithCustomItem(CCRegistration.ID.CHATTY_POCKET, CCRegistration.CHAT_BOX_POCKET.get(), APBlocks.CHAT_BOX.get().asItem()).add(addUpgrade);\n", " simpleWithCustomItem(CCRegistration.ID.PLAYER_POCKET, CCRegistration.PLAYER_DETECTOR_POCKET.get(), APBlocks.PLAYER_DETECTOR.get().asItem()).add(addUp...
false
39e83293cbb9e407
[ "A1", "A2", "A3", "A4" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
49de57ac6012130a28b2a1a0e1febbfd4949ccd1
6182229574c6bfa6376fe6a31d2f2b09bced162b
c7db526624cc89a89905ba8c08324027c2185490
src/main/java/de/srendi/advancedperipherals/common/util/CoordUtil.java
1
2
[ " return false;\n", "\n", " double x = player.getX(), y = player.getY(), ey = player.getEyeY(), z = player.getZ();\n", " if (ey > y) { // Ensure following code will work when eye position is lower than feet position\n", " double tmp = ey;\n", " ey = y;\n", ...
[ " public static boolean isInRange(@NotNull BlockPos blockPos, @NotNull Player player, @NotNull Level world, @NotNull BlockPos firstPos, @NotNull BlockPos secondPos) {\n", " if (blockPos == null || world == null || player == null)\n" ]
[ " public static boolean isInRange(@NotNull BlockPos blockPos, @NotNull Player player, @NotNull Level world, @NotNull BlockPos firstPos, @NotNull BlockPos secondPos) {\n", " if(blockPos == null || world == null || player == null)\n" ]
[ " public static boolean isInRange(@Nullable BlockPos pos, @Nullable Level world, @Nullable Player player, int x, int y, int z) {\n", " if (pos == null || world == null || player == null)\n" ]
[ " return false;\n", "\n", " // It shouldn't multiply by 2 here, but it should have the same behavior as isInRange when x == y == z == range\n", " x = Math.min(Math.abs(x), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n", " y = Math.min(Math.abs(y), APConfig.PERIPHERA...
[ " public static boolean isInRange(@Nullable BlockPos pos, @Nullable Level world, @Nullable Player player, int x, int y, int z) {\n", " if (pos == null || world == null || player == null)\n" ]
false
4dc4e030a570dece
[ "B1", "B2" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
49de57ac6012130a28b2a1a0e1febbfd4949ccd1
6182229574c6bfa6376fe6a31d2f2b09bced162b
c7db526624cc89a89905ba8c08324027c2185490
src/main/java/de/srendi/advancedperipherals/common/util/inventory/IStorageSystemItemHandler.java
0
1
[ "package de.srendi.advancedperipherals.common.util.inventory;\n", "\n", "import net.minecraft.world.item.ItemStack;\n", "import net.minecraftforge.items.IItemHandler;\n", "import org.jetbrains.annotations.NotNull;\n", "\n", "public interface IStorageSystemItemHandler extends IItemHandler {\n", "\n", ...
[ " * @param filter The parsed filter\n" ]
[ " * @param filter The parsed filter\n" ]
[ " * @param filter The parsed filter\n", " * @param count The amount to extract\n" ]
[ " * @param simulate Should this action be simulated\n", " * @return extracted from the slot, must be empty if nothing can be extracted. The returned ItemStack can be safely modified after, so item handlers should return a new or copied stack.\n", " */\n", " ItemStack extractItem(ItemFilter filt...
[ " * @param filter The parsed filter\n", " * @param filter The parsed filter\n", " * @param count The amount to extract\n" ]
false
ba54b426ec6c81e6
[ "A1", "B1", "B2" ]
A then B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
49de57ac6012130a28b2a1a0e1febbfd4949ccd1
6182229574c6bfa6376fe6a31d2f2b09bced162b
c7db526624cc89a89905ba8c08324027c2185490
src/main/java/de/srendi/advancedperipherals/common/util/inventory/ItemFilter.java
0
1
[ "\n", " public ItemStack toItemStack() {\n", " var result = new ItemStack(item, count);\n", " result.setTag(nbt != null ? nbt.copy() : null);\n", " return result;\n", " }\n", "\n", " public boolean test(ItemStack stack) {\n", " if (!fingerprint.isEmpty()) {\n", ...
[ " return nbt == null || stack.getOrCreateTag().equals(nbt);\n" ]
[ " if (nbt != null && !stack.getOrCreateTag().equals(nbt))\n", " return false;\n", "\n", " return true;\n" ]
[ " if (nbt != null && !stack.getOrCreateTag().equals(nbt) && (item == Items.AIR || stack.is(item)))\n", " return false;\n", "\n", " return true;\n" ]
[ " }\n", "\n", " public int getCount() {\n", " return count;\n", " }\n", "\n", " public Item getItem() {\n", " return item;\n", " }\n", "\n", " public int getFromSlot() {\n", " return fromSlot;\n", " }\n", "\n", " public int getToSlot() {\n", ...
[ " if (nbt != null && !stack.getOrCreateTag().equals(nbt) && (item == Items.AIR || stack.is(item)))\n", " return false;\n", "\n", " return true;\n" ]
false
9e32a1838750911f
[ "B1", "B2", "B3", "B4" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
b7c8d90e9e22435144417d761165e3e4f6fe9fc5
c4afd74657caf819fae37db7d65fa70bdda0f7d3
a6742f203b5c4604b29c7ec3bd8666c6b1602f35
src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/AppEngApi.java
0
3
[ " long total = 0;\n", "\n", " Iterator<IGridNode> iterator = node.getGrid().getMachineNodes(DriveBlockEntity.class).iterator();\n", "\n", " if (!iterator.hasNext()) return 0;\n", " while (iterator.hasNext()) {\n", " DriveBlockEntity entity = (DriveBlockEntity) iter...
[ " } else if (APAddons.aeThingsLoaded && stack.getItem() instanceof DISKDrive disk) {\n" ]
[ " } else if (stack.getItem() instanceof DISKDrive disk) {\n" ]
[ " } /*else if (stack.getItem() instanceof DISKDrive disk) {\n" ]
[ " if (disk.getKeyType().toString().equals(\"ae2:i\")) {\n", " total += disk.getBytes(null);\n", " }\n", " }*/\n", " }\n", " }\n", "\n", " return total;\n", " }\n", "\n", " public static lon...
[ " } else if (APAddons.aeThingsLoaded && stack.getItem() instanceof DISKDrive disk) {\n" ]
false
10dc6bffa899795b
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
b7c8d90e9e22435144417d761165e3e4f6fe9fc5
c4afd74657caf819fae37db7d65fa70bdda0f7d3
a6742f203b5c4604b29c7ec3bd8666c6b1602f35
src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/AppEngApi.java
1
3
[ "\n", " if (!iterator.hasNext()) return 0;\n", " while (iterator.hasNext()) {\n", " DriveBlockEntity entity = (DriveBlockEntity) iterator.next().getService(IStorageProvider.class);\n", " if (entity == null) continue;\n", "\n", " InternalInventory inventory ...
[ " } else if (APAddons.aeThingsLoaded && stack.getItem() instanceof DISKDrive disk) {\n" ]
[ " } else if (stack.getItem() instanceof DISKDrive disk) {\n" ]
[ " } /* else if (stack.getItem() instanceof DISKDrive disk) {\n" ]
[ " if (disk.getKeyType().toString().equals(\"ae2:i\")) {\n", " if (stack.getTag() == null) continue;\n", " long numItemsInCell = stack.getTag().getLong(\"ic\");\n", " used += ((int) Math.ceil(((double) numIt...
[ " } else if (APAddons.aeThingsLoaded && stack.getItem() instanceof DISKDrive disk) {\n" ]
false
a0488e915061152a
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
4045c17d269db629747429b80a13883035bd923e
c9109a4e82f7965e5b8884cf41770a6fa6d27844
41e0f7f713b8f12486495103ed0a4d78be8e3c87
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/GeoScannerPeripheral.java
2
3
[ "\n", " Block block = state.getBlock();\n", " ResourceLocation name = BuiltInRegistries.BLOCK.getKey(block);\n", " data.put(\"name\", name == null ? \"unknown\" : name.toString());\n" ]
[ " data.put(\"tags\", LuaConverter.tagsToList(block.builtInRegistryHolder().tags()));\n" ]
[ " data.put(\"tags\", LuaConverter.tagsToList(() -> block.builtInRegistryHolder().tags()));\n" ]
[ " data.put(\"tags\", LuaConverter.getHolderTags(block.builtInRegistryHolder()));\n" ]
[ "\n", " result.add(data);\n", " });\n", "\n", " return result;\n", " }\n", "\n", " private static int estimateCost(int radius) {\n", " if (radius > SCAN_BLOCKS.getMaxCostRadius()) return -1;\n", "\n", " return SCAN_BLOCKS.getCost(SphereOperationContex...
[ " data.put(\"tags\", LuaConverter.getHolderTags(block.builtInRegistryHolder()));\n" ]
false
7f03c59532e39646
[ "B1" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
4045c17d269db629747429b80a13883035bd923e
c9109a4e82f7965e5b8884cf41770a6fa6d27844
41e0f7f713b8f12486495103ed0a4d78be8e3c87
src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java
1
5
[ " /**\n", " * Returns the stack but with a slot entry. Used to prevent zero indexed tables\n", " *\n", " * @param stack the item stack\n", " * @param slot the slot of the item\n", " * @return a Map containing proper item stack details\n", " * @see InventoryManagerPeripheral#g...
[ " properties.put(\"tags\", tagsToList(item.builtInRegistryHolder().tags()));\n" ]
[ " properties.put(\"tags\", tagsToList(() -> item.builtInRegistryHolder().tags()));\n" ]
[ " properties.put(\"tags\", getHolderTags(item.builtInRegistryHolder()));\n" ]
[ " properties.put(\"name\", ItemUtil.getRegistryKey(item).toString());\n", " return properties;\n", " }\n", "\n", " public static Map<String, Object> fluidToObject(@NotNull Fluid fluid) {\n", " Map<String, Object> properties = new HashMap<>();\n" ]
[ " properties.put(\"tags\", getHolderTags(item.builtInRegistryHolder()));\n" ]
false
8e71749d2737e957
[ "B1" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
4045c17d269db629747429b80a13883035bd923e
c9109a4e82f7965e5b8884cf41770a6fa6d27844
41e0f7f713b8f12486495103ed0a4d78be8e3c87
src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java
3
5
[ " properties.put(\"name\", FluidUtil.getRegistryKey(fluid).toString());\n", " return properties;\n", " }\n", "\n", " public static Map<String, Object> chemicalToObject(@NotNull Chemical chemical) {\n", " // In theory should not be called if the addon is not installed, but just t...
[ " properties.put(\"tags\", tagsToList(MekanismAPI.CHEMICAL_REGISTRY.wrapAsHolder(chemical).tags()));\n" ]
[ " properties.put(\"tags\", tagsToList(() -> MekanismAPI.CHEMICAL_REGISTRY.wrapAsHolder(chemical).tags()));\n" ]
[ " properties.put(\"tags\", getHolderTags(MekanismAPI.CHEMICAL_REGISTRY.wrapAsHolder(chemical)));\n" ]
[ " properties.put(\"isGaseous\", chemical.isGaseous());\n", " properties.put(\"radioactivity\", chemical.isRadioactive());\n", " properties.put(\"name\", ChemicalUtil.getRegistryKey(chemical).toString());\n", " return properties;\n", " }\n", "\n" ]
[ " properties.put(\"tags\", getHolderTags(MekanismAPI.CHEMICAL_REGISTRY.wrapAsHolder(chemical)));\n" ]
false
862445cf722ab417
[ "B1" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
4045c17d269db629747429b80a13883035bd923e
c9109a4e82f7965e5b8884cf41770a6fa6d27844
41e0f7f713b8f12486495103ed0a4d78be8e3c87
src/main/java/de/srendi/advancedperipherals/common/util/ScanUtils.java
0
2
[ "package de.srendi.advancedperipherals.common.util;\n", "\n", "import net.minecraft.core.BlockPos;\n", "import net.minecraft.util.Mth;\n", "import net.minecraft.world.level.Level;\n", "import net.minecraft.world.level.block.state.BlockState;\n", "import net.minecraft.world.phys.Vec3;\n", "\n", "impo...
[ " public static void traverseBlocks(Level world, Vec3 center, double radius, BiConsumer<BlockState, Vec3> consumer, boolean relativePosition) {\n", " final double x = center.x, y = center.y, z = center.z;\n", " final int minX = Mth.floor(x - radius), maxX = Mth.floor(x + radius);\n", " ...
[ " public static void traverseBlocks(Level world, BlockPos center, int radius, BiConsumer<BlockState, BlockPos> consumer, boolean relativePosition) {\n", " int x = center.getX();\n", " int y = center.getY();\n", " int z = center.getZ();\n", " for (int oX = x - radius; oX <= x +...
[ " public static void traverseBlocks(Level world, BlockPos center, int radius, BiConsumer<BlockState, BlockPos> consumer, boolean relativePosition) {\n", " final int x = center.getX(), y = center.getY(), z = center.getZ();\n", " final int minX = x - radius, maxX = x + radius;\n", " fina...
[ " final BlockPos.MutableBlockPos subPos = new BlockPos.MutableBlockPos();\n", " for (int oX = minX; oX <= maxX; oX++) {\n", " for (int oY = minY; oY <= maxY; oY++) {\n", " for (int oZ = minZ; oZ <= maxZ; oZ++) {\n", " BlockState blockState = world.g...
[ " public static void traverseBlocks(Level world, BlockPos center, int radius, BiConsumer<BlockState, BlockPos> consumer, boolean relativePosition) {\n", " final int x = center.getX(), y = center.getY(), z = center.getZ();\n", " final int minX = x - radius, maxX = x + radius;\n", " fina...
false
fdb1a3aa91ba082c
[ "B1", "B2", "B3", "B4", "B5" ]
side B
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
4045c17d269db629747429b80a13883035bd923e
c9109a4e82f7965e5b8884cf41770a6fa6d27844
41e0f7f713b8f12486495103ed0a4d78be8e3c87
src/main/java/de/srendi/advancedperipherals/common/util/inventory/ItemFilter.java
0
1
[ " private Item item = Items.AIR;\n", " private TagKey<Item> tag = null;\n", " private Tag componentsAsNbt = null;\n", " private PatchedDataComponentMap components;\n", " private int count = 64;\n", " private String fingerprint = \"\";\n", " public int fromSlot = -1;\n", " publi...
[ " try {\n", " String name = item.getString(\"name\");\n", " if (name.startsWith(\"#\")) {\n", " itemFilter.tag = TagKey.create(Registries.ITEM, ResourceLocation.parse(name.substring(1)));\n", " } else if ((itemFilter.item = RegistryU...
[ " try {\n", " String name = item.getString(\"name\");\n", " if (name.startsWith(\"#\")) {\n", " itemFilter.tag = TagKey.create(Registries.ITEM, ResourceLocation.parse(name.substring(1)));\n", " } else if ((itemFilter.item = ItemUtil....
[ " String name = item.getString(\"name\");\n", " if (name.startsWith(\"#\")) {\n", " itemFilter.tag = TagKey.create(Registries.ITEM, ResourceLocation.parse(name.substring(1)));\n", " } else if ((itemFilter.item = ItemUtil.getRegistryEntry(name, BuiltInRegistries....
[ " }\n", " }\n", " if (item.containsKey(\"components\")) {\n", " try {\n", " itemFilter.componentsAsNbt = NBTUtil.fromText(item.getString(\"components\"));\n", " } catch (LuaException e1) {\n", " try {\n", " ...
[ " String name = item.getString(\"name\");\n", " if (name.startsWith(\"#\")) {\n", " itemFilter.tag = TagKey.create(Registries.ITEM, ResourceLocation.parse(name.substring(1)));\n", " } else if ((itemFilter.item = RegistryUtil.getRegistryEntry(name, BuiltInRegistr...
false
1cecde2f026a5787
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
abd86a570a543efa9c5184ac2881a383d2fcad8b
4e3f144839066da91b5c1c31e55558e0b1c4d366
e7a68cc5e8c57e8528c881a721def2ae74b32cf2
src/main/java/de/srendi/advancedperipherals/common/container/InventoryManagerContainer.java
0
1
[ "import de.srendi.advancedperipherals.common.container.base.BaseContainer;\n", "import de.srendi.advancedperipherals.common.container.base.SlotCondition;\n", "import de.srendi.advancedperipherals.common.container.base.SlotInputHandler;\n", "import de.srendi.advancedperipherals.common.setup.APContainerTypes;\n...
[ " tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).ifPresent(handler -> {\n", " addSlot(new SlotInputHandler(handler, 0, 79, 29, new SlotCondition().setNeededItem(APItems.MEMORY_CARD.get()))); //Input\n" ]
[ " tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).ifPresent(handler -> {\n", " addSlot(new SlotInputHandler(handler, 0, 79, 29, new SlotCondition().setNeededItem(Items.MEMORY_CARD.get()))); //Input\n" ]
[ " tileEntity.getCapability(ForgeCapabilities.ITEM_HANDLER).ifPresent(handler -> {\n", " addSlot(new SlotInputHandler(handler, 0, 79, 29, new SlotCondition().setNeededItem(Items.MEMORY_CARD.get()))); //Input\n" ]
[ " });\n", " }\n", " }\n", "\n", " @Override\n", " public boolean stillValid(@NotNull Player playerIn) {\n", " return true;\n", " }\n", "\n", " @NotNull\n", " @Override\n", " public ItemStack quickMoveStack(@NotNull Player player, int index) {\n", ...
[ " tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).ifPresent(handler -> {\n", " addSlot(new SlotInputHandler(handler, 0, 79, 29, new SlotCondition().setNeededItem(APItems.MEMORY_CARD.get()))); //Input\n" ]
false
c2120adcddb4f598
[ "A1", "A2" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
abd86a570a543efa9c5184ac2881a383d2fcad8b
4e3f144839066da91b5c1c31e55558e0b1c4d366
e7a68cc5e8c57e8528c881a721def2ae74b32cf2
src/main/java/de/srendi/advancedperipherals/common/data/DataGenerators.java
0
2
[ "package de.srendi.advancedperipherals.common.data;\n", "\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.APRegistration;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Registration;\n" ]
[ "import de.srendi.advancedperipherals.common.setup.Registration;\n" ]
[ "import net.minecraft.Util;\n", "import net.minecraft.core.HolderLookup;\n", "import net.minecraft.data.DataGenerator;\n", "import net.minecraft.data.registries.VanillaRegistries;\n", "import net.minecraftforge.common.data.ExistingFileHelper;\n", "import net.minecraftforge.data.event.GatherDataEvent;\n", ...
[ "import de.srendi.advancedperipherals.common.setup.APRegistration;\n" ]
false
28688e3bd5cbcce7
[ "A1" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
abd86a570a543efa9c5184ac2881a383d2fcad8b
4e3f144839066da91b5c1c31e55558e0b1c4d366
e7a68cc5e8c57e8528c881a721def2ae74b32cf2
src/main/java/de/srendi/advancedperipherals/common/village/VillagerTrades.java
0
7
[ "\n", "import dan200.computercraft.shared.ModRegistry;\n", "import de.srendi.advancedperipherals.AdvancedPeripherals;\n", "import de.srendi.advancedperipherals.common.setup.APBlocks;\n", "import de.srendi.advancedperipherals.common.setup.APItems;\n", "import de.srendi.advancedperipherals.common.setup.APVi...
[ " event.getGenericTrades().add(new VillagerTrade(VillagerTrade.Type.ITEM_FOR_EMERALD).setItem(APBlocks.PERIPHERAL_CASING.get()).setEmeraldPrice(1).setMaxUses(16).setXp(3));\n", "\n", " event.getRareTrades().add(new VillagerTrade(VillagerTrade.Type.EMERALD_FOR_ITEM).setItem(ModRegistry.Blocks.TURTL...
[ " event.getGenericTrades().add(new VillagerTrade(VillagerTrade.Type.ITEM_FOR_EMERALD).setItem(Blocks.PERIPHERAL_CASING.get()).setEmeraldPrice(1).setMaxUses(16).setXp(3));\n", "\n", " event.getRareTrades().add(new VillagerTrade(VillagerTrade.Type.EMERALD_FOR_ITEM).setItem(ModRegistry.Blocks.TURTLE_...
[ " TradeBuilder.createTrade(event, Blocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createTrade(event, ModRegistry.Blocks.TURTLE_ADVANCED.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 2, ...
[ " }\n", "\n", " @SubscribeEvent\n", " public static void registerVillagerTrades(VillagerTradesEvent event) {\n" ]
[ " TradeBuilder.createTrade(event, APBlocks.PERIPHERAL_CASING.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 1, 1)\n", " .setMaxUses(8)\n", " .build();\n", " TradeBuilder.createTrade(event, ModRegistry.Blocks.TURTLE_ADVANCED.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 2...
false
5a17302b17ab3fea
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
abd86a570a543efa9c5184ac2881a383d2fcad8b
4e3f144839066da91b5c1c31e55558e0b1c4d366
e7a68cc5e8c57e8528c881a721def2ae74b32cf2
src/main/java/de/srendi/advancedperipherals/common/village/VillagerTrades.java
1
7
[ " }\n", "\n", " @SubscribeEvent\n", " public static void registerVillagerTrades(VillagerTradesEvent event) {\n" ]
[ " Int2ObjectMap<List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing>> trades = event.getTrades();\n", " if (event.getType() == APVillagers.COMPUTER_SCIENTIST.get()) {\n" ]
[ " Int2ObjectMap<List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing>> trades = event.getTrades();\n", " if (event.getType() == Villagers.COMPUTER_SCIENTIST.get()) {\n" ]
[ " if (event.getType() == Villagers.COMPUTER_SCIENTIST.get()) {\n" ]
[ "\n" ]
[ " if (event.getType() == APVillagers.COMPUTER_SCIENTIST.get()) {\n" ]
false
8262450cf810524c
[ "A2" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
abd86a570a543efa9c5184ac2881a383d2fcad8b
4e3f144839066da91b5c1c31e55558e0b1c4d366
e7a68cc5e8c57e8528c881a721def2ae74b32cf2
src/main/java/de/srendi/advancedperipherals/common/village/VillagerTrades.java
6
7
[ "\n" ]
[ " trades.get(5).add(new VillagerTrade(VillagerTrade.Type.ITEM_FOR_EMERALD).setItem(APBlocks.AR_CONTROLLER.get()).setEmeraldPrice(3).setMaxUses(6).setXp(30));\n", " trades.get(5).add(new VillagerTrade(VillagerTrade.Type.ITEM_FOR_EMERALD).setItem(APItems.SMART_GLASSES.get()).setEmeraldPrice(4)...
[ " trades.get(5).add(new VillagerTrade(VillagerTrade.Type.ITEM_FOR_EMERALD).setItem(Blocks.AR_CONTROLLER.get()).setEmeraldPrice(3).setMaxUses(6).setXp(30));\n", " trades.get(5).add(new VillagerTrade(VillagerTrade.Type.ITEM_FOR_EMERALD).setItem(Items.AR_GOGGLES.get()).setEmeraldPrice(4).setMax...
[ " TradeBuilder.createTrade(event, Blocks.ME_BRIDGE.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 4, 5)\n", " .setItemAmount(2)\n", " .setXp(4)\n", " .build();\n", " TradeBuilder.createTrade(event, ModRegistry.Blocks.SPEAKER.get(), ...
[ "\n", " }\n", " }\n", "\n", "}\n" ]
[ " TradeBuilder.createTrade(event, APBlocks.ME_BRIDGE.get(), VillagerTrade.Type.ITEM_FOR_EMERALD, 4, 5)\n", " .setItemAmount(2)\n", " .setXp(4)\n", " .build();\n", " TradeBuilder.createTrade(event, ModRegistry.Blocks.SPEAKER.get()...
false
7233147700082cec
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
35641caa84803131816a82d2b44d94c183c37902
6ffc93ce87b5addfacfd6cab694555e2fb998d73
ae130887eae4f953336c57cd53d5cb462e4ea71d
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/base/IntegrationPeripheralProvider.java
0
2
[ "package de.srendi.advancedperipherals.common.addons.computercraft.base;\n", "\n", "import com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawersStandard;\n", "import dan200.computercraft.api.peripheral.IPeripheral;\n", "import dan200.computercraft.api.peripheral.IPeripheralProvider;\n", "impo...
[ "import net.minecraft.core.BlockPos;\n", "import net.minecraft.core.Direction;\n", "import net.minecraft.world.level.Level;\n", "import net.minecraft.world.level.block.entity.BlockEntity;\n" ]
[ "import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania.ManaFlowerIntegration;\n", "import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania.ManaPoolIntegration;\n", "import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania...
[ "import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania.ManaFlowerIntegration;\n", "import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania.ManaPoolIntegration;\n", "import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania...
[ "import net.minecraftforge.common.util.LazyOptional;\n", "import org.jetbrains.annotations.NotNull;\n", "\n", "import java.util.ArrayList;\n", "import java.util.List;\n", "\n", "public class IntegrationPeripheralProvider implements IPeripheralProvider {\n", "\n", " public final List<Integration<?...
[ "import net.minecraft.core.BlockPos;\n", "import net.minecraft.core.Direction;\n", "import net.minecraft.world.level.Level;\n", "import net.minecraft.world.level.block.entity.BlockEntity;\n" ]
false
a117c60f479817d6
[ "A1", "A2", "A3", "A4" ]
side A
{ "test_file": false, "benchmark_size": false, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
35641caa84803131816a82d2b44d94c183c37902
6ffc93ce87b5addfacfd6cab694555e2fb998d73
ae130887eae4f953336c57cd53d5cb462e4ea71d
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/base/IntegrationPeripheralProvider.java
1
2
[ "import net.minecraftforge.common.util.LazyOptional;\n", "import org.jetbrains.annotations.NotNull;\n", "\n", "import java.util.ArrayList;\n", "import java.util.List;\n", "\n", "public class IntegrationPeripheralProvider implements IPeripheralProvider {\n", "\n", " public final List<Integration<?...
[]
[ " if (ModList.get().isLoaded(\"mekanismgenerators\")) {\n", " registerIntegration(new FissionIntegration());\n", " registerIntegration(new FusionIntegration());\n", " registerIntegration(new TurbineIntegration());\n", " }\n", " if (ModList.get().isLoad...
[ " if (ModList.get().isLoaded(\"mekanismgenerators\")) {\n", " registerIntegration(new FissionIntegration());\n", " registerIntegration(new FusionIntegration());\n", " registerIntegration(new TurbineIntegration());\n", " }\n", " if (ModList.get().isLoad...
[ " }\n", "\n", " public LazyOptional<IPeripheral> getIntegration(BlockEntity tileEntity) {\n", " for (Integration<?> integration : integrations) {\n", " if (integration.isTileEntity(tileEntity)) {\n", " Integration<?> Integration = integration.getNewInstance();\n", ...
[]
false
3d73b4d89ad102a5
[]
side A
{ "test_file": false, "benchmark_size": false, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
35641caa84803131816a82d2b44d94c183c37902
6ffc93ce87b5addfacfd6cab694555e2fb998d73
ae130887eae4f953336c57cd53d5cb462e4ea71d
src/main/java/de/srendi/advancedperipherals/common/util/InventoryUtil.java
0
1
[ "package de.srendi.advancedperipherals.common.util;\n", "\n" ]
[ "import net.minecraft.world.item.ItemStack;\n" ]
[ "import net.minecraft.item.ItemStack;\n" ]
[ "import dan200.computercraft.api.lua.IArguments;\n", "import dan200.computercraft.api.lua.LuaException;\n", "import dan200.computercraft.api.lua.MethodResult;\n", "import dan200.computercraft.api.peripheral.IComputerAccess;\n", "import dan200.computercraft.api.peripheral.IPeripheral;\n", "import net.minec...
[ "import net.minecraftforge.items.IItemHandler;\n", "import net.minecraftforge.items.ItemHandlerHelper;\n", "import net.minecraftforge.items.wrapper.InvWrapper;\n", "import org.jetbrains.annotations.NotNull;\n", "\n", "import javax.annotation.Nullable;\n", "import java.util.ArrayList;\n", "import java....
[ "import dan200.computercraft.api.lua.IArguments;\n", "import dan200.computercraft.api.lua.LuaException;\n", "import dan200.computercraft.api.lua.MethodResult;\n", "import dan200.computercraft.api.peripheral.IComputerAccess;\n", "import dan200.computercraft.api.peripheral.IPeripheral;\n", "import net.minec...
false
235f9714aebfbc84
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
dedbe134b4d29f4a06b85277c52c77546657d3bd
4036e913fd88aef1606763a61c2f6947a070fa6f
33c4681c983e1d0288fac8e54364bf4636314e84
src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/AppEngApi.java
0
2
[ " if (!(iterator.next().getService(IStorageProvider.class) instanceof DriveBlockEntity entity))\n", " continue;\n", "\n", " InternalInventory inventory = entity.getInternalInventory();\n", "\n", " for (int i = 0; i < inventory.size(); i++) {\n", " ...
[ " total += superStorageCell.getKiloBytes() * 1024L;\n", " } else if (APAddons.aeAdditionsLoaded && (stack.getItem() instanceof StorageCell storageCell)) {\n", " if (storageCell.getKeyType() != AEKeyType.items())\n", " continue;\n", ...
[ " total += superStorageCell.getKiloBytes() * 1024;\n" ]
[ " total += superStorageCell.getKiloBytes() * 1024;\n", " } else if (APAddons.aeAdditionsLoaded && (stack.getItem() instanceof StorageCell storageCell)) {\n", " if (storageCell.getKeyType() != AEKeyType.items())\n", " continue;\n", "...
[ " }\n", " }\n", " }\n", "\n", " iterator = node.getGrid().getMachineNodes(StorageBusPart.class).iterator();\n", "\n", " while (iterator.hasNext()) {\n", " StorageBusPart bus = (StorageBusPart) iterator.next().getService(IStorageProvider.class);...
[ " total += superStorageCell.getKiloBytes() * 1024L;\n", " } else if (APAddons.aeAdditionsLoaded && (stack.getItem() instanceof StorageCell storageCell)) {\n", " if (storageCell.getKeyType() != AEKeyType.items())\n", " continue;\n", ...
false
9c6540f0cd622f7d
[ "A1", "A2", "A3", "A4", "A5", "B2", "B3", "B4", "B5" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
dedbe134b4d29f4a06b85277c52c77546657d3bd
4036e913fd88aef1606763a61c2f6947a070fa6f
33c4681c983e1d0288fac8e54364bf4636314e84
src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/AppEngApi.java
1
2
[ "\n", " Iterator<IGridNode> iterator = node.getGrid().getNodes().iterator();\n", "\n", " while (iterator.hasNext()) {\n", " if (!(iterator.next().getService(IStorageProvider.class) instanceof DriveBlockEntity entity))\n", " continue;\n", "\n", " Inter...
[ " total += superStorageCell.getKiloBytes() * 1024L;\n", " } else if (APAddons.aeAdditionsLoaded && (stack.getItem() instanceof StorageCell storageCell)) {\n", " if (storageCell.getKeyType() != AEKeyType.fluids())\n", " continue;\n", ...
[ " total += superStorageCell.getKiloBytes() * 1024;\n" ]
[ " total += superStorageCell.getKiloBytes() * 1024;\n", " } else if (APAddons.aeAdditionsLoaded && (stack.getItem() instanceof StorageCell storageCell)) {\n", " if (storageCell.getKeyType() != AEKeyType.fluids())\n", " continue;\n", ...
[ " }\n", " }\n", " }\n", "\n", " iterator = node.getGrid().getMachineNodes(StorageBusPart.class).iterator();\n", "\n", " while (iterator.hasNext()) {\n", " StorageBusPart bus = (StorageBusPart) iterator.next().getService(IStorageProvider.class);...
[ " total += superStorageCell.getKiloBytes() * 1024L;\n", " } else if (APAddons.aeAdditionsLoaded && (stack.getItem() instanceof StorageCell storageCell)) {\n", " if (storageCell.getKeyType() != AEKeyType.fluids())\n", " continue;\n", ...
false
9e3654f14a054b42
[ "A1", "A2", "A3", "A4", "A5", "B2", "B3", "B4", "B5" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
238becfa2fd6de0d0da102d69d2deedd80b0a653
bc3b6838246dbaefe4c155c2b571159a6afcce75
6c263cfbbaf6949bc2c41b326796b252cc647fdf
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MEBridgePeripheral.java
0
7
[ "package de.srendi.advancedperipherals.common.addons.computercraft.peripheral;\n", "\n", "import appeng.api.crafting.IPatternDetails;\n", "import appeng.api.networking.IGridNode;\n", "import appeng.api.networking.IManagedGridNode;\n", "import appeng.api.networking.crafting.ICraftingCPU;\n", "import appe...
[ "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MeChemicalHandler;\n", "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MeFluidHandler;\n", "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MeItemHandler;\n" ]
[ "import de.srendi.advancedperipherals.common.addons.appliedenergistics.CraftJob;\n", "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MeFluidHandler;\n", "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MeItemHandler;\n" ]
[ "import de.srendi.advancedperipherals.common.addons.appliedenergistics.CraftJob;\n", "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MEFluidHandler;\n", "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MEItemHandler;\n" ]
[ "import de.srendi.advancedperipherals.common.addons.computercraft.owner.BlockEntityPeripheralOwner;\n", "import de.srendi.advancedperipherals.common.blocks.blockentities.MEBridgeEntity;\n", "import de.srendi.advancedperipherals.common.configuration.APConfig;\n", "import de.srendi.advancedperipherals.common.ut...
[ "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MeChemicalHandler;\n", "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MEFluidHandler;\n", "import de.srendi.advancedperipherals.common.addons.appliedenergistics.MEItemHandler;\n" ]
false
aa696c6c4c7db85e
[ "A1", "B2", "B3" ]
mix of lines
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
238becfa2fd6de0d0da102d69d2deedd80b0a653
bc3b6838246dbaefe4c155c2b571159a6afcce75
6c263cfbbaf6949bc2c41b326796b252cc647fdf
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MEBridgePeripheral.java
2
7
[ "\n" ]
[ " public static final String PERIPHERAL_TYPE = \"me_bridge\";\n", "\n", " private final MeBridgeEntity bridge;\n" ]
[ " public static final String PERIPHERAL_TYPE = \"meBridge\";\n", " private final MeBridgeEntity tile;\n" ]
[ " public static final String PERIPHERAL_TYPE = \"meBridge\";\n", " private final MEBridgeEntity tile;\n" ]
[ " private IGridNode node;\n", "\n", " public MEBridgePeripheral(MEBridgeEntity tileEntity) {\n", " super(PERIPHERAL_TYPE, new BlockEntityPeripheralOwner<>(tileEntity));\n", " this.bridge = tileEntity;\n", " this.node = tileEntity.getActionableNode();\n", " }\n", "\n", "...
[ " private final MEBridgeEntity bridge;\n" ]
false
a9388cb3d0fccf65
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
238becfa2fd6de0d0da102d69d2deedd80b0a653
bc3b6838246dbaefe4c155c2b571159a6afcce75
6c263cfbbaf6949bc2c41b326796b252cc647fdf
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MEBridgePeripheral.java
3
7
[ " }\n", "\n", " @Override\n", " public boolean isEnabled() {\n", " return APConfig.PERIPHERALS_CONFIG.enableMEBridge.get();\n", " }\n", "\n", " private ICraftingService getCraftingService() {\n", " return node.getGrid().getCraftingService();\n", " }\n", "\n", " ...
[ " MeItemHandler itemHandler = new MeItemHandler(monitor, bridge);\n" ]
[ " MeItemHandler itemHandler = new MeItemHandler(monitor, tile);\n" ]
[ " MEItemHandler itemHandler = new MEItemHandler(monitor, tile);\n" ]
[ " Pair<ItemFilter, String> filter = ItemFilter.parse(arguments.getTable(0));\n", "\n", " if (filter.rightPresent())\n", " return MethodResult.of(0, filter.getRight());\n", "\n", " return MethodResult.of(InventoryUtil.moveItem(itemHandler, targetInventory, filter.getLeft()),...
[ " MEItemHandler itemHandler = new MEItemHandler(monitor, bridge);\n" ]
false
62676c5dfd5c1143
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
238becfa2fd6de0d0da102d69d2deedd80b0a653
bc3b6838246dbaefe4c155c2b571159a6afcce75
6c263cfbbaf6949bc2c41b326796b252cc647fdf
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MEBridgePeripheral.java
4
7
[ " Pair<ItemFilter, String> filter = ItemFilter.parse(arguments.getTable(0));\n", "\n", " if (filter.rightPresent())\n", " return MethodResult.of(0, filter.getRight());\n", "\n", " return MethodResult.of(InventoryUtil.moveItem(itemHandler, targetInventory, filter.getLeft()),...
[ " MeFluidHandler fluidHandler = new MeFluidHandler(monitor, bridge);\n" ]
[ " MeFluidHandler fluidHandler = new MeFluidHandler(monitor, tile);\n" ]
[ " MEFluidHandler fluidHandler = new MEFluidHandler(monitor, tile);\n" ]
[ " Pair<FluidFilter, String> filter = FluidFilter.parse(arguments.getTable(0));\n", "\n", " if (filter.rightPresent())\n", " return MethodResult.of(0, filter.getRight());\n", "\n", " return MethodResult.of(FluidUtil.moveFluid(fluidHandler, targetTank, filter.getLeft()), null...
[ " MEFluidHandler fluidHandler = new MEFluidHandler(monitor, bridge);\n" ]
false
f2bff2977eea92e9
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
238becfa2fd6de0d0da102d69d2deedd80b0a653
bc3b6838246dbaefe4c155c2b571159a6afcce75
6c263cfbbaf6949bc2c41b326796b252cc647fdf
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MEBridgePeripheral.java
5
7
[ " protected MethodResult exportToTank(@NotNull IArguments arguments, IChemicalHandler targetTank) throws LuaException {\n", " MEStorage monitor = AppEngApi.getMonitor(node);\n", " MeChemicalHandler chemicalHandler = new MeChemicalHandler(monitor, bridge);\n", " Pair<ChemicalFilter, Str...
[ " MeItemHandler itemHandler = new MeItemHandler(monitor, bridge);\n" ]
[ " MeItemHandler itemHandler = new MeItemHandler(monitor, tile);\n" ]
[ " MEItemHandler itemHandler = new MEItemHandler(monitor, tile);\n" ]
[ " Pair<ItemFilter, String> filter = ItemFilter.parse(arguments.getTable(0));\n", "\n", " if (filter.rightPresent())\n", " return MethodResult.of(0, filter.getRight());\n", "\n", " return MethodResult.of(InventoryUtil.moveItem(targetInventory, itemHandler, filter.getLeft()),...
[ " MEItemHandler itemHandler = new MEItemHandler(monitor, bridge);\n" ]
false
5f427066e33ba16e
null
needs new code
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0
IntelligenceModding/AdvancedPeripherals
cd829da8a04f703111b6c029a37ebe72c7fdeb56
238becfa2fd6de0d0da102d69d2deedd80b0a653
8b40bd0f6b01324f4d00a05657b1f7d3ac599b33
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MEBridgePeripheral.java
0
1
[ "import de.srendi.advancedperipherals.common.util.inventory.IStorageSystemPeripheral;\n", "import de.srendi.advancedperipherals.common.util.inventory.InventoryUtil;\n", "import de.srendi.advancedperipherals.common.util.inventory.ItemFilter;\n", "import de.srendi.advancedperipherals.lib.peripherals.BasePeriphe...
[ "\n", " private final MEBridgeEntity bridge;\n" ]
[ " public static final String PERIPHERAL_TYPE = \"meBridge\";\n", " private final MEBridgeEntity tile;\n" ]
[ " private final MEBridgeEntity tile;\n" ]
[ " private IGridNode node;\n", "\n", " public MEBridgePeripheral(MEBridgeEntity tileEntity) {\n", " super(PERIPHERAL_TYPE, new BlockEntityPeripheralOwner<>(tileEntity));\n", " this.bridge = tileEntity;\n", " this.node = tileEntity.getActionableNode();\n", " }\n", "\n", "...
[ "\n", " private final MEBridgeEntity bridge;\n" ]
false
dbd8421dcff2e090
[ "A1", "A2" ]
side A
{ "test_file": false, "benchmark_size": true, "sides_differ_only_in_spacing": false }
Apache-2.0