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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
IntelligenceModding/AdvancedPeripherals | ddb797bc305a766a0ceb2d51a2a58c06fc43a29b | 837b532b1e16f82b54fcd9fb2a6107a44bd674ae | 494a7a4b3542d0438cdddca57aba1cd5a78ec8d0 | src/main/java/de/srendi/advancedperipherals/common/addons/create/BasinIntegration.java | 0 | 1 | [
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public final List<Object> getOutputFluids() {\n",
" List<Object> tanks = new ArrayList<>();\n",
" for (SmartFluidTankBehaviour.TankSegment tank : blockEntity.getTanks().getSecond().getTanks()) {\n",
" Map<String, Obj... | [
" public final Object[] getInventory() {\n",
" Optional<IItemHandler> handlerOptional = blockEntity.getCapability(ForgeCapabilities.ITEM_HANDLER).resolve();\n"
] | [
" public final Object[] getInventory() {\n",
" Optional<IItemHandler> handlerOptional = blockEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).resolve();\n"
] | [
" public final List<Object> getInventory() {\n",
" Optional<IItemHandler> handlerOptional = blockEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).resolve();\n"
] | [
" if (handlerOptional.isEmpty()) return null;\n",
" IItemHandler handler = handlerOptional.get();\n",
" List<Object> items = new ArrayList<>();\n",
" for (int slot = 0; slot < handler.getSlots(); slot++) {\n",
" items.add(LuaConverter.stackToObject(handler.getStackInSl... | [
" public final List<Object> getInventory() {\n",
" Optional<IItemHandler> handlerOptional = blockEntity.getCapability(ForgeCapabilities.ITEM_HANDLER).resolve();\n"
] | false | 70733a4f099c4c18 | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 32ad04021f58df5513fb9f4c4e3d7edfe971d59f | 3a2a71aeb83c8a2f5c3b07374332b23e92f3f3c4 | 091f258f82db0728a87663150b306e15fdbe0320 | src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RefinedStorage.java | 0 | 1 | [
" }\n",
" }\n",
"\n",
" return ItemStack.EMPTY;\n",
" }\n",
"\n",
" public static FluidStack findFluidFromStack(INetwork network, ICraftingManager crafting, FluidStack stack) {\n",
" return findFluidFromFilter(network, crafting, FluidFilter.fromStack(stack));\n",
... | [
" Optional<FluidStack> stack = pattern.getFluidOutputs().stream().filter(filter::test).findFirst();\n",
" if (stack.isPresent())\n",
" return stack.get().copy();\n"
] | [
" if (pattern.getFluidOutputs().stream().anyMatch(filter::test))\n",
" return pattern.getFluidOutputs().stream().filter(filter::test).findFirst().get().copy();\n"
] | [
" if (pattern.getFluidOutputs().stream().anyMatch(filter::test))\n",
" return pattern.getFluidOutputs().stream().filter(filter::test).findFirst().orElse(FluidStack.EMPTY).copy();\n"
] | [
" }\n",
"\n",
" return FluidStack.EMPTY;\n",
" }\n",
"\n",
" public static Object listFluids(INetwork network) {\n",
" List<Object> fluids = new ArrayList<>();\n",
" getFluids(network).forEach(item -> fluids.add(getObjectFromFluid(item, network)));\n",
" retu... | [
" if (pattern.getFluidOutputs().stream().anyMatch(filter::test))\n",
" return pattern.getFluidOutputs().stream().filter(filter::test).findFirst().orElse(FluidStack.EMPTY).copy();\n"
] | false | d2f3ef0b63bdfcc4 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 32ad04021f58df5513fb9f4c4e3d7edfe971d59f | 3a2a71aeb83c8a2f5c3b07374332b23e92f3f3c4 | 091f258f82db0728a87663150b306e15fdbe0320 | src/main/java/de/srendi/advancedperipherals/common/events/Events.java | 0 | 1 | [
" if (context != null && context.getNodes() != null && !context.getNodes().isEmpty()) {\n",
" return context.getNodes().get(0).getNode().getName();\n",
" }\n",
" return \"\";\n",
" }\n",
"\n",
" @SubscribeEvent\n",
" public static void onChatBox(ServerChatEvent... | [] | [
" @SubscribeEvent\n",
" public static void onEquipmentChange(LivingEquipmentChangeEvent event) {\n",
" LivingEntity livingEntity = event.getEntity();\n",
" if (!(livingEntity instanceof ServerPlayer serverPlayer)) return;\n",
" if (event.getFrom().getItem() instanceof ARGogglesIte... | [
" @SubscribeEvent\n",
" public static void onEquipmentChange(LivingEquipmentChangeEvent event) {\n",
" LivingEntity livingEntity = event.getEntity();\n",
" if (!(livingEntity instanceof ServerPlayer serverPlayer))\n",
" return;\n",
" if (event.getFrom().getItem() inst... | [
" public static synchronized void putChatMessage(Pair<Long, ChatMessageObject> message) {\n",
" messageQueue.add(message);\n",
" lastChatMessageID++;\n",
" }\n",
"\n",
" public static synchronized void putPlayerMessage(Pair<Long, PlayerMessageObject> message) {\n",
" player... | [] | false | 99413774daef9e21 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 32ad04021f58df5513fb9f4c4e3d7edfe971d59f | 3a2a71aeb83c8a2f5c3b07374332b23e92f3f3c4 | 091f258f82db0728a87663150b306e15fdbe0320 | src/main/java/de/srendi/advancedperipherals/common/util/CoordUtil.java | 0 | 3 | [
"package de.srendi.advancedperipherals.common.util;\n",
"\n",
"import dan200.computercraft.api.lua.LuaException;\n",
"import dan200.computercraft.core.computer.ComputerSide;\n",
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.core.Direction;\n",
"import net.minecraft.core.FrontAndTop;\n",... | [
" public static boolean isInRange(@Nullable BlockPos pos, @Nullable Level world, @Nullable Player player, int range) {\n",
" // There are rare cases where these can be null. For example if a player detector pocket computer runs while not in a player inventory\n"
] | [
" public static boolean isInRange(@Nullable BlockPos pos, @Nullable Level world, @Nullable Player player, int range) {\n",
" // There are rare cases where these are null. For example if a player detector pocket computer runs while not in a player inventory\n"
] | [
" public static boolean isInRange(@Nullable BlockPos pos, @Nullable Level world, @Nullable Player player, int range, int maxRange) {\n",
" // There are rare cases where these are null. For example if a player detector pocket computer runs while not in a player inventory\n"
] | [
" // Fixes https://github.com/SirEndii/AdvancedPeripherals/issues/356\n",
" if (pos == null || world == null || player == null)\n",
" return false;\n",
"\n"
] | [
" public static boolean isInRange(@Nullable BlockPos pos, @Nullable Level world, @Nullable Player player, int range, int maxRange) {\n",
" // There are rare cases where these can be null. For example if a player detector pocket computer runs while not in a player inventory\n"
] | false | 1e99c9fe73f27827 | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 32ad04021f58df5513fb9f4c4e3d7edfe971d59f | 3a2a71aeb83c8a2f5c3b07374332b23e92f3f3c4 | 091f258f82db0728a87663150b306e15fdbe0320 | src/main/java/de/srendi/advancedperipherals/common/util/CoordUtil.java | 1 | 3 | [
" // Fixes https://github.com/SirEndii/AdvancedPeripherals/issues/356\n",
" if (pos == null || world == null || player == null)\n",
" return false;\n",
"\n"
] | [
" range = Math.min(Math.abs(range), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n",
" return isPlayerInBlockRange(pos, world, player, range);\n"
] | [
" range = Math.min(Math.abs(range), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n",
" return isPlayerInBlockRange(pos, world, player, (double) range);\n"
] | [
" range = maxRange == -1 ? range : Math.min(Math.abs(range), maxRange);\n",
" return isPlayerInBlockRange(pos, world, player, (double) range);\n"
] | [
" }\n",
"\n",
" // To fix issue #439\n",
" private static boolean isPlayerInBlockRange(@NotNull BlockPos pos, @NotNull Level world, @NotNull Player player, double range) {\n",
" if (range != -1 && player.getLevel() != world)\n",
" return false;\n",
"\n",
" double x = ... | [
" range = maxRange == -1 ? range : Math.min(Math.abs(range), maxRange);\n",
" return isPlayerInBlockRange(pos, world, player, (double) range);\n"
] | false | e3993ddbd9f2b93c | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 32ad04021f58df5513fb9f4c4e3d7edfe971d59f | 3a2a71aeb83c8a2f5c3b07374332b23e92f3f3c4 | 091f258f82db0728a87663150b306e15fdbe0320 | src/main/java/de/srendi/advancedperipherals/common/util/CoordUtil.java | 2 | 3 | [
" if (range != -1 && player.getLevel() != world)\n",
" 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",
"... | [
" x = Math.min(Math.abs(x), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n",
" y = Math.min(Math.abs(y), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n",
" z = Math.min(Math.abs(z), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n",
" return isPlayerInBlock... | [
" x = Math.min(Math.abs(x), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n",
" y = Math.min(Math.abs(y), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n",
" z = Math.min(Math.abs(z), APConfig.PERIPHERALS_CONFIG.playerDetMaxRange.get());\n",
" return isPlayerInBlock... | [
" x = Math.min(Math.abs(x), maxRange != -1 ? maxRange : Integer.MAX_VALUE);\n",
" y = Math.min(Math.abs(y), maxRange != -1 ? maxRange : Integer.MAX_VALUE);\n",
" z = Math.min(Math.abs(z), maxRange != -1 ? maxRange : Integer.MAX_VALUE);\n",
" return isPlayerInBlockRangeXYZ(pos, worl... | [
" }\n",
"\n",
" private static boolean isPlayerInBlockRangeXYZ(@NotNull BlockPos pos, @NotNull Level world, @NotNull Player player, double dx, double dy, double dz, int maxRange) {\n",
" if (maxRange != -1 && player.getLevel() != world)\n",
" return false;\n",
"\n",
" doub... | [
" x = Math.min(Math.abs(x), maxRange != -1 ? maxRange : Integer.MAX_VALUE);\n",
" y = Math.min(Math.abs(y), maxRange != -1 ? maxRange : Integer.MAX_VALUE);\n",
" z = Math.min(Math.abs(z), maxRange != -1 ? maxRange : Integer.MAX_VALUE);\n",
" return isPlayerInBlockRangeXYZ(pos, worl... | false | 8b26d7b61db20cbe | [
"B1",
"B2",
"B3",
"B4"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | b61dd919779c9c377fc7a91d05dd8f736bb7356e | d5d2ee1f8ff21bf7ffe8cb8bd94ce63389cf80cc | fb50e9be63a833da8d6f2a8054a6b9e4ad4fad7b | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/turtles/TurtleChatBoxUpgrade.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.turtles;\n",
"\n",
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n",
"import dan200.computercraft.shared.computer.core.ServerComputer;\n"
] | [
"import dan200.computercraft.shared.turtle.blocks.TurtleBlockEntity;\n"
] | [
"\n",
"import dan200.computercraft.shared.turtle.blocks.TileTurtle;\n"
] | [
"import dan200.computercraft.shared.turtle.blocks.TileTurtle;\n"
] | [
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.peripheral.ChatBoxPeripheral;\n",
"import de.srendi.advancedperipherals.common.events.Events;\n",
"import de.srendi.advancedperipherals.lib.turtle.PeripheralTurtleUpgrade;\n",
"im... | [
"import dan200.computercraft.shared.turtle.blocks.TurtleBlockEntity;\n"
] | false | d4adbb503193c82f | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | b61dd919779c9c377fc7a91d05dd8f736bb7356e | d5d2ee1f8ff21bf7ffe8cb8bd94ce63389cf80cc | fb50e9be63a833da8d6f2a8054a6b9e4ad4fad7b | src/main/java/de/srendi/advancedperipherals/common/util/CoordUtil.java | 0 | 2 | [
"import net.minecraft.world.phys.AABB;\n",
"import org.jetbrains.annotations.NotNull;\n",
"import org.jetbrains.annotations.Nullable;\n",
"\n",
"import java.util.Locale;\n",
"\n",
"public class CoordUtil {\n",
"\n",
" public static boolean isInRange(@Nullable BlockPos pos, @Nullable Level world, ... | [
" if (player.level() != world)\n"
] | [
" if (player.getLevel() != world)\n"
] | [
" if (range != -1 && player.getLevel() != world)\n"
] | [
" 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",
... | [
" if (range != -1 && player.getLevel() != world)\n"
] | false | 7fe52c15926e06c0 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | b61dd919779c9c377fc7a91d05dd8f736bb7356e | d5d2ee1f8ff21bf7ffe8cb8bd94ce63389cf80cc | fb50e9be63a833da8d6f2a8054a6b9e4ad4fad7b | src/main/java/de/srendi/advancedperipherals/common/util/CoordUtil.java | 1 | 2 | [
" ey = y;\n",
" y = tmp;\n",
" }\n",
" double bx = (double)(pos.getX() + 0.5), by = (double)(pos.getY() + 0.5), bz = (double)(pos.getZ() + 0.5);\n",
" return Math.abs(x - bx) <= range && Math.abs(z - bz) <= range &&\n",
" // check both feet position an... | [
" private static boolean isPlayerInBlockRangeXYZ(@NotNull BlockPos pos, @NotNull Level world, @NotNull Player player, double dx, double dy, double dz) {\n",
" if (player.level() != world)\n"
] | [
" private static boolean isPlayerInBlockRangeXYZ(@NotNull BlockPos pos, @NotNull Level world, @NotNull Player player, double dx, double dy, double dz) {\n",
" if (player.getLevel() != world)\n"
] | [
" private static boolean isPlayerInBlockRangeXYZ(@NotNull BlockPos pos, @NotNull Level world, @NotNull Player player, double dx, double dy, double dz, int maxRange) {\n",
" if (maxRange != -1 && player.getLevel() != world)\n"
] | [
" return false;\n",
"\n",
" double x = player.getX(), y = player.getY(), ey = player.getEyeY(), z = player.getZ();\n",
" if (ey > y) {\n",
" double tmp = ey;\n",
" ey = y;\n",
" y = tmp;\n",
" }\n",
" double bx = (double)(pos.ge... | [
" private static boolean isPlayerInBlockRangeXYZ(@NotNull BlockPos pos, @NotNull Level world, @NotNull Player player, double dx, double dy, double dz, int maxRange) {\n",
" if (maxRange != -1 && player.level() != world)\n"
] | false | 19180d391599fdc9 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | b61dd919779c9c377fc7a91d05dd8f736bb7356e | d5d2ee1f8ff21bf7ffe8cb8bd94ce63389cf80cc | fb50e9be63a833da8d6f2a8054a6b9e4ad4fad7b | src/main/java/de/srendi/advancedperipherals/common/village/VillageStructures.java | 0 | 1 | [
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperipherals.common.configuration.APConfig;\n",
"import net.minecraft.core.Holder;\n",
"import net.minecraft.core.Registry;\n",
"import net.minecraft.core.registries.Registries;\n",
"import net.minecraft.resources.Reso... | [
" private static void addPieceToPool(Registry<StructureTemplatePool> templatePoolRegistry, Holder<StructureProcessorList> emptyProcessor, ResourceLocation poolRL, String nbtPieceRL, StructureTemplatePool.Projection projection, int weight) {\n",
" // Grab the pool we want to add to\n",
" Structu... | [
" public static void init() {\n",
" if (!APConfig.WORLD_CONFIG.enableVillagerStructures.get()) return;\n",
" //Ensure the vanilla static init is done\n",
" PlainVillagePools.bootstrap();\n",
" SavannaVillagePools.bootstrap();\n",
" TaigaVillagePools.bootstrap();\n",
... | [
" public static void init() {\n",
" if (!APConfig.WORLD_CONFIG.enableVillagerStructures.get())\n",
" return;\n",
" //Ensure the vanilla static init is done\n",
" PlainVillagePools.bootstrap();\n",
" SavannaVillagePools.bootstrap();\n",
" TaigaVillagePools... | [
" }\n",
"\n",
" // This list of pairs of pieces and weights is not used by vanilla by default but another mod may need it for efficiency.\n",
" // So let's add to this list for completeness. We need to make a copy of the array as it can be an immutable list.\n",
" List<Pair<Struc... | [
" private static void addPieceToPool(Registry<StructureTemplatePool> templatePoolRegistry, Holder<StructureProcessorList> emptyProcessor, ResourceLocation poolRL, String nbtPieceRL, StructureTemplatePool.Projection projection, int weight) {\n",
" // Grab the pool we want to add to\n",
" Structu... | false | ad4b395047c3a744 | [
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9",
"A10",
"A11",
"A12",
"A13",
"A14",
"A15"
] | side A | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | f1b44b0933cce3a333adedc93e137a1b1c5901ef | 318aea26363818996482e1a96fca9ab5a6f6e26b | 72af84b61fb4bffd65aea343abb7ec6143416feb | src/main/java/de/srendi/advancedperipherals/common/data/DataGenerators.java | 0 | 1 | [
"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 net.minecraftforge.eventbus.api.SubscribeEvent;\n",
"import net.minec... | [
" CompletableFuture<HolderLookup.Provider> completablefuture = CompletableFuture.supplyAsync(VanillaRegistries::createLookup, Util.backgroundExecutor());\n",
" generator.addProvider(event.includeServer(), new BlockTagsProvider(generator.getPackOutput(), completablefuture, existingFileHelper, Registr... | [
" generator.addProvider(new BlockTagsProvider(generator, existingFileHelper, Registration.BLOCKS));\n",
" generator.addProvider(new RecipesProvider(generator));\n",
" generator.addProvider(new BlockLootTablesProvider(generator));\n",
" generator.addProvider(new TurtleUpgradesProvid... | [
" generator.addProvider(new BlockTagsProvider(generator, existingFileHelper, Registration.BLOCKS));\n",
" generator.addProvider(new RecipesProvider(generator));\n",
" generator.addProvider(new BlockLootTablesProvider(generator));\n",
" generator.addProvider(new TurtleUpgradesProvid... | [
" }\n",
"\n",
"}\n"
] | [
" CompletableFuture<HolderLookup.Provider> completablefuture = CompletableFuture.supplyAsync(VanillaRegistries::createLookup, Util.backgroundExecutor());\n",
" generator.addProvider(event.includeServer(), new BlockTagsProvider(generator.getPackOutput(), completablefuture, existingFileHelper, Registr... | false | d854843739f0ae69 | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | f1b44b0933cce3a333adedc93e137a1b1c5901ef | 318aea26363818996482e1a96fca9ab5a6f6e26b | 72af84b61fb4bffd65aea343abb7ec6143416feb | src/main/java/de/srendi/advancedperipherals/common/data/RecipesProvider.java | 0 | 21 | [
"import com.refinedmods.refinedstorage.RSItems;\n",
"import dan200.computercraft.shared.ModRegistry;\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperipherals.common.setup.Blocks;\n",
"import de.srendi.advancedperipherals.common.util.RawValue;\n",
"import net... | [
"import net.minecraftforge.common.crafting.ConditionalRecipe;\n",
"import net.minecraftforge.common.crafting.StrictNBTIngredient;\n"
] | [] | [
"import net.minecraftforge.common.crafting.NBTIngredient;\n"
] | [
"import net.minecraftforge.common.crafting.conditions.IConditionBuilder;\n",
"import org.jetbrains.annotations.NotNull;\n",
"\n",
"import java.util.function.Consumer;\n",
"import java.util.stream.Stream;\n",
"\n",
"public class RecipesProvider extends RecipeProvider implements IConditionBuilder {\n",
... | [
"import net.minecraftforge.common.crafting.ConditionalRecipe;\n",
"import net.minecraftforge.common.crafting.StrictNBTIngredient;\n"
] | false | 286651ccbfdd9313 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | f1b44b0933cce3a333adedc93e137a1b1c5901ef | 318aea26363818996482e1a96fca9ab5a6f6e26b | 72af84b61fb4bffd65aea343abb7ec6143416feb | src/main/java/de/srendi/advancedperipherals/common/data/RecipesProvider.java | 1 | 21 | [
"import net.minecraftforge.common.crafting.conditions.IConditionBuilder;\n",
"import org.jetbrains.annotations.NotNull;\n",
"\n",
"import java.util.function.Consumer;\n",
"import java.util.stream.Stream;\n",
"\n",
"public class RecipesProvider extends RecipeProvider implements IConditionBuilder {\n",
... | [
" protected void buildRecipes(@NotNull Consumer<FinishedRecipe> consumer) {\n",
" ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.AR_CONTROLLER.get()).define('E', Tags.Items.ENDER_PEARLS).define('C', CASING).define('G', Items.SMOOTH_STONE).pattern(\"GEG\").pattern(\"ECE\").pattern(\"GEG\").un... | [
" protected void buildCraftingRecipes(@NotNull Consumer<FinishedRecipe> consumer) {\n",
" ShapedRecipeBuilder.shaped(Blocks.AR_CONTROLLER.get())\n",
" .define('E', Tags.Items.ENDER_PEARLS)\n",
" .define('C', CASING)\n",
" .define('G', Items.SMOOTH_STONE... | [
" protected void buildCraftingRecipes(@NotNull Consumer<FinishedRecipe> consumer) {\n",
" ShapedRecipeBuilder.shaped(Blocks.AR_CONTROLLER.get())\n",
" .define('E', Tags.Items.ENDER_PEARLS)\n",
" .define('C', CASING)\n",
" .define('G', Items.SMOOTH_STONE... | [
"\n"
] | [
" protected void buildRecipes(@NotNull Consumer<FinishedRecipe> consumer) {\n",
" ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.AR_CONTROLLER.get()).define('E', Tags.Items.ENDER_PEARLS).define('C', CASING).define('G', Items.SMOOTH_STONE).pattern(\"GEG\").pattern(\"ECE\").pattern(\"GEG\").un... | false | a9c7326956f4ab63 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | f1b44b0933cce3a333adedc93e137a1b1c5901ef | 318aea26363818996482e1a96fca9ab5a6f6e26b | 72af84b61fb4bffd65aea343abb7ec6143416feb | src/main/java/de/srendi/advancedperipherals/common/data/RecipesProvider.java | 20 | 21 | [
" }\n"
] | [
"\n"
] | [
"\n",
" public static class NBTIngredient extends net.minecraftforge.common.crafting.NBTIngredient {\n",
" public NBTIngredient(ItemStack stack) {\n",
" super(stack);\n",
" }\n",
" }\n"
] | [] | [
"}\n"
] | [
"\n"
] | false | 29606cf8f8e4d3b0 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 884d73876c5b47cd5feec932636494410559791f | b4361838b3e46fc76883b0d9db0a5a3e047a4d37 | 057fdb935985520381a2ef88d7db251a43ed24ce | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/EnvironmentDetectorPeripheral.java | 1 | 3 | [
" } else {\n",
" //Yay, easter egg\n",
" //Returns when the function is not used in the overworld\n",
" moon.put(0, \"Moon.exe not found...\");\n",
" }\n",
" return moon;\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public... | [
" return getLevel().getThunderLevel(0) < 1 && getLevel().getRainLevel(0) < 1;\n",
" }\n",
"\n",
" @LuaFunction\n"
] | [
" return getWorld().getThunderLevel(0) < 1 && getWorld().getRainLevel(0) < 1;\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public final Object getRadiation() {\n",
" return ModList.get().isLoaded(\"mekanism\") ? Mekanism.getRadiation(getWorld(), getPos()) : null;\n",
... | [
" return getWorld().getThunderLevel(0) < 1 && getWorld().getRainLevel(0) < 1;\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n"
] | [
" public final MethodResult scanEntities(@Nonnull IComputerAccess access, @Nonnull IArguments arguments) throws LuaException {\n",
" int radius = arguments.getInt(0);\n",
" return withOperation(SCAN_ENTITIES, new SphereOperationContext(radius), context -> {\n",
" if (radius > SCAN... | [
" return getLevel().getThunderLevel(0) < 1 && getLevel().getRainLevel(0) < 1;\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n"
] | false | eaa0c86ad4de8ef3 | [
"A1",
"A2",
"A3",
"B4"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 884d73876c5b47cd5feec932636494410559791f | b4361838b3e46fc76883b0d9db0a5a3e047a4d37 | 057fdb935985520381a2ef88d7db251a43ed24ce | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/InventoryManagerPeripheral.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.peripheral;\n",
"\n",
"import dan200.computercraft.api.lua.LuaException;\n",
"import dan200.computercraft.api.lua.LuaFunction;\n",
"import dan200.computercraft.shared.util.NBTUtil;\n",
"import de.srendi.advancedperipherals.common.blocks.ti... | [
"import net.minecraft.core.Direction;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.world.entity.player.Inventory;\n",
"import net.minecraft.world.entity.player.Player;\n",
"import net.minecraft.world.item.Item;\n",
"import net.minecraft.world.item.ItemStack;\n",
"import net.minec... | [
"import net.minecraft.entity.player.PlayerEntity;\n",
"import net.minecraft.entity.player.PlayerInventory;\n",
"import net.minecraft.item.Item;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.nbt.CompoundNBT;\n",
"import net.minecraft.tileentity.TileEntity;\n",
"import net.minecraft.... | [
"import de.srendi.advancedperipherals.lib.peripherals.BasePeripheral;\n",
"import de.srendi.advancedperipherals.lib.peripherals.owner.TileEntityPeripheralOwner;\n",
"import net.minecraft.entity.player.PlayerEntity;\n",
"import net.minecraft.entity.player.PlayerInventory;\n",
"import net.minecraft.item.Item;... | [
"import net.minecraftforge.items.CapabilityItemHandler;\n",
"import net.minecraftforge.items.IItemHandler;\n",
"import net.minecraftforge.registries.ForgeRegistries;\n",
"\n",
"import java.util.HashMap;\n",
"import java.util.Map;\n",
"import java.util.Optional;\n",
"\n",
"public class InventoryManag... | [
"import de.srendi.advancedperipherals.lib.peripherals.BasePeripheral;\n",
"import de.srendi.advancedperipherals.lib.peripherals.owner.BlockEntityPeripheralOwner;\n",
"import net.minecraft.core.Direction;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.world.entity.player.Inventory;\n",
... | false | cd67e0e5d27e4dc7 | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 884d73876c5b47cd5feec932636494410559791f | b4361838b3e46fc76883b0d9db0a5a3e047a4d37 | 057fdb935985520381a2ef88d7db251a43ed24ce | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/metaphysics/OverpoweredWeakAutomataCorePeripheral.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.peripheral.metaphysics;\n",
"\n",
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n"
] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.base.IAutomataCoreTier;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.operations.AutomataCoreTier;\n",
"import org.jetbrains.annotations.NotNull;\n"
] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.operations.AutomataCoreTier;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.base.IAutomataCoreTier;\n",
"import org.jetbrains.annotations.NotNull;\n"
] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.operations.AutomataCoreTier;\n",
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n"
] | [
"\n",
"import java.util.Random;\n",
"\n",
"\n",
"public class OverpoweredWeakAutomataCorePeripheral extends WeakAutomataCorePeripheral {\n",
"\n",
" public static final String TYPE = \"overpoweredWeakAutomata\";\n",
"\n",
" public OverpoweredWeakAutomataCorePeripheral(ITurtleAccess turtle, Tur... | [
"import de.srendi.advancedperipherals.common.addons.computercraft.operations.AutomataCoreTier;\n",
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n"
] | false | 81f3263e4812df67 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 884d73876c5b47cd5feec932636494410559791f | b4361838b3e46fc76883b0d9db0a5a3e047a4d37 | 057fdb935985520381a2ef88d7db251a43ed24ce | src/main/java/de/srendi/advancedperipherals/common/setup/Blocks.java | 0 | 5 | [
"package de.srendi.advancedperipherals.common.setup;\n",
"\n"
] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.pocket.PocketChatBox;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.pocket.PocketEnvironment;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.pocket.PocketGeoScanner;\n",
"import de.srendi.advancedp... | [
"import de.srendi.advancedperipherals.common.addons.computercraft.pocket.*;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.turtles.TurtleChatBox;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.turtles.TurtleEnvironmentDetector;\n",
"import de.srendi.advancedperiph... | [
"import de.srendi.advancedperipherals.common.addons.computercraft.pocket.*;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.turtles.TurtleChatBoxUpgrade;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.turtles.TurtleEnvironmentDetectorUpgrade;\n",
"import de.srendi.... | [
"import de.srendi.advancedperipherals.common.blocks.PlayerDetectorBlock;\n",
"import de.srendi.advancedperipherals.common.blocks.RedstoneIntegratorBlock;\n",
"import de.srendi.advancedperipherals.common.blocks.base.APTileEntityBlock;\n",
"import de.srendi.advancedperipherals.common.blocks.base.BaseBlock;\n",
... | [
"import de.srendi.advancedperipherals.common.addons.computercraft.pocket.PocketChatBoxUpgrade;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.pocket.PocketEnvironmentUpgrade;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.pocket.PocketGeoScannerUpgrade;\n",
"impor... | false | f62480a17ac5d6f0 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 884d73876c5b47cd5feec932636494410559791f | b4361838b3e46fc76883b0d9db0a5a3e047a4d37 | 057fdb935985520381a2ef88d7db251a43ed24ce | src/main/java/de/srendi/advancedperipherals/common/setup/Blocks.java | 2 | 5 | [
" public static final RegistryObject<Block> CHAT_BOX = register(\"chat_box\", () -> new APTileEntityBlock<>(TileEntityTypes.CHAT_BOX, false),\n"
] | [
" () -> new APBlockItem(Blocks.CHAT_BOX.get(), TurtleChatBox.ID, PocketChatBox.ID, () -> AdvancedPeripheralsConfig.enableChatBox));\n",
"\n"
] | [
" () -> new APBlockItem(Blocks.CHAT_BOX.get(), TurtleChatBox.ID, PocketChatBox.ID, () -> AdvancedPeripheralsConfig.enableChatBox));\n"
] | [
" () -> new APBlockItem(Blocks.CHAT_BOX.get(), TurtleChatBoxUpgrade.ID, PocketChatBoxUpgrade.ID, () -> AdvancedPeripheralsConfig.enableChatBox));\n"
] | [
" public static final RegistryObject<Block> PLAYER_DETECTOR = register(\"player_detector\", PlayerDetectorBlock::new,\n"
] | [
" () -> new APBlockItem(Blocks.CHAT_BOX.get(), TurtleChatBoxUpgrade.ID, PocketChatBoxUpgrade.ID, () -> AdvancedPeripheralsConfig.enableChatBox));\n",
"\n"
] | false | 37772ad5d3c7f733 | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | d0ee2834ce99ac631913c95c29bee348e95e8018 | 31354ebab9aa76f66fe9c4b21a2560223e7941b6 | be9cb78ba9eee75f08090342239edb58ef3502c3 | src/main/java/de/srendi/advancedperipherals/common/blocks/base/APBlockEntityBlock.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.blocks.base;\n",
"\n",
"import de.srendi.advancedperipherals.common.blocks.blockentities.EnergyDetectorEntity;\n",
"import net.minecraft.core.BlockPos;\n"
] | [
"import net.minecraft.world.item.DyeColor;\n",
"import net.minecraft.world.level.block.SoundType;\n"
] | [] | [
"import net.minecraft.world.level.LevelReader;\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 net.minecraftforge.registries.RegistryObject;\n",
"import org.jetbrains.annotations.NotNull;\n",
"import... | [
"import net.minecraft.world.item.DyeColor;\n",
"import net.minecraft.world.level.block.SoundType;\n",
"import net.minecraft.world.level.LevelReader;\n"
] | false | cd6093e610f08f00 | [
"A1",
"A2",
"B1"
] | A then B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 732d56fd8dfac7ba4a5722cf2fee4b1d5d0a096f | dbb9c4377b7528d12c294555ee0e212efc7b819e | 9d403ab8804762e5898a9f34027e9f052b59e3f2 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/GeoScannerPeripheral.java | 0 | 1 | [
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.operations.SphereOperationContext;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.owner.BlockEntityPeriphe... | [
"import net.minecraftforge.registries.ForgeRegistries;\n"
] | [] | [
"import org.jetbrains.annotations.NotNull;\n"
] | [
"\n",
"import java.util.ArrayList;\n",
"import java.util.HashMap;\n",
"import java.util.List;\n",
"import java.util.Map;\n",
"\n",
"import static de.srendi.advancedperipherals.common.addons.computercraft.operations.SphereOperation.SCAN_BLOCKS;\n",
"\n",
"public class GeoScannerPeripheral extends Bas... | [
"import net.minecraftforge.registries.ForgeRegistries;\n",
"import org.jetbrains.annotations.NotNull;\n"
] | false | 254574744f726bb9 | [
"A1",
"B1"
] | A then B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 732d56fd8dfac7ba4a5722cf2fee4b1d5d0a096f | dbb9c4377b7528d12c294555ee0e212efc7b819e | 9d403ab8804762e5898a9f34027e9f052b59e3f2 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/InventoryManagerPeripheral.java | 0 | 5 | [
" item.ifPresent(s -> filterMap.put(\"name\", s));\n",
" slot.ifPresent(integer -> filterMap.put(\"toSlot\", integer));\n",
" filterMap.put(\"count\", count);\n",
"\n",
" filter = ItemFilter.parse(filterMap);\n",
" if (filter.rightPresent())\n",
" return Met... | [
" BlockEntity targetEntity = owner.getLevel().getBlockEntity(owner.getPos().relative(direction));\n",
" IItemHandler inventoryFrom = targetEntity != null ? targetEntity.getCapability(ForgeCapabilities.ITEM_HANDLER, direction).resolve().orElse(null) : null;\n"
] | [
" BlockEntity targetEntity = owner.getLevel().getBlockEntity(owner.getPos().relative(direction));\n",
" IItemHandler inventoryFrom = targetEntity != null ? targetEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, direction).resolve().orElse(null) : null;\n"
] | [
" // Deprecated! Will be removed in the future. This exists to maintain compatibility within the same mc version\n",
" slot.ifPresent(integer -> filterMap.put(\"toSlot\", integer));\n",
" filterMap.put(\"count\", count);\n"
] | [
"\n",
" item.ifPresent(filterMap::putAll);\n",
"\n",
" filter = ItemFilter.parse(filterMap);\n",
" if (filter.rightPresent())\n",
" return MethodResult.of(0, filter.getRight());\n",
"\n",
" return MethodResult.of(addItemCommon(invDirection, filter.getLeft()), nul... | [
" // Deprecated! Will be removed in the future. This exists to maintain compatibility within the same mc version\n",
" slot.ifPresent(integer -> filterMap.put(\"toSlot\", integer));\n",
" filterMap.put(\"count\", count);\n"
] | false | a520002b2f26f421 | [
"B1",
"B2",
"B3"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 732d56fd8dfac7ba4a5722cf2fee4b1d5d0a096f | dbb9c4377b7528d12c294555ee0e212efc7b819e | 9d403ab8804762e5898a9f34027e9f052b59e3f2 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/InventoryManagerPeripheral.java | 2 | 5 | [
" public final MethodResult removeItemFromPlayer(String invDirection, int count, Optional<Integer> slot, Optional<String> item) throws LuaException {\n",
" Pair<ItemFilter, String> filter;\n",
" Map<Object, Object> filterMap = new HashMap<>();\n",
"\n",
" // Deprecated! Will be remov... | [
" BlockEntity targetEntity = owner.getLevel().getBlockEntity(owner.getPos().relative(direction));\n",
" IItemHandler inventoryFrom = targetEntity != null ? targetEntity.getCapability(ForgeCapabilities.ITEM_HANDLER, direction).resolve().orElse(null) : null;\n"
] | [
" BlockEntity targetEntity = owner.getLevel().getBlockEntity(owner.getPos().relative(direction));\n",
" IItemHandler inventoryFrom = targetEntity != null ? targetEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, direction).resolve().orElse(null) : null;\n"
] | [
" // Deprecated! Will be removed in the future. This exists to maintain compatibility within the same mc version\n",
" slot.ifPresent(integer -> filterMap.put(\"toSlot\", integer));\n",
" filterMap.put(\"count\", count);\n"
] | [
"\n",
" item.ifPresent(filterMap::putAll);\n",
"\n",
" filter = ItemFilter.parse(filterMap);\n",
" if (filter.rightPresent())\n",
" return MethodResult.of(0, filter.getRight());\n",
"\n",
" return MethodResult.of(removeItemCommon(invDirection, filter.getLeft()), ... | [
" // Deprecated! Will be removed in the future. This exists to maintain compatibility within the same mc version\n",
" slot.ifPresent(integer -> filterMap.put(\"toSlot\", integer));\n",
" filterMap.put(\"count\", count);\n"
] | false | 8fb430fa229c9567 | [
"B1",
"B2",
"B3"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 732d56fd8dfac7ba4a5722cf2fee4b1d5d0a096f | dbb9c4377b7528d12c294555ee0e212efc7b819e | 9d403ab8804762e5898a9f34027e9f052b59e3f2 | src/main/java/de/srendi/advancedperipherals/common/items/APBlockItem.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.items;\n",
"\n",
"import de.srendi.advancedperipherals.common.items.base.BaseBlockItem;\n"
] | [] | [
"import de.srendi.advancedperipherals.common.util.ItemUtil;\n",
"import net.minecraft.core.NonNullList;\n"
] | [
"import de.srendi.advancedperipherals.common.util.inventory.ItemUtil;\n",
"import net.minecraft.core.NonNullList;\n"
] | [
"import net.minecraft.resources.ResourceLocation;\n",
"import net.minecraft.world.level.block.Block;\n",
"import org.jetbrains.annotations.Nullable;\n",
"\n",
"import java.util.function.Supplier;\n",
"\n",
"public class APBlockItem extends BaseBlockItem {\n",
"\n",
" @Nullable\n",
" private ... | [] | false | 9b4722cbd9882d37 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 732d56fd8dfac7ba4a5722cf2fee4b1d5d0a096f | dbb9c4377b7528d12c294555ee0e212efc7b819e | 9d403ab8804762e5898a9f34027e9f052b59e3f2 | src/main/java/de/srendi/advancedperipherals/common/items/APItem.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.items;\n",
"\n",
"import de.srendi.advancedperipherals.common.items.base.BaseItem;\n"
] | [] | [
"import de.srendi.advancedperipherals.common.util.ItemUtil;\n",
"import net.minecraft.core.NonNullList;\n"
] | [
"import de.srendi.advancedperipherals.common.util.inventory.ItemUtil;\n",
"import net.minecraft.core.NonNullList;\n"
] | [
"import net.minecraft.resources.ResourceLocation;\n",
"import org.jetbrains.annotations.Nullable;\n",
"\n",
"import java.util.function.Supplier;\n",
"\n",
"public class APItem extends BaseItem {\n",
"\n",
" @Nullable\n",
" private final ResourceLocation turtleID;\n",
" @Nullable\n",
" ... | [] | false | 150b9d6b4de12ed4 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 185de41960bbad3fdd662124cab7e7c4c2da7be8 | a3ebf19a50a8100fdb72bd0c65be7055f5c6513d | cbbfcd4a063d630134c80313f34cb09c4d055629 | src/main/java/de/srendi/advancedperipherals/common/blocks/blockentities/EnergyDetectorEntity.java | 0 | 1 | [
" public void saveAdditional(@NotNull CompoundTag compound) {\n",
" super.saveAdditional(compound);\n",
" compound.putInt(\"rateLimit\", storageProxy.getMaxTransferRate());\n",
" }\n",
"\n",
" @Override\n",
" public <T extends BlockEntity> void handleTick(Level level, BlockStat... | [
" // returns the cached output storage of the receiving block or fetches it if it has been invalidated\n"
] | [
" // returns the cached output storage of the receiving block or refetches it if it has been invalidated\n"
] | [
" public void invalidateStorages() {\n",
" outReceivingStorage = Optional.empty();\n",
" }\n",
"\n",
" // returns the cached output storage of the receiving block or refetches it if it has been invalidated\n"
] | [
" @NotNull\n",
" public Optional<IEnergyStorage> getOutputStorage() {\n",
" // the documentation says that the value of the LazyOptional should be cached locally and invalidated using addListener\n",
" if (outReceivingStorage.isEmpty()) {\n",
" BlockEntity teOut = level.getBlo... | [
" public void invalidateStorages() {\n",
" outReceivingStorage = Optional.empty();\n",
" }\n",
"\n",
" // returns the cached output storage of the receiving block or fetches it if it has been invalidated\n"
] | false | 63f28dc18049d275 | [
"B1",
"B2",
"B3",
"B4",
"A1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 4b65a3996771a39b3404d6f89dbbdd194b0d38d1 | f3b1e6c42a0326a5b76c3ea39abac81b9a137af7 | 761d1b70cc59e7ff74fe130ed113d0861c5634bb | src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java | 0 | 1 | [
"import net.minecraft.util.StringRepresentable;\n",
"import net.minecraft.world.SimpleContainer;\n",
"import net.minecraft.world.effect.MobEffectInstance;\n",
"import net.minecraft.world.entity.Entity;\n",
"import net.minecraft.world.entity.EntityType;\n",
"import net.minecraft.world.entity.LivingEntity;\... | [] | [] | [
"import org.jetbrains.annotations.Nullable;\n"
] | [
"import java.util.Collections;\n",
"import java.util.HashMap;\n",
"import java.util.List;\n",
"import java.util.Map;\n",
"import java.util.function.Supplier;\n",
"import java.util.stream.Stream;\n",
"\n",
"public class LuaConverter {\n",
"\n",
" public static Map<String, Object> entityToLua(Ent... | [
"import org.jetbrains.annotations.Nullable;\n"
] | false | cb28b86dba3a720e | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 4b42afef51d31d7e21f9f9de6b576adcdead924f | c3c9bf8990f1c11392523cde55193a12d1de8b21 | 5c5b023375143728e8e9b76a657e07dcdec3fa4e | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/turtles/metaphysics/HusbandryAutomata.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.turtles.metaphysics;\n",
"\n",
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperi... | [
"import net.minecraft.client.resources.model.ModelResourceLocation;\n",
"import net.minecraft.world.item.ItemStack;\n"
] | [
"import net.minecraft.client.renderer.model.ModelResourceLocation;\n",
"import net.minecraft.item.ItemStack;\n"
] | [
"import net.minecraft.client.renderer.model.ModelResourceLocation;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.util.ResourceLocation;\n"
] | [
"import org.jetbrains.annotations.NotNull;\n",
"\n",
"public class HusbandryAutomata extends ModelTransformingTurtle<HusbandryAutomataCorePeripheral> {\n",
" public static final ResourceLocation ID = new ResourceLocation(AdvancedPeripherals.MOD_ID, \"husbandry_automata\");\n",
"\n",
" public Husband... | [
"import net.minecraft.client.resources.model.ModelResourceLocation;\n",
"import net.minecraft.resources.ResourceLocation;\n",
"import net.minecraft.world.item.ItemStack;\n"
] | false | d2008a205729b181 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 4b42afef51d31d7e21f9f9de6b576adcdead924f | c3c9bf8990f1c11392523cde55193a12d1de8b21 | 5c5b023375143728e8e9b76a657e07dcdec3fa4e | src/main/java/de/srendi/advancedperipherals/common/items/APBlockItem.java | 2 | 5 | [
" Supplier<Boolean> enabledSup;\n",
"\n"
] | [
" public APBlockItem(Block blockIn, Properties properties, String turtleID, String pocketID, Component description, Supplier<Boolean> enabledSup) {\n"
] | [
" public APBlockItem(Block blockIn, Properties properties, String turtleID, String pocketID, ITextComponent description, Supplier<Boolean> enabledSup) {\n"
] | [
" public APBlockItem(Block blockIn, Properties properties, @Nullable ResourceLocation turtleID, @Nullable ResourceLocation pocketID, Supplier<Boolean> enabledSup) {\n"
] | [
" super(blockIn, properties);\n",
" this.turtleID = turtleID;\n",
" this.pocketID = pocketID;\n",
" this.enabledSup = enabledSup;\n",
" }\n",
"\n"
] | [
" public APBlockItem(Block blockIn, Properties properties, @Nullable ResourceLocation turtleID, @Nullable ResourceLocation pocketID, Supplier<Boolean> enabledSup) {\n"
] | false | ca86de7d1c1b1dad | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 4b42afef51d31d7e21f9f9de6b576adcdead924f | c3c9bf8990f1c11392523cde55193a12d1de8b21 | 5c5b023375143728e8e9b76a657e07dcdec3fa4e | src/main/java/de/srendi/advancedperipherals/common/items/APItem.java | 1 | 5 | [
"\n",
"import java.util.function.Supplier;\n",
"\n",
"public class APItem extends BaseItem {\n",
"\n"
] | [
" String turtleID;\n",
" String pocketID;\n",
" Component description;\n"
] | [
" String turtleID;\n",
" String pocketID;\n",
" ITextComponent description;\n"
] | [
" @Nullable ResourceLocation turtleID;\n",
" @Nullable ResourceLocation pocketID;\n"
] | [
" Supplier<Boolean> enabledSup;\n",
"\n"
] | [
" @Nullable ResourceLocation turtleID;\n",
" @Nullable ResourceLocation pocketID;\n"
] | false | 2c18127d5ad13f88 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 4b42afef51d31d7e21f9f9de6b576adcdead924f | c3c9bf8990f1c11392523cde55193a12d1de8b21 | 5c5b023375143728e8e9b76a657e07dcdec3fa4e | src/main/java/de/srendi/advancedperipherals/common/items/base/BaseBlockItem.java | 1 | 2 | [
" public BaseBlockItem(Block blockIn, Properties properties) {\n",
" super(blockIn, properties.tab(AdvancedPeripherals.TAB));\n",
" }\n",
"\n",
" public BaseBlockItem(Block blockIn) {\n",
" super(blockIn, new Properties().tab(AdvancedPeripherals.TAB));\n",
" }\n",
"\n",
" ... | [
" public abstract Optional<String> getTurtleID();\n",
"\n",
" public abstract Optional<String> getPocketID();\n",
"\n",
" public abstract Component getDescription();\n",
"\n",
" public abstract boolean isEnabled();\n",
"\n",
" @Override\n",
" public void fillItemCategory(Creative... | [
" public abstract Optional<String> getTurtleID();\n",
"\n",
" public abstract Optional<String> getPocketID();\n",
"\n",
" public abstract ITextComponent getDescription();\n",
"\n",
" public abstract boolean isEnabled();\n",
"\n",
" @Override\n",
" public void fillItemCategory(Ite... | [
" public @NotNull ITextComponent getDescription() {\n",
" if (description == null)\n",
" description = TranslationUtil.itemTooltip(getDescriptionId());\n",
" return description;\n"
] | [
" }\n",
"\n",
" public abstract boolean isEnabled();\n",
"}\n"
] | [
" public @NotNull Component getDescription() {\n",
" if (description == null)\n",
" description = TranslationUtil.itemTooltip(getDescriptionId());\n",
" return description;\n"
] | false | 65d3c632dade8fa0 | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 4b42afef51d31d7e21f9f9de6b576adcdead924f | c3c9bf8990f1c11392523cde55193a12d1de8b21 | 5c5b023375143728e8e9b76a657e07dcdec3fa4e | src/main/java/de/srendi/advancedperipherals/common/setup/Blocks.java | 1 | 10 | [
"import de.srendi.advancedperipherals.common.blocks.PlayerDetectorBlock;\n",
"import de.srendi.advancedperipherals.common.blocks.RedstoneIntegratorBlock;\n",
"import de.srendi.advancedperipherals.common.blocks.base.APTileEntityBlock;\n",
"import de.srendi.advancedperipherals.common.blocks.base.BaseBlock;\n",
... | [
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.network.chat.TranslatableComponent;\n",
"import net.minecraft.world.item.BlockItem;\n",
"import net.minecraft.world.item.Item;\n",
"import net.minecraft.world.level.BlockGetter;\n",
"import net.minecraft.world.level.block.Block;\n",
"import ... | [
"import net.minecraft.block.Block;\n",
"import net.minecraft.block.BlockState;\n",
"import net.minecraft.item.BlockItem;\n",
"import net.minecraft.item.Item;\n",
"import net.minecraft.util.math.BlockPos;\n",
"import net.minecraft.util.text.TranslationTextComponent;\n",
"import net.minecraft.world.IBlock... | [
"import net.minecraft.block.Block;\n",
"import net.minecraft.block.BlockState;\n",
"import net.minecraft.item.BlockItem;\n",
"import net.minecraft.item.Item;\n",
"import net.minecraft.util.math.BlockPos;\n",
"import net.minecraft.world.IBlockReader;\n",
"import net.minecraftforge.fml.ModList;\n",
"imp... | [
"\n",
"import java.util.function.Supplier;\n",
"\n",
"public class Blocks {\n",
"\n",
" static void register() {\n",
" }\n",
"\n",
" public static final RegistryObject<Block> ENVIRONMENT_DETECTOR = register(\"environment_detector\", () -> new APTileEntityBlock<>(TileEntityTypes.ENVIRONMENT_... | [
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.world.item.BlockItem;\n",
"import net.minecraft.world.item.Item;\n",
"import net.minecraft.world.level.BlockGetter;\n",
"import net.minecraft.world.level.block.Block;\n",
"import net.minecraft.world.level.block.state.BlockState;\n",
"import ... | false | 66aaa8a437c281c9 | [
"A1",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8"
] | mix of lines | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 12407eab9c0d62af905c17f52b59d299c742b202 | c6e99d828d81f899463025efa07c25a81fab0645 | 0eb9ae62760979d29ebc2b49ebaa36cf5de45d4e | src/main/java/de/srendi/advancedperipherals/AdvancedPeripherals.java | 1 | 8 | [
"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 de.srendi.advancedperipherals.common.setup.Registration;\n"
] | false | 8de06d3be3fb78a9 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 12407eab9c0d62af905c17f52b59d299c742b202 | c6e99d828d81f899463025efa07c25a81fab0645 | 0eb9ae62760979d29ebc2b49ebaa36cf5de45d4e | src/main/java/de/srendi/advancedperipherals/AdvancedPeripherals.java | 5 | 8 | [
"\n",
"import java.util.Random;\n",
"\n",
"@Mod(AdvancedPeripherals.MOD_ID)\n",
"public class AdvancedPeripherals {\n",
"\n",
" public static final String MOD_ID = \"advancedperipherals\";\n",
" public static final Logger LOGGER = LogManager.getLogger(\"Advanced Peripherals\");\n",
" public... | [
" 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",
"\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",
"\n",
... | [
" public static final APAddons addons = new APAddons();\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 APAddons addons = new APAddons();\n"
] | false | 581a2d6e35ac0da6 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 12407eab9c0d62af905c17f52b59d299c742b202 | c6e99d828d81f899463025efa07c25a81fab0645 | 0eb9ae62760979d29ebc2b49ebaa36cf5de45d4e | src/main/java/de/srendi/advancedperipherals/common/data/BlockLootTables.java | 1 | 2 | [
"import net.minecraft.world.level.block.Block;\n",
"import net.minecraftforge.registries.RegistryObject;\n",
"import org.jetbrains.annotations.NotNull;\n",
"\n",
"import java.util.Set;\n",
"\n",
"public class BlockLootTables extends BlockLootSubProvider {\n",
"\n",
" protected BlockLootTables() {... | [
" protected void addTables() {\n",
" APRegistration.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(this::dropSelf);\n"
] | [
" protected void addTables() {\n",
" Registration.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(this::dropSelf);\n"
] | [
" protected void generate() {\n",
" Registration.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(this::dropSelf);\n"
] | [
" }\n",
"\n",
" @NotNull\n",
" @Override\n",
" protected Iterable<Block> getKnownBlocks() {\n",
" return APRegistration.BLOCKS.getEntries().stream().map(RegistryObject::get)::iterator;\n",
" }\n",
"}\n"
] | [
" protected void generate() {\n",
" Registration.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(this::dropSelf);\n"
] | false | 2ab1aa4b61d23e9d | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 12407eab9c0d62af905c17f52b59d299c742b202 | c6e99d828d81f899463025efa07c25a81fab0645 | 0eb9ae62760979d29ebc2b49ebaa36cf5de45d4e | src/main/java/de/srendi/advancedperipherals/common/data/DataGenerators.java | 0 | 1 | [
"\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperipherals.common.setup.APRegistration;\n",
"import net.minecraft.data.DataGenerator;\n",
"import net.minecraftforge.common.data.ExistingFileHelper;\n",
"import net.minecraftforge.data.event.GatherDataEvent;\n"... | [
" generator.addProvider(event.includeServer(), new BlockTagsProvider(generator, existingFileHelper, APRegistration.BLOCKS));\n",
" generator.addProvider(event.includeServer(), new RecipesProvider(generator));\n",
" generator.addProvider(event.includeServer(), new BlockLootTablesProvider(gen... | [
" generator.addProvider(event.includeServer(), new BlockTagsProvider(generator, existingFileHelper, Registration.BLOCKS));\n",
" generator.addProvider(event.includeServer(), new RecipesProvider(generator));\n",
" generator.addProvider(event.includeServer(), new BlockLootTablesProvider(gener... | [
" generator.addProvider(event.includeServer(), new BlockTagsProvider(generator.getPackOutput(), null, existingFileHelper, Registration.BLOCKS));\n",
" generator.addProvider(event.includeServer(), new RecipesProvider(generator.getPackOutput()));\n",
" generator.addProvider(event.includeServe... | [
"\n",
" generator.addProvider(event.includeClient(), new EnUsLanguageProvider(generator));\n",
" }\n",
"\n",
"}\n"
] | [
" generator.addProvider(event.includeServer(), new BlockTagsProvider(generator.getPackOutput(), null, existingFileHelper, Registration.BLOCKS));\n",
" generator.addProvider(event.includeServer(), new RecipesProvider(generator.getPackOutput()));\n",
" generator.addProvider(event.includeServe... | false | 4f4afcdfebd62fa7 | [
"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 | 12407eab9c0d62af905c17f52b59d299c742b202 | c6e99d828d81f899463025efa07c25a81fab0645 | 0eb9ae62760979d29ebc2b49ebaa36cf5de45d4e | src/main/java/de/srendi/advancedperipherals/common/data/RecipesProvider.java | 19 | 20 | [
"\n"
] | [
" private void addSmithing(@NotNull Consumer<FinishedRecipe> consumer) {\n",
" UpgradeRecipeBuilder\n",
" .smithing(Ingredient.of(APItems.SMART_GLASSES.get()), Ingredient.of(Items.NETHERITE_INGOT), APItems.SMART_GLASSES_NETHERITE.get())\n",
" .unlocks(\"has_item\", has(... | [
" ShapelessRecipeBuilder.shapeless(de.srendi.advancedperipherals.common.setup.Items.OVERPOWERED_WEAK_AUTOMATA_CORE.get())\n",
" .requires(de.srendi.advancedperipherals.common.setup.Items.WEAK_AUTOMATA_CORE.get())\n",
" .requires(Items.NETHER_STAR)\n",
" .unl... | [
" ShapelessRecipeBuilder.shapeless(RecipeCategory.REDSTONE, de.srendi.advancedperipherals.common.setup.Items.OVERPOWERED_WEAK_AUTOMATA_CORE.get()).requires(de.srendi.advancedperipherals.common.setup.Items.WEAK_AUTOMATA_CORE.get()).requires(Items.NETHER_STAR).unlockedBy(\"has_item\", has(de.srendi.advancedper... | [
" }\n",
"\n",
"}\n"
] | [
" ShapelessRecipeBuilder.shapeless(RecipeCategory.REDSTONE, de.srendi.advancedperipherals.common.setup.Items.OVERPOWERED_HUSBANDRY_AUTOMATA_CORE.get()).requires(de.srendi.advancedperipherals.common.setup.Items.HUSBANDRY_AUTOMATA_CORE.get()).requires(Items.NETHER_STAR).unlockedBy(\"has_item\", has(de.srendi.a... | false | 2f14f1151c5a9062 | [
"B5"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 25a0cc38ff073478b15905e31c7142f920f8086b | 14354e62164f0a12047435827525e482d1cfbc1d | fa4c8a9283cd39ff97ec919921f08706185ec47e | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/ARControllerPeripheral.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.peripheral;\n",
"\n",
"import dan200.computercraft.api.lua.LuaException;\n",
"import dan200.computercraft.api.lua.LuaFunction;\n",
"import dan200.computercraft.api.lua.MethodResult;\n",
"import de.srendi.advancedperipherals.common.argoggle... | [
"import de.srendi.advancedperipherals.lib.peripherals.owner.BlockEntityPeripheralOwner;\n"
] | [
"import de.srendi.advancedperipherals.lib.peripherals.owner.TileEntityPeripheralOwner;\n"
] | [
"import de.srendi.advancedperipherals.lib.peripherals.BasePeripheral;\n",
"import de.srendi.advancedperipherals.lib.peripherals.owner.TileEntityPeripheralOwner;\n"
] | [
"\n",
"import java.util.Optional;\n",
"\n",
"public class ARControllerPeripheral extends BasePeripheral<BlockEntityPeripheralOwner<ARControllerTile>> {\n",
" public static final String TYPE = \"arController\";\n",
"\n",
" public ARControllerPeripheral(ARControllerTile tileEntity) {\n",
" ... | [
"import de.srendi.advancedperipherals.lib.peripherals.BasePeripheral;\n",
"import de.srendi.advancedperipherals.lib.peripherals.owner.BlockEntityPeripheralOwner;\n"
] | false | 84d28578663e316b | [
"B1",
"A1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 25a0cc38ff073478b15905e31c7142f920f8086b | 14354e62164f0a12047435827525e482d1cfbc1d | fa4c8a9283cd39ff97ec919921f08706185ec47e | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/metaphysics/HusbandryAutomataCorePeripheral.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.peripheral.metaphysics;\n",
"\n",
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.operations.AutomataCoreTie... | [
"import net.minecraft.world.entity.Entity;\n",
"import net.minecraft.world.entity.LivingEntity;\n",
"import net.minecraft.world.entity.player.Player;\n"
] | [
"import net.minecraft.entity.Entity;\n",
"import net.minecraft.entity.LivingEntity;\n",
"import net.minecraft.entity.player.PlayerEntity;\n"
] | [
"import net.minecraft.entity.Entity;\n",
"import net.minecraft.entity.LivingEntity;\n",
"import net.minecraft.entity.player.PlayerEntity;\n"
] | [
"\n",
"import java.util.function.Predicate;\n",
"\n",
"public class HusbandryAutomataCorePeripheral extends WeakAutomataCorePeripheral {\n",
" public static final String TYPE = \"husbandryAutomata\";\n",
"\n",
" private static final Predicate<Entity> isAnimal = entity1 -> entity1.getType().getCate... | [
"import net.minecraft.world.entity.Entity;\n",
"import net.minecraft.world.entity.LivingEntity;\n",
"import net.minecraft.world.entity.player.Player;\n"
] | false | 47614d922f6c198e | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 25a0cc38ff073478b15905e31c7142f920f8086b | 14354e62164f0a12047435827525e482d1cfbc1d | fa4c8a9283cd39ff97ec919921f08706185ec47e | src/main/java/de/srendi/advancedperipherals/common/items/WeakAutomataCore.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.items;\n",
"\n",
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n",
"import de.srendi.advancedperipherals.common.setup.Items;\n",
"import de.srendi.advancedperipherals.common.util.EnumColor;\n"
] | [
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.network.chat.Component;\n",
"import net.minecraft.network.chat.TextComponent;\n",
"import net.minecraft.network.chat.TranslatableComponent;\n",
"import net.minecraft.resources.ResourceLocation;\n",
"import net.minecraft.world.InteractionHand... | [
"import net.minecraft.client.util.ITooltipFlag;\n",
"import net.minecraft.entity.Entity;\n",
"import net.minecraft.entity.EntityType;\n",
"import net.minecraft.entity.LivingEntity;\n",
"import net.minecraft.entity.player.PlayerEntity;\n",
"import net.minecraft.item.Item;\n",
"import net.minecraft.item.I... | [
"import de.srendi.advancedperipherals.lib.metaphysics.IFeedableAutomataCore;\n",
"import net.minecraft.client.util.ITooltipFlag;\n",
"import net.minecraft.entity.Entity;\n",
"import net.minecraft.entity.EntityType;\n",
"import net.minecraft.entity.LivingEntity;\n",
"import net.minecraft.entity.player.Play... | [
"import net.minecraftforge.common.util.FakePlayer;\n",
"import org.jetbrains.annotations.NotNull;\n",
"import org.jetbrains.annotations.Nullable;\n",
"\n",
"import java.util.HashMap;\n",
"import java.util.List;\n",
"import java.util.Map;\n",
"import java.util.Optional;\n",
"\n",
"public class Weak... | [
"import de.srendi.advancedperipherals.lib.metaphysics.IFeedableAutomataCore;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.network.chat.Component;\n",
"import net.minecraft.network.chat.TextComponent;\n",
"import net.minecraft.network.chat.TranslatableComponent;\n",
"import net.mine... | false | bccd53f0e0a496de | [
"B1",
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9",
"A10",
"A11",
"A12",
"A13",
"A14",
"A15"
] | mix of lines | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 25a0cc38ff073478b15905e31c7142f920f8086b | 14354e62164f0a12047435827525e482d1cfbc1d | fa4c8a9283cd39ff97ec919921f08706185ec47e | src/main/java/de/srendi/advancedperipherals/lib/peripherals/IPeripheralTileEntity.java | 0 | 1 | [
"package de.srendi.advancedperipherals.lib.peripherals;\n",
"\n",
"import net.minecraft.nbt.CompoundTag;\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.minecr... | [
" CompoundTag getPeripheralSettings();\n"
] | [
" CompoundNBT getPeripheralSettings();\n"
] | [
" CompoundNBT getPeripheralSettings();\n",
"\n"
] | [
" void markSettingsChanged();\n",
"\n",
" default <T extends BlockEntity> void handleTick(Level level, BlockState state, BlockEntityType<T> type) {\n",
"\n",
" }\n",
"\n",
"}\n"
] | [
"\n",
" CompoundTag getPeripheralSettings();\n"
] | false | 2d1b9179738ac665 | [
"B2",
"A1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 25a0cc38ff073478b15905e31c7142f920f8086b | 14354e62164f0a12047435827525e482d1cfbc1d | fa4c8a9283cd39ff97ec919921f08706185ec47e | src/test/java/de/srendi/advancedperipherals/test/DummyPeripheralOwner.java | 2 | 5 | [
" return new BlockPos(0, 0, 0);\n",
" }\n",
"\n",
" @Override\n"
] | [
" public @NotNull\n",
" Direction getFacing() {\n"
] | [
" public @NotNull Direction getFacing() {\n"
] | [
" @NotNull\n",
" public Direction getFacing() {\n"
] | [
" return Direction.NORTH;\n",
" }\n",
"\n",
" @Override\n"
] | [
" public @NotNull\n",
" Direction getFacing() {\n"
] | false | 613f386c14294d3c | [
"A1",
"A2"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | ed8c60f54aade61d297d9e631be095305354f6fe | 8aa951ccbf9629968a3056e1d0042d11757bca6a | fe4aae8009536782ae4a6c69d92cfe5a9a851a84 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/NBTStoragePeripheral.java | 0 | 1 | [
" }\n",
"\n",
" @Override\n",
" public boolean isEnabled() {\n",
" return AdvancedPeripheralsConfig.enableNBTStorage;\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public final Map<String, Integer> getConfiguration() {\n",
" Map<String, Integer> result =... | [
" public final MethodResult writeJson(String jsonData){\n",
" if (jsonData.length() > AdvancedPeripheralsConfig.nbtStorageMaxSize) {\n"
] | [
" public final MethodResult write(String dataInJson){\n",
" if (dataInJson.length() > AdvancedPeripheralsConfig.nbtStorageMaxSize) {\n"
] | [
" public final MethodResult write(String dataInJson) {\n",
" if (dataInJson.length() > AdvancedPeripheralsConfig.nbtStorageMaxSize) {\n"
] | [
" return MethodResult.of(null, \"JSON size is bigger than allowed\");\n",
" }\n",
" CompoundNBT parsedData;\n",
" try {\n",
" parsedData = JsonToNBT.parseTag(jsonData);\n",
" } catch (CommandSyntaxException ex) {\n",
" return MethodResult.of(n... | [
" public final MethodResult writeJson(String jsonData){\n",
" if (jsonData.length() > AdvancedPeripheralsConfig.nbtStorageMaxSize) {\n"
] | false | a3890dbcfab136ad | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 0d507d03a95b4b857c332fa81a372b531859df11 | 03a5418dd9a8d81f23b50084738f080df6fff713 | ca760a8aca60ed57367af8b708a4e40f60b3d9e7 | 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() * 1024;\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() * 1024L;\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 | a7292e9d353a0fbf | [
"B1",
"A2",
"A3",
"A4",
"A5"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 0d507d03a95b4b857c332fa81a372b531859df11 | 03a5418dd9a8d81f23b50084738f080df6fff713 | ca760a8aca60ed57367af8b708a4e40f60b3d9e7 | 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() * 1024;\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() * 1024L;\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 | 969afc3dab4f4ace | [
"B1",
"A2",
"A3",
"A4",
"A5"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 67e36825714c62d5962c856f47538a5044d41867 | 50e64e181cde72824167130464fee1ad92398895 | b0f912309eb935257c559d974915a9f872390e34 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/owner/BlockEntityPeripheralOwner.java | 0 | 2 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.owner;\n",
"\n",
"import de.srendi.advancedperipherals.common.blocks.base.BaseBlock;\n",
"import de.srendi.advancedperipherals.common.blocks.blockentities.InventoryManagerEntity;\n",
"import de.srendi.advancedperipherals.common.util.DataStor... | [] | [] | [
"import net.minecraft.network.chat.Component;\n"
] | [
"import net.minecraft.world.Nameable;\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.JigsawBlock;\n",
"import net.minecraft.world.level.block.entity.BlockEntity;\... | [] | false | be1c3fe0bdebdd8b | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 67e36825714c62d5962c856f47538a5044d41867 | 50e64e181cde72824167130464fee1ad92398895 | b0f912309eb935257c559d974915a9f872390e34 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/owner/BlockEntityPeripheralOwner.java | 1 | 2 | [
"import net.minecraft.world.level.block.entity.BlockEntity;\n",
"import org.jetbrains.annotations.NotNull;\n",
"import org.jetbrains.annotations.Nullable;\n",
"\n",
"import java.util.Objects;\n",
"import java.util.function.Function;\n",
"\n",
"public class BlockEntityPeripheralOwner<T extends BlockEnt... | [
" \n",
" if (tileEntity instanceof Nameable nameableEntity) {\n",
" result = nameableEntity.getCustomName().getString();\n",
" }\n",
" \n"
] | [
" return tileEntity.getPersistentData().getString(\"CustomName\");\n"
] | [
"\n",
" if (tileEntity instanceof Nameable nameableEntity) {\n",
" Component customName = nameableEntity.getCustomName();\n",
" if (customName != null) {\n",
" result = customName.toString();\n",
" }\n",
" }\n",
"\n"
] | [
" return result;\n",
" }\n",
"\n",
" @NotNull\n",
" @Override\n",
" public Level getLevel() {\n",
" return Objects.requireNonNull(tileEntity.getLevel());\n",
" }\n",
"\n",
" @NotNull\n",
" @Override\n",
" public BlockPos getPos() {\n",
" return ti... | [
" \n",
" if (tileEntity instanceof Nameable nameableEntity) {\n",
" result = nameableEntity.getCustomName().getString();\n",
" }\n",
" \n"
] | false | 9193286c8d4d66db | [
"A1",
"A2",
"A3",
"A4",
"A5"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 67e36825714c62d5962c856f47538a5044d41867 | 50e64e181cde72824167130464fee1ad92398895 | b0f912309eb935257c559d974915a9f872390e34 | src/main/java/de/srendi/advancedperipherals/common/data/BlockLootTables.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.data;\n",
"\n",
"import de.srendi.advancedperipherals.common.setup.Registration;\n",
"import net.minecraft.data.loot.BlockLootSubProvider;\n",
"import net.minecraft.world.flag.FeatureFlags;\n",
"import net.minecraft.world.level.block.Block;\n",
"import net.m... | [
" protected void generate() {\n"
] | [
" protected void addTables() {\n",
" Registration.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(this::dropSelf);\n"
] | [
" protected void addTables() {\n"
] | [
" Registration.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(registeredBlock -> {\n",
" //Allow blocks to transfer their name to the dropped block when broken\n",
" this.add(registeredBlock, (block) -> this.createNameableBlockEntityTable(block));\n",
" });\n... | [
" protected void generate() {\n"
] | false | 7adfd849f1db2a2a | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6ffc93ce87b5addfacfd6cab694555e2fb998d73 | 19963b82ab70e921ffc02d4b5720184b581eeeed | e2ec1eeb32be0c5274acef864965c03a494b5867 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/base/IPeripheralOwner.java | 0 | 1 | [
" CompoundTag getDataStorage();\n",
"\n",
" int getFuelCount();\n",
"\n",
" int getFuelMaxCount();\n",
"\n",
" boolean consumeFuel(int count, boolean simulate);\n",
"\n",
" void addFuel(int count);\n",
"\n",
" <T> T withPlayer(Function<APFakePlayer, T> function);\n",
"\n",
... | [
" boolean move(@Nonnull Level level, @Nonnull BlockPos pos);\n",
"\n",
" // Strange methods, that shouldn't exists ...\n",
" void triggerClientServerSync();\n"
] | [
" boolean move(@Nonnull World world, @Nonnull BlockPos pos);\n",
"\n",
" // Strange methods, that shouldn't exists ...\n",
" void triggerClientServerSync();\n"
] | [
" boolean move(@Nonnull World world, @Nonnull BlockPos pos);\n"
] | [
"}\n"
] | [
" boolean move(@Nonnull Level level, @Nonnull BlockPos pos);\n"
] | false | 445ed0588dde99ac | [
"A1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6ffc93ce87b5addfacfd6cab694555e2fb998d73 | 19963b82ab70e921ffc02d4b5720184b581eeeed | e2ec1eeb32be0c5274acef864965c03a494b5867 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/base/TileEntityPeripheralOwner.java | 0 | 2 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.base;\n",
"\n",
"import de.srendi.advancedperipherals.common.blocks.base.APTileEntityBlock;\n",
"import de.srendi.advancedperipherals.common.blocks.tileentity.InventoryManagerTile;\n",
"import de.srendi.advancedperipherals.common.configurati... | [
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.core.Direction;\n",
"import net.minecraft.nbt.CompoundTag;\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.lev... | [
"import net.minecraft.block.BlockState;\n",
"import net.minecraft.entity.player.PlayerEntity;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.nbt.CompoundNBT;\n",
"import net.minecraft.tileentity.TileEntity;\n",
"import net.minecraft.util.Direction;\n",
"import net.minecraft.util.mat... | [
"import net.minecraft.entity.player.PlayerEntity;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.nbt.CompoundNBT;\n",
"import net.minecraft.tileentity.TileEntity;\n",
"import net.minecraft.util.Direction;\n",
"import net.minecraft.util.math.BlockPos;\n",
"import net.minecraft.world.... | [
"import net.minecraftforge.energy.CapabilityEnergy;\n",
"import org.jetbrains.annotations.NotNull;\n",
"import org.jetbrains.annotations.Nullable;\n",
"\n",
"import java.util.function.Function;\n",
"\n",
"public class TileEntityPeripheralOwner<T extends BlockEntity & IPeripheralTileEntity> implements IP... | [
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.core.Direction;\n",
"import net.minecraft.nbt.CompoundTag;\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.lev... | false | b8c31c3b42e0dab1 | [
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8"
] | side A | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6ffc93ce87b5addfacfd6cab694555e2fb998d73 | 19963b82ab70e921ffc02d4b5720184b581eeeed | e2ec1eeb32be0c5274acef864965c03a494b5867 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/base/TileEntityPeripheralOwner.java | 1 | 2 | [
" int extractedCount = storage.extractEnergy(energyCount, true);\n",
" if (extractedCount == energyCount) {\n",
" if (simulate)\n",
" return true;\n",
" storage.extractEnergy(energyCount, false);\n",
" return true;\n",
... | [
" public void triggerClientServerSync() {\n",
" Level level = tileEntity.getLevel();\n",
" if (level != null) {\n",
" tileEntity.setChanged();\n",
" BlockPos pos = tileEntity.getBlockPos();\n",
" BlockState state = tileEntity.getBlockState();\n",
" ... | [
" public void triggerClientServerSync() {\n",
" World world = tileEntity.getLevel();\n",
" if (world != null) {\n",
" tileEntity.setChanged();\n",
" BlockPos pos = tileEntity.getBlockPos();\n",
" BlockState state = tileEntity.getBlockState();\n",
" ... | [] | [
" public <T1> T1 withPlayer(Function<APFakePlayer, T1> function) {\n",
" throw new RuntimeException(\"Not implemented yet\");\n",
" }\n",
"\n",
" @Override\n",
" public ItemStack getToolInMainHand() {\n",
" return ItemStack.EMPTY;\n",
" }\n",
"\n",
" @Override\n",
... | [] | false | 1e9359af2dca830f | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6ffc93ce87b5addfacfd6cab694555e2fb998d73 | 19963b82ab70e921ffc02d4b5720184b581eeeed | e2ec1eeb32be0c5274acef864965c03a494b5867 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/operations/AutomataCorePeripheral.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.operations;\n",
"\n",
"import dan200.computercraft.api.lua.MethodResult;\n",
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n",
"import de.srendi.advancedperipherals.common.ad... | [
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.world.phys.AABB;\n"
] | [
"import net.minecraft.entity.item.ItemEntity;\n",
"import net.minecraft.nbt.CompoundNBT;\n",
"import net.minecraft.util.ResourceLocation;\n",
"import net.minecraft.util.math.AxisAlignedBB;\n",
"import net.minecraft.util.math.BlockPos;\n"
] | [
"import net.minecraft.nbt.CompoundNBT;\n",
"import net.minecraft.util.math.AxisAlignedBB;\n",
"import net.minecraft.util.math.BlockPos;\n"
] | [
"\n",
"import javax.annotation.Nonnull;\n",
"import javax.annotation.Nullable;\n",
"import java.util.Map;\n",
"import java.util.Optional;\n",
"import java.util.function.Function;\n",
"\n",
"public abstract class AutomataCorePeripheral extends FuelConsumingPeripheral {\n",
"\n",
" protected stat... | [
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.world.phys.AABB;\n"
] | false | 9495d04f86819b16 | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 16b9e7f894038b7c9b6f4f8260cf897b3a4adaef | 3e6610fdf2e6de3236d6280be36e415e9575d19a | c82a3123abb0749991e262f866e873f2b67dfe81 | src/main/java/de/srendi/advancedperipherals/common/events/Events.java | 0 | 1 | [
" CommandSourceStack source = event.getParseResults().getContext().getSource();\n",
" if (source.getEntity() != null) {\n",
" username = source.getEntity().getDisplayName().getString();\n",
" uuid = source.getEntity().getUUID().toString();\n",
" }\n",
" if... | [
" @SubscribeEvent\n",
" public static void onChatBox(ServerChatEvent event) {\n"
] | [
" @SubscribeEvent\n",
" public static void onChatBox(ServerChatEvent.Submitted event) {\n"
] | [
" @SubscribeEvent(priority = EventPriority.HIGHEST)\n",
" public static void onChatBox(ServerChatEvent.Submitted event) {\n"
] | [
" if (APConfig.PERIPHERALS_CONFIG.enableChatBox.get()) {\n",
" String message = event.getMessage().getString();\n",
" boolean isHidden = false;\n",
" if (message.startsWith(\"$\")) {\n",
" event.setCanceled(true);\n",
" message = messag... | [
" @SubscribeEvent(priority = EventPriority.HIGHEST)\n",
" public static void onChatBox(ServerChatEvent event) {\n"
] | false | e57e2b58bee15d3b | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 7079c0de61f99d8cdd8259ada3cc14fb58b67658 | fcd922e55d0b19ce6b09fade689fe727b2d5f43a | 0f25834d224f72a894540d07e125b5d7e793e05a | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/BlockReaderPeripheral.java | 0 | 1 | [
"\n",
" public static final String TYPE = \"blockReader\";\n",
"\n",
" public BlockReaderPeripheral(BlockReaderEntity tileEntity) {\n",
" super(TYPE, new BlockEntityPeripheralOwner<>(tileEntity));\n",
" }\n",
"\n",
" @Override\n",
" public boolean isEnabled() {\n",
" r... | [
" if (getBlockInFront().is(Blocks.AIR) && !(getBlockInFront().getBlock() instanceof EntityBlock))\n",
" return null;\n",
" BlockEntity target = getLevel().getBlockEntity(\n",
" getPos().relative(\n",
" getLevel().getBlockState(getPos()).getValue... | [
" if (getBlockInFront().is(Blocks.AIR) && !(getBlockInFront().getBlock() instanceof EntityBlock))\n",
" return null;\n",
" BlockEntity target = getLevel().getBlockEntity(\n",
" getPos().relative(\n",
" getLevel().getBlockState(getPos()).getValue... | [
" if (getBlockInFront().is(Blocks.AIR) && !(getBlockInFront().getBlock() instanceof EntityBlock)) return null;\n",
" BlockEntity target = getLevel().getBlockEntity(getPos().relative(getLevel().getBlockState(getPos()).getValue(APBlockEntityBlock.FACING)));\n",
" return NBTUtil.toLua(target.s... | [
" }\n",
"\n",
" private BlockState getBlockInFront() {\n",
" return getLevel().getBlockState(getPos().relative(getLevel().getBlockState(getPos()).getValue(APBlockEntityBlock.FACING)));\n",
" }\n",
"}\n"
] | [
" if (getBlockInFront().is(Blocks.AIR) && !(getBlockInFront().getBlock() instanceof EntityBlock)) return null;\n",
" BlockEntity target = getLevel().getBlockEntity(getPos().relative(getLevel().getBlockState(getPos()).getValue(APBlockEntityBlock.FACING)));\n",
" return NBTUtil.toLua(target.s... | false | 8c4c997c1239e0ee | [
"B1",
"B2",
"B3"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | ed84d4be781710b3e6f37c767124782a2793951b | e9f3fda78c443ac3fa6aa7b123ef91ec237e7bb5 | 464a26f54bf041e4c04ef1b8e2b808f58bd223b5 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/InventoryManagerPeripheral.java | 0 | 1 | [
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public final Map<String, Object> getItemInOffHand() throws LuaException {\n",
" return LuaConverter.stackToObject(getOwnerPlayer().getOffhandItem());\n",
" }\n",
"\n",
" private Player getOwnerPlayer() throws LuaException {\n"... | [
" slot = getArmorSlot(slot);\n",
" } else if (slot == 36) {\n"
] | [
" slot = getArmorSlot(slot);\n",
" } else if(slot == 36) {\n"
] | [
" slot = slot - 100;\n",
" } else if(slot == 36) {\n"
] | [
" handler = new PlayerOffhandInvWrapper(getOwnerPlayer().getInventory());\n",
" // Set the \"from slot\" to zero so the offhand wrapper can work with that\n",
" slot = 0;\n",
" } else {\n",
" handler = new PlayerInvWrapper(getOwnerPlayer().getInventory());\... | [
" slot = slot - 100;\n",
" } else if (slot == 36) {\n"
] | false | 2491e846ff6a61b9 | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | ed84d4be781710b3e6f37c767124782a2793951b | e9f3fda78c443ac3fa6aa7b123ef91ec237e7bb5 | 464a26f54bf041e4c04ef1b8e2b808f58bd223b5 | src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RsItemHandler.java | 0 | 3 | [
"package de.srendi.advancedperipherals.common.addons.refinedstorage;\n",
"\n",
"import com.refinedmods.refinedstorage.api.network.INetwork;\n",
"import com.refinedmods.refinedstorage.api.util.Action;\n",
"import com.refinedmods.refinedstorage.api.util.IComparer;\n",
"import de.srendi.advancedperipherals.A... | [
" *\n"
] | [
" * Used to transfer item between an inventory and the ME system.\n"
] | [] | [
" * @see de.srendi.advancedperipherals.common.addons.computercraft.peripheral.RsBridgePeripheral\n",
" */\n",
"public class RsItemHandler implements IStorageSystemItemHandler {\n",
"\n",
" @NotNull\n",
" private final INetwork network;\n",
"\n",
" public RsItemHandler(@NotNull INetwork networ... | [
" *\n"
] | false | 3eda09ec921d861d | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | ed84d4be781710b3e6f37c767124782a2793951b | e9f3fda78c443ac3fa6aa7b123ef91ec237e7bb5 | 464a26f54bf041e4c04ef1b8e2b808f58bd223b5 | src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RsItemHandler.java | 1 | 3 | [
" * @see de.srendi.advancedperipherals.common.addons.computercraft.peripheral.RsBridgePeripheral\n",
" */\n",
"public class RsItemHandler implements IStorageSystemItemHandler {\n",
"\n",
" @NotNull\n",
" private final INetwork network;\n",
"\n",
" public RsItemHandler(@NotNull INetwork networ... | [
" if (item == null)\n"
] | [
" if(item == null)\n"
] | [
" AdvancedPeripherals.debug(\"Trying to extract item: \" + item + \" from filter: \" + filter);\n",
" if(item == null)\n"
] | [
" return ItemStack.EMPTY;\n"
] | [
" if (item == null)\n",
" AdvancedPeripherals.debug(\"Trying to extract item: \" + item + \" from filter: \" + filter);\n",
" if(item == null)\n"
] | false | 1b99e91e95c3828d | [
"A1",
"B1",
"B2"
] | A then B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | ed84d4be781710b3e6f37c767124782a2793951b | e9f3fda78c443ac3fa6aa7b123ef91ec237e7bb5 | 464a26f54bf041e4c04ef1b8e2b808f58bd223b5 | src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RsItemHandler.java | 2 | 3 | [
" return ItemStack.EMPTY;\n"
] | [
" 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 | 1e893ae5521e562b | [
"B1",
"B2",
"B3"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 64694b84b229ba053951e7564645fa35d1cedc28 | b53a7773d821b77e4ad8f12b7d0c3096bf114b48 | c1ce98e53e3109ca369d39a434e588884d3b8d60 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/RsBridgePeripheral.java | 0 | 1 | [
" if (!isAvailable())\n",
" return notConnected();\n",
"\n",
"\n",
" Pair<ItemFilter, String> filter = ItemFilter.parse(arguments.getTable(0));\n",
" if (filter.rightPresent())\n",
" return MethodResult.of(null, filter.getRight());\n",
"\n",
" ItemSt... | [
" @Override\n",
" public final MethodResult craftFluid(IComputerAccess computerAccess, IArguments arguments) throws LuaException {\n",
" if (!isAvailable())\n"
] | [
" @LuaFunction(mainThread = true)\n",
" public final MethodResult craftFluid(IArguments arguments, int count) throws LuaException {\n",
" if (!isConnected())\n"
] | [
" @LuaFunction(mainThread = true)\n",
" public final MethodResult craftFluid(IArguments arguments) throws LuaException {\n",
" if (!isConnected())\n"
] | [
" return notConnected();\n",
"\n",
" Pair<FluidFilter, String> filter = FluidFilter.parse(arguments.getTable(0));\n",
" if (filter.rightPresent())\n",
" return MethodResult.of(null, filter.getRight());\n",
"\n",
" FluidStack stack = RefinedStorage.findFluidFrom... | [
" @Override\n",
" public final MethodResult craftFluid(IComputerAccess computerAccess, IArguments arguments) throws LuaException {\n",
" if (!isAvailable())\n"
] | false | b8336f157155934a | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 70fcad1deace2e3de1877e562ca693d1bbc41316 | 529d8a6ef3a4b662d39045bcee856264014d087a | 761d1b70cc59e7ff74fe130ed113d0861c5634bb | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/plugins/AutomataBlockHandPlugin.java | 0 | 1 | [
" public @Nullable IPeripheralOperation<?>[] getOperations() {\n",
" return new IPeripheralOperation[]{DIG, USE_ON_BLOCK};\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public final MethodResult digBlock(@NotNull IArguments arguments) throws LuaException {\n",
" Map... | [
" }\n",
" return MethodResult.of(true);\n"
] | [
" return MethodResult.of(true);\n"
] | [
" return MethodResult.of(true, result.getRight());\n"
] | [
" });\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public final MethodResult useOnBlock(@NotNull IArguments arguments) throws LuaException {\n",
" Map<?, ?> opts = arguments.count() > 0 ? arguments.getTable(0) : Collections.emptyMap();\n",
" boolean sneak = Tab... | [
" }\n",
" return MethodResult.of(true, result.getRight());\n"
] | false | 25ce2f678b1e51b5 | [
"A1",
"B1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 70fcad1deace2e3de1877e562ca693d1bbc41316 | 529d8a6ef3a4b662d39045bcee856264014d087a | 761d1b70cc59e7ff74fe130ed113d0861c5634bb | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/plugins/AutomataEntityTransferPlugin.java | 0 | 2 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.peripheral.plugins;\n",
"\n",
"import dan200.computercraft.api.lua.IArguments;\n",
"import dan200.computercraft.api.lua.LuaException;\n",
"import dan200.computercraft.api.lua.LuaFunction;\n",
"import dan200.computercraft.api.lua.MethodResu... | [
"\n",
"import org.jetbrains.annotations.NotNull;\n"
] | [
"\n"
] | [] | [
"import org.jetbrains.annotations.Nullable;\n"
] | [
"\n",
"import org.jetbrains.annotations.NotNull;\n"
] | false | 04faed7904f54547 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 70fcad1deace2e3de1877e562ca693d1bbc41316 | 529d8a6ef3a4b662d39045bcee856264014d087a | 761d1b70cc59e7ff74fe130ed113d0861c5634bb | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/plugins/AutomataEntityTransferPlugin.java | 1 | 2 | [
"import org.jetbrains.annotations.Nullable;\n"
] | [
"import java.util.Collections;\n",
"import java.util.Map;\n"
] | [] | [
"\n"
] | [
"import java.util.function.Predicate;\n",
"\n",
"import static de.srendi.advancedperipherals.common.addons.computercraft.operations.SingleOperation.CAPTURE_ANIMAL;\n",
"\n",
"public class AutomataEntityTransferPlugin extends AutomataCorePlugin {\n",
"\n",
" private static final String ENTITY_NBT_KEY ... | [
"import java.util.Collections;\n",
"import java.util.Map;\n"
] | false | 7ff51758ffc91211 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | c87c2e4b77813e19947ba090aad4cfbb9ee8c7bb | ed84d4be781710b3e6f37c767124782a2793951b | 9ef4b66a65e41a7a6f9657bd136fa9ca6dd126c1 | src/main/java/de/srendi/advancedperipherals/common/addons/APAddons.java | 0 | 2 | [
"package de.srendi.advancedperipherals.common.addons;\n",
"\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperipherals.common.addons.refinedstorage.RefinedStorage;\n",
"import net.minecraft.resources.ResourceLocation;\n",
"import net.minecraft.world.entity.pla... | [
"import top.theillusivec4.curios.api.CuriosApi;\n",
"import top.theillusivec4.curios.api.SlotResult;\n",
"import top.theillusivec4.curios.api.SlotTypeMessage;\n"
] | [
"import top.theillusivec4.curios.api.SlotTypeMessage;\n"
] | [] | [
"\n",
"import java.util.List;\n",
"\n",
"@Mod.EventBusSubscriber(modid = AdvancedPeripherals.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)\n",
"public class APAddons {\n",
"\n",
" public static final String CURIOS_MODID = \"curios\";\n",
" public static final String REFINEDSTORAGE_MODID = \"refi... | [
"import top.theillusivec4.curios.api.CuriosApi;\n",
"import top.theillusivec4.curios.api.SlotResult;\n",
"import top.theillusivec4.curios.api.SlotTypeMessage;\n"
] | false | 74097fcf3265938f | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | c87c2e4b77813e19947ba090aad4cfbb9ee8c7bb | ed84d4be781710b3e6f37c767124782a2793951b | 9ef4b66a65e41a7a6f9657bd136fa9ca6dd126c1 | src/main/java/de/srendi/advancedperipherals/common/addons/APAddons.java | 1 | 2 | [
" public static boolean appliedEnergisticsLoaded;\n",
" public static boolean mekanismLoaded;\n",
"\n",
" static {\n",
" ModList modList = ModList.get();\n",
" curiosLoaded = modList.isLoaded(CURIOS_MODID);\n",
" refinedStorageLoaded = modList.isLoaded(REFINEDSTORAGE_MODID)... | [
" InterModComms.sendTo(CURIOS_MODID, SlotTypeMessage.REGISTER_TYPE,\n",
" () -> new SlotTypeMessage.Builder(\"glasses\")\n",
" .size(1)\n",
" .icon(new ResourceLocation(AdvancedPeripherals.MOD_ID, \"slot/empty_glasses_slot\"))\n",
" ... | [
" InterModComms.sendTo(\"curios\", SlotTypeMessage.REGISTER_TYPE, () -> new SlotTypeMessage.Builder(\"glasses\").size(1).build());\n"
] | [
" // InterModComms.sendTo(\"curios\", SlotTypeMessage.REGISTER_TYPE, () -> new SlotTypeMessage.Builder(\"glasses\").size(1).build());\n"
] | [
" }\n",
"}\n"
] | [
" InterModComms.sendTo(CURIOS_MODID, SlotTypeMessage.REGISTER_TYPE,\n",
" () -> new SlotTypeMessage.Builder(\"glasses\")\n",
" .size(1)\n",
" .icon(new ResourceLocation(AdvancedPeripherals.MOD_ID, \"slot/empty_glasses_slot\"))\n",
" ... | false | 11950fea29e5ccab | [
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9",
"A10",
"A11",
"A12",
"A13",
"A14",
"A15"
] | side A | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | c87c2e4b77813e19947ba090aad4cfbb9ee8c7bb | ed84d4be781710b3e6f37c767124782a2793951b | 9ef4b66a65e41a7a6f9657bd136fa9ca6dd126c1 | src/main/java/de/srendi/advancedperipherals/common/util/ServerWorker.java | 0 | 1 | [
"import net.minecraftforge.fml.common.Mod;\n",
"\n",
"import java.util.ArrayDeque;\n",
"import java.util.Queue;\n",
"\n",
"@Mod.EventBusSubscriber(modid = AdvancedPeripherals.MOD_ID)\n",
"public class ServerWorker {\n",
"\n",
" private static final Queue<Runnable> callQueue = new ArrayDeque<>();\... | [
" tasksRan++;\n",
" AdvancedPeripherals.debug(\"Running task #\" + tasksRan + \". Running \" + runnable.getClass());\n"
] | [] | [
" AdvancedPeripherals.debug(\"Running queued server worker call: \" + runnable);\n"
] | [
" runnable.run();\n",
" }\n",
" }\n",
" }\n",
"}\n"
] | [
" tasksRan++;\n",
" AdvancedPeripherals.debug(\"Running task #\" + tasksRan + \". Running \" + runnable.getClass());\n"
] | false | 03da1e2722e02908 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 170510b7707208feb40854fdfc810a8f824eed3f | e374a38f2d87d9203eecde183a5831388ff35646 | 38988f3564d84702e9ef71b490a91ed8a82a74a8 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/plugins/AutomataEntityHandPlugin.java | 0 | 1 | [
" TurtlePeripheralOwner owner = automataCore.getPeripheralOwner();\n",
" HitResult entityHit = owner.withPlayer(APFakePlayer.wrapActionWithRot(yaw, pitch, p -> p.findHit(false, true, suitableEntity)));\n",
" if (entityHit.getType() == HitResult.Type.MISS)\n",
" return MethodRes... | [
" owner.getLevel().getEntities((Entity) null, box.inflate(automataCore.getInteractionRadius()), suitableEntity).forEach(entity -> entities.add(LuaConverter.completeEntityWithPositionToLua(entity, itemInHand, currentPos, detailed)));\n"
] | [
" owner.getLevel().getEntities((Entity) null, box.inflate(automataCore.getInteractionRadius()), suitableEntity).forEach(entity -> entities.add(LuaConverter.completeEntityWithPositionToLua(entity, itemInHand, currentPos)));\n"
] | [
" List<Map<String, Object>> entities = owner.getLevel().getEntities((Entity) null, box.inflate(automataCore.getInteractionRadius()), suitableEntity).stream().map(entity -> LuaConverter.completeEntityWithPositionToLua(entity, itemInHand, currentPos)).toList();\n"
] | [
" return MethodResult.of(entities);\n",
" }\n",
"}\n"
] | [
" List<Map<String, Object>> entities = owner.getLevel().getEntities((Entity) null, box.inflate(automataCore.getInteractionRadius()), suitableEntity).stream().map(entity -> LuaConverter.completeEntityWithPositionToLua(entity, itemInHand, currentPos, detailed)).toList();\n"
] | false | 0e32e964863928a8 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | f971ce8c78a400a6ebba34a9f3a1139921777b36 | 59b5c30a10b0f24a98ca3b9ee297df36d322a473 | d117a60a24e1ce6904ae34be0db76c1bfd9b36ad | src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/AppEngApi.java | 1 | 2 | [
" if (stack.getRight() instanceof AEItemKey itemKey)\n",
" return parseItemStack(Pair.of(stack.getLeft(), itemKey), service);\n",
" if (stack.getRight() instanceof AEFluidKey fluidKey)\n"
] | [
" return parseFluidStack(Pair.of(stack.getLeft(), fluidKey), service);\n",
" if (APAddons.appMekLoaded && (stack.getRight() instanceof MekanismKey gasKey))\n",
" return parseChemStack(Pair.of(stack.getLeft(), gasKey));\n"
] | [
" return getObjectFromFluidStack(Pair.of(stack.getLeft(), fluidKey), service);\n",
" if (APAddons.appMekLoaded && (stack.getRight() instanceof MekanismKey gasKey))\n",
" return getObjectFromGasStack(Pair.of(stack.getLeft(), gasKey), service);\n"
] | [
" return getObjectFromFluidStack(Pair.of(stack.getLeft(), fluidKey), service);\n",
" if (APAddon.APP_MEKANISTICS.isLoaded() && (stack.getRight() instanceof MekanismKey gasKey))\n",
" return getObjectFromGasStack(Pair.of(stack.getLeft(), gasKey), service);\n"
] | [
"\n",
" AdvancedPeripherals.debug(\"Could not create table from unknown stack \" + stack.getRight().getClass() + \" - Report this to the maintainer of ap\", org.apache.logging.log4j.Level.WARN);\n",
" return Collections.emptyMap();\n",
" }\n",
"\n",
" public static Map<String, Object> ... | [
" return parseFluidStack(Pair.of(stack.getLeft(), fluidKey), service);\n",
" if (APAddon.APP_MEKANISTICS.isLoaded() && (stack.getRight() instanceof MekanismKey gasKey))\n",
" return parseChemStack(Pair.of(stack.getLeft(), gasKey));\n"
] | false | 7e3f1df6d84c31c1 | [
"A1",
"B2",
"A3"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 3223f08f8c694e3bad1331ec4a388f08f2a146d3 | 15881cf9ed7278f3664f41fa8cba027684156e49 | fae581e8a058d59aebdb46446bea43f867423763 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/base/IntegrationPeripheralProvider.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.base;\n",
"\n",
"import dan200.computercraft.api.peripheral.IPeripheral;\n",
"import dan200.computercraft.api.peripheral.IPeripheralProvider;\n"
] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.integrations.integrateddynamics.VariableStoreIntegration;\n"
] | [] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.integrations.BeaconIntegration;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania.ManaFlowerIntegration;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania.ManaPoolI... | [
"import de.srendi.advancedperipherals.common.addons.computercraft.integrations.mekanism.*;\n",
"import net.minecraft.tileentity.TileEntity;\n",
"import net.minecraft.util.Direction;\n",
"import net.minecraft.util.math.BlockPos;\n",
"import net.minecraft.world.World;\n",
"import net.minecraftforge.common.u... | [
"import de.srendi.advancedperipherals.common.addons.computercraft.integrations.BeaconIntegration;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania.ManaFlowerIntegration;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.integrations.botania.ManaPoolI... | false | f2946d2c7f63256a | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"A1"
] | B then A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | d948a0ecf8eb228779087041c5804134713334fa | ccd45c24b9171096e7283fb565e2d260dc842004 | ea263532fd4a7b327d116a3ae7f40a2c14c3ffaa | 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(stack.getItem() instanceof DISKDrive disk) {\n",
" if(disk.getKeyType().toString().equals(\"ae2:i\")) {\n"
] | [
" } else if(stack.getItem() instanceof DISKDrive disk) {\n",
" if(disk.getKeyType().toString().equals(\"ae2:i\")) {\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 long getTotalFluidStorage(IGridNode node) {\n",
" long total = 0;\n",
"\n... | [
" } /*else if (stack.getItem() instanceof DISKDrive disk) {\n",
" if (disk.getKeyType().toString().equals(\"ae2:i\")) {\n"
] | false | 0971e9debd48b2de | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | d948a0ecf8eb228779087041c5804134713334fa | ccd45c24b9171096e7283fb565e2d260dc842004 | ea263532fd4a7b327d116a3ae7f40a2c14c3ffaa | 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(stack.getItem() instanceof DISKDrive disk) {\n",
" if(disk.getKeyType().toString().equals(\"ae2:i\")) {\n",
" if(stack.getTag() == null) continue;\n"
] | [
" } else if(stack.getItem() instanceof DISKDrive disk) {\n",
" if(disk.getKeyType().toString().equals(\"ae2:i\")) {\n",
" if(stack.getTag() == null) continue;\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) numItemsInCell) / 8));\n",
" }\n",
" }*/\n",
" }\n",
" }\n",
" }\n",
"\n",
... | [
" } /* else if (stack.getItem() instanceof DISKDrive disk) {\n",
" if (disk.getKeyType().toString().equals(\"ae2:i\")) {\n",
" if (stack.getTag() == null) continue;\n"
] | false | 1a7e45dd48ea1f27 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | d948a0ecf8eb228779087041c5804134713334fa | ccd45c24b9171096e7283fb565e2d260dc842004 | ea263532fd4a7b327d116a3ae7f40a2c14c3ffaa | src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/AppEngApi.java | 2 | 3 | [
"\n",
" public static List<Object> listCells(IGridNode node) {\n",
" List<Object> items = new ArrayList<>();\n",
"\n",
" Iterator<IGridNode> iterator = node.getGrid().getMachineNodes(DriveBlockEntity.class).iterator();\n",
"\n",
" if (!iterator.hasNext()) return items;\n",
" ... | [
" } /*else if(stack.getItem() instanceof DISKDrive disk) {\n"
] | [
" } else if(stack.getItem() instanceof DISKDrive disk) {\n"
] | [
" } else if (stack.getItem() instanceof DISKDrive disk) {\n"
] | [
" items.add(getObjectFromDisk(disk, stack));\n",
" }*/\n",
" }\n",
" }\n",
"\n",
" return items;\n",
" }\n",
"\n",
" private static Map<String, Object> getObjectFromCell(BasicStorageCell cell, ItemStack stack) {\n",
" Map<Stri... | [
" } /*else if (stack.getItem() instanceof DISKDrive disk) {\n"
] | false | 40f4bc61ab5f3edf | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | d948a0ecf8eb228779087041c5804134713334fa | ccd45c24b9171096e7283fb565e2d260dc842004 | ea263532fd4a7b327d116a3ae7f40a2c14c3ffaa | src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/CraftJob.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.appliedenergistics;\n",
"\n",
"import appeng.api.networking.IGrid;\n",
"import appeng.api.networking.IGridNode;\n",
"import appeng.api.networking.crafting.*;\n",
"import appeng.api.networking.security.IActionSource;\n"
] | [] | [
"import appeng.api.networking.storage.IStorageService;\n",
"import appeng.api.stacks.AEItemKey;\n"
] | [
"import appeng.api.networking.storage.IStorageService;\n"
] | [
"import appeng.api.stacks.AEKey;\n",
"import dan200.computercraft.api.lua.ILuaCallback;\n",
"import dan200.computercraft.api.lua.LuaException;\n",
"import dan200.computercraft.api.lua.MethodResult;\n",
"import dan200.computercraft.api.peripheral.IComputerAccess;\n",
"import de.srendi.advancedperipherals.A... | [] | false | 34fabbdd55770650 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | b4361838b3e46fc76883b0d9db0a5a3e047a4d37 | 040f9709a4a718118a510cc9731fef7d5b73be1b | 965b89f04ff6612c4fa65d94a0c36b1b6e1aea55 | src/main/java/de/srendi/advancedperipherals/common/util/InventoryUtil.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.util;\n",
"\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... | [
"import net.minecraft.world.Container;\n",
"import net.minecraft.world.item.ItemStack;\n"
] | [
"import net.minecraft.inventory.IInventory;\n",
"import net.minecraft.item.ItemStack;\n"
] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.base.IPeripheralOwner;\n",
"import net.minecraft.inventory.IInventory;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.tileentity.TileEntity;\n",
"import net.minecraft.util.Direction;\n",
"import net.minecraft.world.Worl... | [
"import net.minecraftforge.common.capabilities.ICapabilityProvider;\n",
"import net.minecraftforge.common.util.LazyOptional;\n",
"import net.minecraftforge.items.CapabilityItemHandler;\n",
"import net.minecraftforge.items.IItemHandler;\n",
"import net.minecraftforge.items.ItemHandlerHelper;\n",
"import ne... | [
"import de.srendi.advancedperipherals.common.addons.computercraft.base.IPeripheralOwner;\n",
"import net.minecraft.core.Direction;\n",
"import net.minecraft.world.Container;\n",
"import net.minecraft.world.item.ItemStack;\n",
"import net.minecraft.world.level.Level;\n",
"import net.minecraft.world.level.b... | false | 0ef0e11248427224 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | cf423a8929fd4c896c0920f2b13d65ac17a7c568 | 1e1af1a49fb6882b7adcd275a37471593644306b | b23c1a66f15f429c413438b443c34470721083be | src/main/java/de/srendi/advancedperipherals/common/addons/appliedenergistics/AppEngApi.java | 0 | 1 | [
"import appeng.api.stacks.AEFluidKey;\n",
"import appeng.api.stacks.AEItemKey;\n",
"import appeng.api.stacks.AEKey;\n",
"import appeng.api.stacks.AEKeyType;\n",
"import appeng.api.stacks.KeyCounter;\n",
"import appeng.api.storage.AEKeyFilter;\n",
"import appeng.api.storage.IStorageProvider;\n",
"impor... | [
"import net.minecraftforge.fluids.FluidStack;\n",
"import net.minecraftforge.fml.ModList;\n"
] | [
"import net.minecraftforge.fml.ModList;\n"
] | [] | [
"import org.apache.logging.log4j.Level;\n",
"\n",
"import javax.annotation.Nullable;\n",
"import java.nio.charset.StandardCharsets;\n",
"import java.security.MessageDigest;\n",
"import java.security.NoSuchAlgorithmException;\n",
"import java.util.ArrayList;\n",
"import java.util.Collections;\n",
"im... | [
"import net.minecraftforge.fluids.FluidStack;\n",
"import net.minecraftforge.fml.ModList;\n"
] | false | d378438f6c47ab8d | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | c14bdda0aa3a90d66c1dfefc6300a5f54f1f4fff | bb85c674aea054c5f979766a4bfebcd185e1dda2 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/ARControllerPeripheral.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.peripheral;\n",
"\n",
"import dan200.computercraft.api.lua.LuaException;\n",
"import dan200.computercraft.api.lua.LuaFunction;\n",
"import dan200.computercraft.api.lua.MethodResult;\n",
"import de.srendi.advancedperipherals.common.argoggle... | [
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n",
"import de.srendi.advancedperipherals.lib.peripherals.owner.BlockEntityPeripheralOwner;\n"
] | [
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n",
"import de.srendi.advancedperipherals.lib.peripherals.owner.TileEntityPeripheralOwner;\n"
] | [
"import de.srendi.advancedperipherals.common.configuration.APConfig;\n",
"import de.srendi.advancedperipherals.lib.peripherals.BasePeripheral;\n",
"import de.srendi.advancedperipherals.lib.peripherals.owner.TileEntityPeripheralOwner;\n"
] | [
"\n",
"import java.util.Optional;\n",
"\n",
"public class ARControllerPeripheral extends BasePeripheral<BlockEntityPeripheralOwner<ARControllerTile>> {\n",
" public static final String TYPE = \"arController\";\n",
"\n",
" public ARControllerPeripheral(ARControllerTile tileEntity) {\n",
" ... | [
"import de.srendi.advancedperipherals.common.configuration.APConfig;\n",
"import de.srendi.advancedperipherals.lib.peripherals.BasePeripheral;\n",
"import de.srendi.advancedperipherals.common.addons.computercraft.owner.BlockEntityPeripheralOwner;\n"
] | false | bdafcfa642126146 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | c14bdda0aa3a90d66c1dfefc6300a5f54f1f4fff | bb85c674aea054c5f979766a4bfebcd185e1dda2 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/InventoryManagerPeripheral.java | 5 | 8 | [
" if (!stack.isEmpty()) {\n"
] | [
" Map<String, Object> map = new HashMap<>();\n",
" String displayName = stack.getDisplayName().getString();\n",
" CompoundTag nbt = stack.getTag(); //use getTag instead of getOrCreateTag to fix https://github.com/Seniorendi/AdvancedPeripherals/issues/177\n",
" ... | [
" Map<String, Object> map = new HashMap<>();\n",
" String displayName = stack.getDisplayName().getString();\n",
" CompoundNBT nbt = stack.getTag(); //use getTag instead of getOrCreateTag to fix https://github.com/Seniorendi/AdvancedPeripherals/issues/177\n",
" ... | [
" items.put(ArmorSlot.getSlotForItem(stack), LuaConverter.stackToObject(stack));\n"
] | [
" }\n",
" i++;\n",
" }\n",
" return items;\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public final boolean isPlayerEquipped() throws LuaException {\n"
] | [
" items.put(ArmorSlot.getSlotForItem(stack), LuaConverter.stackToObject(stack));\n"
] | false | 6a4c45103c8941a2 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | c14bdda0aa3a90d66c1dfefc6300a5f54f1f4fff | bb85c674aea054c5f979766a4bfebcd185e1dda2 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/plugins/AutomataWarpingPlugin.java | 0 | 1 | [
" }\n",
" if (!settings.contains(POINT_DATA_MARK)) {\n",
" settings.put(POINT_DATA_MARK, new CompoundTag());\n",
" }\n",
" return Pair.onlyRight(settings.getCompound(POINT_DATA_MARK));\n",
" }\n",
"\n",
" private int getWarpCost(SingleOperationContext conte... | [
" CompoundTag data = pairData.getRight();\n",
" if (data.getAllKeys().size() >= AdvancedPeripheralsConfig.endAutomataCoreWarpPointLimit)\n"
] | [
" CompoundNBT data = pairData.getRight();\n",
" if (data.getAllKeys().size() >= AdvancedPeripheralsConfig.endAutomataCoreWarpPointLimit)\n"
] | [
" CompoundNBT data = pairData.getRight();\n",
" if (data.getAllKeys().size() >= APConfig.METAPHYSICS_CONFIG.END_AUTOMATA_CORE_WARP_POINT_LIMIT.get())\n"
] | [
" return MethodResult.of(null, \"Cannot add new point, limit reached\");\n",
" data.put(name, NBTUtil.toNBT(automataCore.getPeripheralOwner().getPos()));\n",
" return MethodResult.of(true);\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n",
" public final MethodRes... | [
" CompoundTag data = pairData.getRight();\n",
" if (data.getAllKeys().size() >= APConfig.METAPHYSICS_CONFIG.END_AUTOMATA_CORE_WARP_POINT_LIMIT.get())\n"
] | false | b47a3041a7272d4a | [
"A1",
"B2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | c14bdda0aa3a90d66c1dfefc6300a5f54f1f4fff | bb85c674aea054c5f979766a4bfebcd185e1dda2 | src/main/java/de/srendi/advancedperipherals/common/util/ChunkManager.java | 0 | 5 | [
"package de.srendi.advancedperipherals.common.util;\n",
"\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n"
] | [
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.server.level.ServerLevel;\n",
"import net.minecraft.world.level.ChunkPos;\n",
"import net.minecraft.world.level.saveddata.SavedData;\n"
] | [
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n",
"import net.minecraft.nbt.CompoundNBT;\n",
"import net.minecraft.util.math.ChunkPos;\n",
"import net.minecraft.world.server.ServerWorld;\n",
"import net.minecraft.world.storage.WorldSavedData;\n"
] | [
"import de.srendi.advancedperipherals.common.configuration.APConfig;\n",
"import net.minecraft.nbt.CompoundNBT;\n",
"import net.minecraft.util.math.ChunkPos;\n",
"import net.minecraft.world.server.ServerWorld;\n",
"import net.minecraft.world.storage.WorldSavedData;\n"
] | [
"import net.minecraftforge.common.world.ForgeChunkManager;\n",
"import net.minecraftforge.event.TickEvent;\n",
"import net.minecraftforge.eventbus.api.SubscribeEvent;\n",
"import net.minecraftforge.fml.common.Mod;\n",
"import net.minecraftforge.fmllegacy.server.ServerLifecycleHooks;\n",
"import net.minecr... | [
"import de.srendi.advancedperipherals.common.configuration.APConfig;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.server.level.ServerLevel;\n",
"import net.minecraft.world.level.ChunkPos;\n",
"import net.minecraft.world.level.saveddata.SavedData;\n"
] | false | 951fd24d67ea2c98 | [
"B1",
"A2",
"A3",
"A4",
"A5"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | c14bdda0aa3a90d66c1dfefc6300a5f54f1f4fff | bb85c674aea054c5f979766a4bfebcd185e1dda2 | src/test/java/de/srendi/advancedperipherals/test/DummyPeripheralOwner.java | 3 | 5 | [
" return Direction.NORTH;\n",
" }\n",
"\n",
" @Override\n"
] | [
" public @Nullable\n",
" Player getOwner() {\n"
] | [
" public @Nullable PlayerEntity getOwner() {\n"
] | [
" @Nullable\n",
" public PlayerEntity getOwner() {\n"
] | [
" return null;\n",
" }\n",
"\n",
" @Override\n"
] | [
" @Nullable\n",
" public Player getOwner() {\n"
] | false | d0f618e800eed42f | null | needs new code | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | df046e9a198f8cc57891a976566e791038952d31 | d7ce27e48fa62d25f73d68cba2741f15d68ce19a | 118ab7d1e04b612f7eef2d17f6f7a8c71ec9f9f3 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MeBridgePeripheral.java | 2 | 4 | [
" return notConnected();\n",
"\n",
" MEStorage monitor = AppEngApi.getMonitor(node);\n",
" ICraftingService grid = node.getGrid().getService(ICraftingService.class);\n",
"\n",
" Pair<ItemFilter, String> filter = ItemFilter.parse(arguments.getTable(0));\n",
" if (fi... | [
" return MethodResult.of(false, filter.getRight());\n"
] | [
" if(filter.rightPresent())\n",
" return MethodResult.of(null, filter.getRight());\n"
] | [
" return MethodResult.of(null, filter.getRight());\n"
] | [
"\n",
" ItemFilter parsedFilter = filter.getLeft();\n",
" if (parsedFilter.isEmpty())\n",
" return MethodResult.of(false, \"EMPTY_FILTER\");\n",
" String cpuName = arguments.optString(1, \"\");\n",
" ICraftingCPU craftingCPU = getCraftingCPU(cpuName);\n",
"\n",
"... | [
" return MethodResult.of(false, filter.getRight());\n"
] | false | ce33c52fccd7ce3e | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | df046e9a198f8cc57891a976566e791038952d31 | d7ce27e48fa62d25f73d68cba2741f15d68ce19a | 118ab7d1e04b612f7eef2d17f6f7a8c71ec9f9f3 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MeBridgePeripheral.java | 3 | 4 | [
" List<Object> map = new ArrayList<>();\n",
"\n",
" for (ICraftingCPU iCraftingCPU : grid.getCpus()) {\n",
" Object cpu = AppEngApi.getObjectFromCPU(iCraftingCPU);\n",
" map.add(cpu);\n",
" }\n",
" return MethodResult.of(map);\n",
" }\n",
"\n",
... | [
" if (Objects.requireNonNull(cpu.getName()).getString().equals(cpuName)) {\n"
] | [
" if(Objects.requireNonNull(cpu.getName()).getString().equals(cpuName)) {\n"
] | [
" if (cpu.getName() != null && cpu.getName().getString().equals(cpuName)) {\n"
] | [
" return cpu;\n",
" }\n",
" }\n",
"\n",
" return null;\n",
" }\n",
"}\n"
] | [
" if (cpu.getName() != null && cpu.getName().getString().equals(cpuName)) {\n"
] | false | d58e44150ce36464 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | b709e9285c2d5cf4ffb4de38cc22436a9bc550c1 | 3bbd4449589d022e7d5ffb4e5fb32ce87b546269 | 15e69cc4922fde9bbe07223580589a4173268395 | src/main/java/de/srendi/advancedperipherals/common/items/WeakAutomataCore.java | 1 | 2 | [
" WeakAutomataCoreRecord endSoulRecord = new WeakAutomataCoreRecord(\n"
] | [
" new HashMap<Class<? extends Entity>, Integer>() {{\n",
" put(EndermanEntity.class, 10);\n"
] | [
" new HashMap<Class<? extends Entity>, Integer>(){{ put(EndermanEntity.class, 10); }}, Items.END_AUTOMATA_CORE.get()\n"
] | [
" new HashMap<String, Integer>(){{\n",
" put(EntityType.ENDERMAN.getRegistryName().toString(), 10);\n"
] | [
" }}, Items.END_AUTOMATA_CORE.get()\n",
" );\n",
" WeakAutomataCoreRecord husbandrySoulRecord = new WeakAutomataCoreRecord(\n",
" new HashMap<String, Integer>() {{\n",
" put(EntityType.COW.getRegistryName().toString(), 3);\n",
" ... | [
" new HashMap<Class<? extends Entity>, Integer>() {{\n",
" put(EndermanEntity.class, 10);\n"
] | false | 2ffa1aa92a2a19cf | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | b138a953eecc460ee15ca5b37ea8ed6d132c048b | eb7b75026f4d608c7077972d91b1485afb1d2e4d | 0b859b725c24e13e6d2dbccedbbc3c3ab9612bdc | src/main/java/de/srendi/advancedperipherals/common/addons/minecolonies/MineColonies.java | 0 | 1 | [
" //All global possible researches\n",
" IGlobalResearchTree globalTree = IGlobalResearchTree.getInstance();\n",
" //The research tree of the colony\n",
" ILocalResearchTree colonyTree = colony.getResearchManager().getResearchTree();\n",
"\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 (ItemStorage item : research.getCostList())\n",
" cost.add(LuaConverter.stackToObject(item.getItemStack(), item.getAmount()));\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()... | [] | false | d26c13bad297c9ea | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 94cfd98924f4480b124d5cdf40479d60df3e36ab | 12fde39ac517aabf681be1224571567de6c0ef70 | 17f231ccd2a322ea0421b2344dd61b5050dbb055 | src/main/java/de/srendi/advancedperipherals/common/configuration/AdvancedPeripheralsConfig.java | 0 | 3 | [
"package de.srendi.advancedperipherals.common.configuration;\n",
"\n",
"import net.minecraftforge.common.ForgeConfigSpec;\n",
"\n",
"public class AdvancedPeripheralsConfig {\n",
"\n",
" //Restrictions\n",
" public static int chatBoxCooldown;\n",
" public static int playerDetMaxRange;\n",
... | [
" public static boolean enableARGoggles;\n"
] | [] | [] | [
"\n",
" public static class CommonConfig {\n",
"\n",
" //Restrictions\n",
" final ForgeConfigSpec.IntValue CHAT_BOX_COOLDOWN;\n",
" final ForgeConfigSpec.IntValue PLAYER_DET_MAX_RANGE;\n",
" final ForgeConfigSpec.IntValue ENERGY_DETECTOR_MAX_FLOW;\n",
"\n",
" //... | [
" public static boolean enableARGoggles;\n"
] | false | 2a18357acdfd930e | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 94cfd98924f4480b124d5cdf40479d60df3e36ab | 12fde39ac517aabf681be1224571567de6c0ef70 | 17f231ccd2a322ea0421b2344dd61b5050dbb055 | src/main/java/de/srendi/advancedperipherals/common/configuration/AdvancedPeripheralsConfig.java | 1 | 3 | [
"\n",
" public static class CommonConfig {\n",
"\n",
" //Restrictions\n",
" final ForgeConfigSpec.IntValue CHAT_BOX_COOLDOWN;\n",
" final ForgeConfigSpec.IntValue PLAYER_DET_MAX_RANGE;\n",
" final ForgeConfigSpec.IntValue ENERGY_DETECTOR_MAX_FLOW;\n",
"\n",
" //... | [
" final ForgeConfigSpec.BooleanValue ENABLE_AR_GOGGLES;\n"
] | [] | [] | [
"\n",
" CommonConfig(final ForgeConfigSpec.Builder builder) {\n",
" builder.comment(\"\").push(\"Restrictions\");\n",
"\n",
" CHAT_BOX_COOLDOWN = builder.comment(\"Defines the chat box cooldown for message sending.\").defineInRange(\"chatBoxCooldown\", 10, 1, 100000);\n",
" ... | [
" final ForgeConfigSpec.BooleanValue ENABLE_AR_GOGGLES;\n"
] | false | 6091fde4bd0ccc90 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 94cfd98924f4480b124d5cdf40479d60df3e36ab | 12fde39ac517aabf681be1224571567de6c0ef70 | 17f231ccd2a322ea0421b2344dd61b5050dbb055 | src/main/java/de/srendi/advancedperipherals/common/items/base/BaseBlockItem.java | 0 | 1 | [
"import net.minecraft.item.Item;\n",
"import net.minecraft.item.ItemGroup;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.util.NonNullList;\n",
"import net.minecraft.util.text.ITextComponent;\n",
"import net.minecraft.util.text.TranslationTextComponent;\n",
"import net.minecraft.wor... | [
"\n",
" @ObjectHolder(\"computercraft:pocket_computer_normal\")\n",
" public static Item POCKET_NORMAL;\n",
" @ObjectHolder(\"computercraft:pocket_computer_advanced\")\n",
" public static Item POCKET_ADVANCED;\n"
] | [
" @ObjectHolder(\"computercraft:turtle_normal\") public static Item TURTLE_NORMAL;\n",
" @ObjectHolder(\"computercraft:turtle_advanced\") public static Item TURTLE_ADVANCED;\n"
] | [] | [
"\n",
" @ObjectHolder(\"computercraft:pocket_computer_normal\")\n",
" public static Item POCKET_NORMAL;\n",
" @ObjectHolder(\"computercraft:pocket_computer_advanced\")\n",
" public static Item POCKET_ADVANCED;\n",
"\n",
" public BaseBlockItem(Block blockIn) {\n",
" super(blockIn,... | [] | false | 56ac68f72a096eee | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 94cfd98924f4480b124d5cdf40479d60df3e36ab | 12fde39ac517aabf681be1224571567de6c0ef70 | 17f231ccd2a322ea0421b2344dd61b5050dbb055 | src/main/java/de/srendi/advancedperipherals/common/setup/Blocks.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.setup;\n",
"\n",
"import de.srendi.advancedperipherals.common.blocks.*;\n",
"import de.srendi.advancedperipherals.common.items.*;\n",
"import net.minecraft.block.Block;\n",
"import net.minecraft.item.BlockItem;\n",
"import net.minecraftforge.fml.RegistryObje... | [
" public static final RegistryObject<Block> AR_CONTROLLER = register(\"ar_controller\", ARControllerBlock::new, ARControllerItem::new);\n",
" public static final RegistryObject<Block> PERIPHERAL_CASING = register(\"peripheral_casing\", PeripheralCasingBlock::new, PeripheralCasingItem::new);\n"
] | [
" public static final RegistryObject<Block> ME_BRIDGE = register(\"me_bridge\", MeBridge::new, MeBridgeItem::new);\n",
" public static final RegistryObject<Block> RS_BRIDGE = register(\"rs_bridge\", RsBridge::new, RsBridgeItem::new);\n"
] | [
" public static final RegistryObject<Block> PERIPHERAL_CASING = register(\"peripheral_casing\", PeripheralCasingBlock::new, PeripheralCasingItem::new);\n",
" public static final RegistryObject<Block> INVENTORY_MANAGER = register(\"inventory_manager\", InventoryManagerBlock::new, InventoryManagerItem::new);\... | [
"\n",
" static void register() {}\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> register(S... | [
" public static final RegistryObject<Block> PERIPHERAL_CASING = register(\"peripheral_casing\", PeripheralCasingBlock::new, PeripheralCasingItem::new);\n",
" public static final RegistryObject<Block> AR_CONTROLLER = register(\"ar_controller\", ARControllerBlock::new, ARControllerItem::new);\n",
" publi... | false | 72014b2704dac306 | [
"A2",
"A1",
"B2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 94cfd98924f4480b124d5cdf40479d60df3e36ab | 12fde39ac517aabf681be1224571567de6c0ef70 | 17f231ccd2a322ea0421b2344dd61b5050dbb055 | src/main/java/de/srendi/advancedperipherals/common/setup/Items.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.setup;\n",
"\n",
"import de.srendi.advancedperipherals.common.items.ARGogglesItem;\n",
"import de.srendi.advancedperipherals.common.items.ChunkControllerItem;\n",
"import de.srendi.advancedperipherals.common.items.ComputerToolItem;\n",
"import de.srendi.advanc... | [
" public static final RegistryObject<ARGogglesItem> AR_GOGGLES = Registration.ITEMS.register(\"ar_goggles\", ARGogglesItem::new);\n"
] | [] | [
" public static final RegistryObject<Item> COMPUTER_TOOL = Registration.ITEMS.register(\"computer_tool\", ComputerToolItem::new);\n",
" public static final RegistryObject<Item> MEMORY_CARD = Registration.ITEMS.register(\"memory_card\", MemoryCardItem::new);\n"
] | [
"\n",
" public static void register() {}\n",
"\n",
"\n",
"}\n"
] | [
" public static final RegistryObject<ARGogglesItem> AR_GOGGLES = Registration.ITEMS.register(\"ar_goggles\", ARGogglesItem::new);\n",
" public static final RegistryObject<Item> COMPUTER_TOOL = Registration.ITEMS.register(\"computer_tool\", ComputerToolItem::new);\n",
" public static final RegistryObjec... | false | 35c1fd3d8b48bf7a | [
"A1",
"B1",
"B2"
] | A then B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6680fff15e001853e958f8124b495f0057ac241a | 73488b584a34556bf4dd097e97bf03762471a262 | 5104aa55379e5224c4936a9cd03efd548f6f69ed | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/turtles/TurtleChunky.java | 0 | 3 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.turtles;\n",
"\n",
"import dan200.computercraft.api.peripheral.IPeripheral;\n",
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n",
"import de.srendi.advancedperipherals.Advanc... | [
"import de.srendi.advancedperipherals.common.util.ChunkManager;\n",
"import net.minecraft.client.resources.model.ModelResourceLocation;\n",
"import net.minecraft.resources.ResourceLocation;\n",
"import net.minecraft.server.level.ServerLevel;\n",
"import net.minecraft.world.item.ItemStack;\n",
"import net.... | [
"import de.srendi.advancedperipherals.common.util.ChunkManager;\n",
"import net.minecraft.client.renderer.model.ModelResourceLocation;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.util.ResourceLocation;\n",
"import net.minecraft.util.math.ChunkPos;\n",
"import net.minecraft.world.se... | [
"import net.minecraft.client.renderer.model.ModelResourceLocation;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.util.ResourceLocation;\n"
] | [
"import org.jetbrains.annotations.NotNull;\n",
"\n",
"public class TurtleChunky extends BaseTurtle<ChunkyPeripheral> {\n",
" public static final ResourceLocation ID = new ResourceLocation(AdvancedPeripherals.MOD_ID, \"chunky_turtle\");\n",
"\n",
" public TurtleChunky() {\n",
" super(ID, new... | [
"import net.minecraft.client.resources.model.ModelResourceLocation;\n",
"import net.minecraft.resources.ResourceLocation;\n",
"import net.minecraft.world.item.ItemStack;\n"
] | false | 054095e1ddebfe7a | [
"A2",
"A3",
"A5"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6680fff15e001853e958f8124b495f0057ac241a | 73488b584a34556bf4dd097e97bf03762471a262 | 5104aa55379e5224c4936a9cd03efd548f6f69ed | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/turtles/TurtleChunky.java | 1 | 3 | [
" @Override\n",
" protected ModelResourceLocation getLeftModel() {\n",
" return null; //Null, the turtle uses the chunk controller item model. See BaseTurtle.java\n",
" }\n",
"\n",
" @Override\n",
" protected ModelResourceLocation getRightModel() {\n",
" return null;\n",
... | [
" tick++;\n",
" if (tick % 10 == 0) {\n",
" //Add a chunk to the Chunk Manager every 10 ticks, if it's not already forced.\n",
" //The turtle can move, so we need to do that.\n",
" if (AdvancedPeripheralsConfig.enableChunkyTurtle) {\n",
" if (!... | [
" tick++;\n",
" if (tick % 10 == 0) {\n",
" //Add a chunk to the Chunk Manager every 10 ticks, if it's not already forced.\n",
" //The turtle can move, so we need to do that.\n",
" if (AdvancedPeripheralsConfig.enableChunkyTurtle) {\n",
" if (!... | [
" if (AdvancedPeripheralsConfig.enableChunkyTurtle) {\n",
" IPeripheral peripheral = turtle.getPeripheral(side);\n",
" if (peripheral instanceof ChunkyPeripheral) {\n",
" ChunkyPeripheral chunkyPeripheral = (ChunkyPeripheral) peripheral;\n",
" chunk... | [
" }\n",
" }\n",
" }\n"
] | [
" if (AdvancedPeripheralsConfig.enableChunkyTurtle) {\n",
" IPeripheral peripheral = turtle.getPeripheral(side);\n",
" if (peripheral instanceof ChunkyPeripheral chunkyPeripheral) {\n",
" chunkyPeripheral.updateChunkState();\n"
] | false | 63a4f45f305d689f | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6680fff15e001853e958f8124b495f0057ac241a | 73488b584a34556bf4dd097e97bf03762471a262 | 5104aa55379e5224c4936a9cd03efd548f6f69ed | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/turtles/TurtleChunky.java | 2 | 3 | [
" }\n",
" }\n",
" }\n"
] | [
"\n",
" public boolean forceChunk(@NotNull ITurtleAccess turtle, ChunkPos chunkPos, boolean load) {\n",
" boolean forced = ChunkManager.INSTANCE.forceChunk((ServerLevel) turtle.getLevel(), turtle.getPosition(), chunkPos, load);\n",
" loadedChunks.add(chunkPos);\n",
" return forced;\n... | [
"\n",
" public boolean forceChunk(@NotNull ITurtleAccess turtle, ChunkPos chunkPos, boolean load) {\n",
" boolean forced = ChunkManager.INSTANCE.forceChunk((ServerWorld) turtle.getWorld(), turtle.getPosition(), chunkPos, load);\n",
" loadedChunks.add(chunkPos);\n",
" return forced;\n... | [] | [
"}\n"
] | [] | false | eab3da862f5a9d05 | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6680fff15e001853e958f8124b495f0057ac241a | 73488b584a34556bf4dd097e97bf03762471a262 | 5104aa55379e5224c4936a9cd03efd548f6f69ed | src/main/java/de/srendi/advancedperipherals/common/util/ChunkManager.java | 0 | 4 | [
"package de.srendi.advancedperipherals.common.util;\n",
"\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n"
] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.turtles.TurtleChunky;\n",
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.server.level.ServerLevel;\n",
"import net.minecraft.world.level.ChunkPos;\n",
"import net.minecraft.world.level.block.entity.BlockEntity;\n"
] | [
"import de.srendi.advancedperipherals.common.addons.computercraft.turtles.TurtleChunky;\n",
"import net.minecraft.tileentity.TileEntity;\n",
"import net.minecraft.util.math.BlockPos;\n",
"import net.minecraft.util.math.ChunkPos;\n",
"import net.minecraft.world.server.ServerWorld;\n"
] | [
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n",
"import net.minecraft.nbt.CompoundNBT;\n",
"import net.minecraft.util.math.ChunkPos;\n",
"import net.minecraft.world.server.ServerWorld;\n",
"import net.minecraft.world.storage.WorldSavedData;\n"
] | [
"import net.minecraftforge.common.world.ForgeChunkManager;\n",
"import net.minecraftforge.event.TickEvent;\n",
"import net.minecraftforge.eventbus.api.SubscribeEvent;\n",
"import net.minecraftforge.fml.common.Mod;\n"
] | [
"import de.srendi.advancedperipherals.common.configuration.AdvancedPeripheralsConfig;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.server.level.ServerLevel;\n",
"import net.minecraft.world.level.ChunkPos;\n",
"import net.minecraft.world.level.saveddata.SavedData;\n"
] | false | a179f4d3a4813f56 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 6680fff15e001853e958f8124b495f0057ac241a | 73488b584a34556bf4dd097e97bf03762471a262 | 5104aa55379e5224c4936a9cd03efd548f6f69ed | src/main/java/de/srendi/advancedperipherals/common/util/NBTUtil.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.util;\n",
"\n",
"import com.mojang.brigadier.exceptions.CommandSyntaxException;\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.nbt.*;\n"
] | [] | [
"import net.minecraft.util.math.BlockPos;\n"
] | [
"import net.minecraft.util.math.BlockPos;\n",
"import net.minecraft.util.math.ChunkPos;\n"
] | [
"import org.apache.logging.log4j.Level;\n",
"\n",
"import java.io.ByteArrayInputStream;\n",
"import java.io.IOException;\n",
"import java.io.InputStream;\n",
"import java.util.Base64;\n",
"import java.util.Map;\n",
"\n",
"public class NBTUtil {\n",
"\n",
" public static Tag toDirectNBT(Object... | [
"import net.minecraft.world.level.ChunkPos;\n"
] | false | e440fd05e24ac70a | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 9ef878cc2125762d1a2930feb020af5db65eba72 | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | 25a0cc38ff073478b15905e31c7142f920f8086b | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/integrations/BlockIntegration.java | 0 | 2 | [
"\n",
"public class BlockIntegration implements IPeripheralIntegration {\n",
"\n",
" private final static int DEFAULT_PRIORITY = 50;\n",
"\n",
" private final BiFunction<Level, BlockPos, ? extends IPeripheral> build;\n",
" private final Predicate<Block> predicate;\n",
" private final int p... | [
" public boolean isSuitable(@NotNull Level world, @NotNull BlockPos blockPos, @NotNull Direction direction) {\n",
" Block block = world.getBlockState(blockPos).getBlock();\n"
] | [
" public boolean isSuitable(@NotNull World world, @NotNull BlockPos blockPos, @NotNull Direction direction) {\n",
" Block block = world.getBlockState(blockPos).getBlock();\n"
] | [
" public boolean isSuitable(@NotNull Level level, @NotNull BlockPos blockPos, @NotNull Direction direction) {\n",
" Block block = level.getBlockState(blockPos).getBlock();\n"
] | [
" return predicate.test(block);\n",
" }\n",
"\n",
" @Override\n"
] | [
" public boolean isSuitable(@NotNull Level world, @NotNull BlockPos blockPos, @NotNull Direction direction) {\n",
" Block block = world.getBlockState(blockPos).getBlock();\n"
] | false | ef30108ccd5f579e | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 9ef878cc2125762d1a2930feb020af5db65eba72 | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | 25a0cc38ff073478b15905e31c7142f920f8086b | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/integrations/NoteblockIntegration.java | 3 | 5 | [
" if (!(note >= 0 && note <= 24))\n",
" throw new LuaException(\"Note argument need to be in a range of 0 and 24\");\n",
" state = state.setValue(NoteBlock.NOTE, note);\n",
" level.setBlock(pos, state, 3);\n",
" return note;\n",
" }\n",
"\n",
" @LuaFunction... | [
" public final int getNote() {\n",
" BlockState state = world.getBlockState(pos);\n"
] | [
" public int getNote() {\n",
" BlockState state = world.getBlockState(pos);\n"
] | [
" public int getNote() {\n",
" BlockState state = level.getBlockState(pos);\n"
] | [
" return state.getValue(NoteBlock.NOTE);\n",
" }\n",
"\n",
" @LuaFunction(mainThread = true)\n"
] | [
" public final int getNote() {\n",
" BlockState state = world.getBlockState(pos);\n"
] | false | 646bfd6533719be8 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 9ef878cc2125762d1a2930feb020af5db65eba72 | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | 25a0cc38ff073478b15905e31c7142f920f8086b | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/pocket/PocketChatBoxUpgrade.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.pocket;\n",
"\n",
"import dan200.computercraft.api.pocket.IPocketAccess;\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperipherals.lib.pocket.BasePocketUpgrade;\n",
"import de.srendi.advancedp... | [] | [
"<<<<<<<<< Temporary merge branch 1\n",
"import net.minecraft.resources.ResourceLocation;\n",
"||||||||| aa3ae3e2\n",
"import net.minecraft.util.ResourceLocation;\n",
"=========\n",
"import de.srendi.advancedperipherals.lib.pocket.BasePocketUpgrade;\n",
"import net.minecraft.util.ResourceLocation;\n",
... | [
"import de.srendi.advancedperipherals.lib.pocket.BasePocketUpgrade;\n"
] | [
"import net.minecraft.resources.ResourceLocation;\n",
"import org.jetbrains.annotations.Nullable;\n",
"\n",
"public class PocketChatBoxUpgrade extends BasePocketUpgrade<ChatBoxPeripheral> {\n",
" public static final ResourceLocation ID = new ResourceLocation(AdvancedPeripherals.MOD_ID, \"chatty_pocket\")... | [] | false | 1231467a36db0ae4 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 9ef878cc2125762d1a2930feb020af5db65eba72 | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | 25a0cc38ff073478b15905e31c7142f920f8086b | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/turtles/metaphysics/OverpoweredWeakAutomata.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.turtles.metaphysics;\n",
"\n",
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperi... | [] | [
"||||||||| aa3ae3e2\n",
"import net.minecraft.client.renderer.model.ModelResourceLocation;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.util.ResourceLocation;\n",
"=========\n",
"import de.srendi.advancedperipherals.lib.turtle.ClockwiseAnimatedTurtleUpgrade;\n",
"import net.minecr... | [
"import de.srendi.advancedperipherals.lib.turtle.ClockwiseAnimatedTurtleUpgrade;\n"
] | [
"import org.jetbrains.annotations.NotNull;\n",
"\n",
"public class OverpoweredWeakAutomata extends ClockwiseAnimatedTurtleUpgrade<OverpoweredWeakAutomataCorePeripheral> {\n",
" public static final ResourceLocation ID = new ResourceLocation(AdvancedPeripherals.MOD_ID, \"overpowered_weak_automata\");\n",
"... | [] | false | 11df2c05bd985064 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 9ef878cc2125762d1a2930feb020af5db65eba72 | e9e8e6dfd19e9a7d385210f156ef4b290ac7a40e | 25a0cc38ff073478b15905e31c7142f920f8086b | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/turtles/metaphysics/WeakAutomata.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.addons.computercraft.turtles.metaphysics;\n",
"\n",
"import dan200.computercraft.api.turtle.ITurtleAccess;\n",
"import dan200.computercraft.api.turtle.TurtleSide;\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n",
"import de.srendi.advancedperi... | [] | [
"||||||||| aa3ae3e2\n",
"import net.minecraft.client.renderer.model.ModelResourceLocation;\n",
"import net.minecraft.item.ItemStack;\n",
"import net.minecraft.util.ResourceLocation;\n",
"=========\n",
"import de.srendi.advancedperipherals.lib.turtle.ClockwiseAnimatedTurtleUpgrade;\n",
"import net.minecr... | [
"import de.srendi.advancedperipherals.lib.turtle.ClockwiseAnimatedTurtleUpgrade;\n"
] | [
"import org.jetbrains.annotations.NotNull;\n",
"\n",
"public class WeakAutomata extends ClockwiseAnimatedTurtleUpgrade<WeakAutomataCorePeripheral> {\n",
" public static final ResourceLocation ID = new ResourceLocation(AdvancedPeripherals.MOD_ID, \"weak_automata\");\n",
"\n",
" public WeakAutomata() ... | [] | false | 199ace47f7ff8206 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | ee85edb23cce8ff7e2b8512ad022a7bb32c2134d | 170510b7707208feb40854fdfc810a8f824eed3f | fb269be7766e13f9aa8abcbe902e6b00e275b424 | src/main/java/de/srendi/advancedperipherals/common/setup/APEntities.java | 0 | 1 | [
"package de.srendi.advancedperipherals.common.setup;\n",
"\n",
"import de.srendi.advancedperipherals.AdvancedPeripherals;\n"
] | [
"import de.srendi.advancedperipherals.common.entity.TurtleSeatEntity;\n",
"import net.minecraft.world.entity.EntityType;\n",
"import net.minecraft.world.entity.MobCategory;\n",
"import net.minecraftforge.registries.RegistryObject;\n",
"import net.minecraftforge.api.distmarker.Dist;\n",
"import net.minecra... | [] | [
"import de.srendi.advancedperipherals.common.entity.TurtleEnderPearl;\n",
"import net.minecraft.world.entity.EntityType;\n",
"import net.minecraft.world.entity.MobCategory;\n",
"import net.minecraftforge.registries.RegistryObject;\n",
"import net.minecraftforge.api.distmarker.Dist;\n",
"import net.minecra... | [
" }\n",
"}\n"
] | [
"import de.srendi.advancedperipherals.common.entity.TurtleEnderPearl;\n",
"import de.srendi.advancedperipherals.common.entity.TurtleSeatEntity;\n",
"import net.minecraft.world.entity.EntityType;\n",
"import net.minecraft.world.entity.MobCategory;\n",
"import net.minecraftforge.registries.RegistryObject;\n",... | false | 7024a5773b47b384 | [
"B1",
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9",
"A10",
"A11",
"A12",
"B13",
"B14",
"B15",
"B16",
"B17",
"B18",
"B19",
"A13",
"A14",
"A15",
"A16",
"A17",
"A18",
"A19",
"A20",
"A21",
"A22",
"A23",
"A24",
"A25",
"B26",
"A26"
] | mix of lines | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
IntelligenceModding/AdvancedPeripherals | 4606244ebdde8bf75001a9e843a667baa275dab5 | 2a4b63cd45481269728fd2a53204d4c07096bb6d | f564efdd622d499198070baeb5f81659064db729 | src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MeBridgePeripheral.java | 0 | 2 | [
" * @return the imported amount or null with a string if something went wrong\n",
" */\n",
" protected MethodResult importToME(@NotNull IArguments arguments, @Nullable IFluidHandler targetTank) throws LuaException {\n",
" MEStorage monitor = AppEngApi.getMonitor(node);\n",
" MeFluid... | [
" private boolean isAvailable() {\n",
" return node.getGrid() != null && node.hasGridBooted();\n"
] | [
" @LuaFunction(mainThread = true)\n",
" public final boolean isConnected() {\n",
" return node.getGrid() != null && node.hasGridBooted();\n"
] | [
" @LuaFunction(mainThread = true)\n",
" public final boolean isConnected() {\n",
" return node.getGrid() != null && node.hasGridBooted() && node.isActive();\n"
] | [
" }\n",
"\n",
" @Override\n",
" public final MethodResult isConnected() {\n",
" return MethodResult.of(isAvailable());\n",
" }\n",
"\n",
" @Override\n",
" public MethodResult isOnline() {\n",
" return MethodResult.of(node.isOnline());\n",
" }\n",
"\n",
" ... | [
" private boolean isAvailable() {\n",
" return node.getGrid() != null && node.hasGridBooted();\n"
] | false | f6c474c8bf74ae8b | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.