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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
besu-eth/besu | 772efd7858df83aa1e369ba0ca69057ba9232202 | 9f4cd99411d6d4db2270738c1be1e9d8dc519400 | 958a07237848fdd1bba7fe7675876c299b7f4a3d | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/storage/StorageProvider.java | 0 | 2 | [
"/*\n",
" * Copyright ConsenSys AG.\n",
" *\n",
" * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\n",
" * the License. You may obtain a copy of the License at\n",
" *\n",
" * http://www.apache.org/licenses/LICENSE-2.0\n",
" *\n",
... | [
"import org.hyperledger.besu.ethereum.worldstate.DataStorageFormat;\n",
"import org.hyperledger.besu.ethereum.worldstate.WorldStateKeyValueStorage;\n"
] | [
"import org.hyperledger.besu.ethereum.worldstate.DataStorageFormat;\n"
] | [
"import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;\n"
] | [
"import org.hyperledger.besu.ethereum.worldstate.WorldStatePreimageStorage;\n",
"import org.hyperledger.besu.ethereum.worldstate.WorldStateStorageCoordinator;\n",
"import org.hyperledger.besu.plugin.services.storage.KeyValueStorage;\n",
"import org.hyperledger.besu.plugin.services.storage.SegmentIdentifier;\n... | [
"import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;\n",
"import org.hyperledger.besu.ethereum.worldstate.WorldStateKeyValueStorage;\n"
] | false | 8776cef37247f688 | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 772efd7858df83aa1e369ba0ca69057ba9232202 | 9f4cd99411d6d4db2270738c1be1e9d8dc519400 | 958a07237848fdd1bba7fe7675876c299b7f4a3d | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/bonsai/storage/BonsaiSnapshotWorldStateKeyValueStorage.java | 0 | 2 | [
"\n",
"public class BonsaiSnapshotWorldStateKeyValueStorage extends BonsaiWorldStateKeyValueStorage\n",
" implements BonsaiStorageSubscriber {\n",
"\n",
" protected final BonsaiWorldStateKeyValueStorage parentWorldStateStorage;\n",
" private static final Logger LOG =\n",
" LoggerFactory.getLog... | [
" final BonsaiWorldStateKeyValueStorage worldStateKeyValueStorage,\n",
" final ObservableMetricsSystem metricsSystem) {\n"
] | [
" final BonsaiWorldStateKeyValueStorage worldStateStorage,\n",
" final ObservableMetricsSystem metricsSystem) {\n"
] | [
" final BonsaiWorldStateKeyValueStorage worldStateStorage) {\n"
] | [
" this(\n"
] | [
" final BonsaiWorldStateKeyValueStorage worldStateStorageKeyValueStorage) {\n"
] | false | 3e0c601ef9df798a | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 772efd7858df83aa1e369ba0ca69057ba9232202 | 9f4cd99411d6d4db2270738c1be1e9d8dc519400 | 958a07237848fdd1bba7fe7675876c299b7f4a3d | ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/heal/StorageFlatDatabaseHealingRangeRequestTest.java | 0 | 1 | [
" @Mock private SnapSyncProcessState snapSyncState;\n",
"\n",
" final List<Address> accounts =\n",
" List.of(\n",
" Address.fromHexString(\"0xdeadbeef\"),\n",
" Address.fromHexString(\"0xdeadbeee\"),\n",
" Address.fromHexString(\"0xdeadbeea\"),\n",
" Address.... | [
" worldStateKeyValueStorage =\n",
" new BonsaiWorldStateKeyValueStorage(storageProvider, new NoOpMetricsSystem());\n",
" worldStateStorageCoordinator = new WorldStateStorageCoordinator(worldStateKeyValueStorage);\n",
" proofProvider = new WorldStateProofProvider(worldStateStorageCoordinator);\... | [
" worldStateStorage =\n",
" new BonsaiWorldStateKeyValueStorage(storageProvider, new NoOpMetricsSystem());\n",
" proofProvider = new WorldStateProofProvider(worldStateStorage);\n"
] | [
" worldStateStorage =\n",
" new BonsaiWorldStateKeyValueStorage(\n",
" storageProvider, new NoOpMetricsSystem(), DataStorageConfiguration.DEFAULT_CONFIG);\n",
" proofProvider = new WorldStateProofProvider(worldStateStorage);\n"
] | [
" trie =\n",
" TrieGenerator.generateTrie(\n",
" worldStateStorageCoordinator,\n",
" accounts.stream().map(Address::addressHash).collect(Collectors.toList()));\n",
" account0Hash = accounts.get(0).addressHash();\n",
" account0StorageRoot =\n",
" trie.get(acco... | [
"\n",
" worldStateKeyValueStorage =\n",
" new BonsaiWorldStateKeyValueStorage(\n",
" storageProvider, new NoOpMetricsSystem(), DataStorageConfiguration.DEFAULT_CONFIG);\n",
" worldStateStorageCoordinator = new WorldStateStorageCoordinator(worldStateKeyValueStorage);\n",
" proofP... | false | 3f3e34b57678d6d3 | null | needs new code | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 0cfcf98e18e0ba3a34a220720cc9fc12722e6af6 | e2f541a44700aabe59c527bd5e19580e3bb0f672 | d9ab92e8870b36409e55b745548b495be1c80c33 | ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/EnginePayloadParameter.java | 0 | 1 | [
" */\n",
" @JsonCreator\n",
" public EnginePayloadParameter(\n",
" @JsonProperty(\"blockHash\") final Hash blockHash,\n",
" @JsonProperty(\"parentHash\") final Hash parentHash,\n",
" @JsonProperty(\"feeRecipient\") final Address feeRecipient,\n",
" @JsonProperty(\"stateRoot\") fi... | [
" @JsonProperty(\"depositReceipts\") final List<DepositParameter> deposits,\n"
] | [
" @JsonProperty(\"depositRequests\") final List<DepositParameter> deposits,\n"
] | [
" @JsonProperty(\"depositRequests\") final List<DepositRequestParameter> depositRequests,\n"
] | [
" @JsonProperty(\"withdrawalRequests\")\n",
" final List<WithdrawalRequestParameter> withdrawalRequestParameters,\n",
" @JsonProperty(\"executionWitness\") final ExecutionWitnessParameter executionWitness) {\n",
" this.blockHash = blockHash;\n",
" this.parentHash = parentHash;\n",
... | [
" @JsonProperty(\"depositRequests\") final List<DepositRequestParameter> depositRequests,\n"
] | false | 95fe8984a4b20e36 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 0cfcf98e18e0ba3a34a220720cc9fc12722e6af6 | e2f541a44700aabe59c527bd5e19580e3bb0f672 | d9ab92e8870b36409e55b745548b495be1c80c33 | ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayloadTest.java | 0 | 2 | [
" }\n",
"\n",
" protected JsonRpcResponse resp(final EnginePayloadParameter payload) {\n",
" Object[] params =\n",
" maybeParentBeaconBlockRoot\n",
" .map(bytes32 -> new Object[] {payload, null, bytes32.toHexString()})\n",
" .orElseGet(() -> new Object[] {payload});\n",... | [
" final List<DepositParameter> deposits,\n",
" final List<WithdrawalRequestParameter> withdrawalRequests,\n",
" final ExecutionWitnessParameter executionWitness) {\n"
] | [
" final List<DepositParameter> deposits,\n",
" final List<WithdrawalRequestParameter> withdrawalRequests) {\n"
] | [
" final List<DepositRequestParameter> depositRequests,\n",
" final List<WithdrawalRequestParameter> withdrawalRequests) {\n"
] | [
" return new EnginePayloadParameter(\n",
" header.getHash(),\n",
" header.getParentHash(),\n",
" header.getCoinbase(),\n",
" header.getStateRoot(),\n",
" new UnsignedLongParameter(header.getNumber()),\n",
" header.getBaseFee().map(w -> w.toHexString()).orElse... | [
" final List<DepositRequestParameter> depositRequests,\n",
" final List<WithdrawalRequestParameter> withdrawalRequests,\n",
" final ExecutionWitnessParameter executionWitness) {\n"
] | false | 9ffd0602bf010ca1 | null | needs new code | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 0cfcf98e18e0ba3a34a220720cc9fc12722e6af6 | e2f541a44700aabe59c527bd5e19580e3bb0f672 | d9ab92e8870b36409e55b745548b495be1c80c33 | ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayloadTest.java | 1 | 2 | [
" return new EnginePayloadParameter(\n",
" header.getHash(),\n",
" header.getParentHash(),\n",
" header.getCoinbase(),\n",
" header.getStateRoot(),\n",
" new UnsignedLongParameter(header.getNumber()),\n",
" header.getBaseFee().map(w -> w.toHexString()).orElse... | [
" deposits,\n",
" withdrawalRequests,\n",
" executionWitness);\n"
] | [
" deposits,\n",
" withdrawalRequests);\n"
] | [
" depositRequests,\n",
" withdrawalRequests);\n"
] | [
" }\n",
"\n",
" protected BlockHeader setupValidPayload(\n",
" final BlockProcessingResult value,\n",
" final Optional<List<Withdrawal>> maybeWithdrawals,\n",
" final Optional<List<DepositRequest>> maybeDepositRequests,\n",
" final Optional<List<WithdrawalRequest>> maybeWithdrawalR... | [
" depositRequests,\n",
" withdrawalRequests,\n",
" executionWitness);\n"
] | false | 3c44165b5c2334bb | [
"B1",
"A2",
"A3"
] | mix of lines | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 0cfcf98e18e0ba3a34a220720cc9fc12722e6af6 | e2f541a44700aabe59c527bd5e19580e3bb0f672 | d9ab92e8870b36409e55b745548b495be1c80c33 | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetTransactionProcessor.java | 0 | 1 | [
" gasAvailable - initialFrame.getRemainingGas());\n",
" }\n",
"\n",
" // Refund the sender by what we should and pay the miner fee (note that we're doing them one\n",
" // after the other so that if it is the same account somehow, we end up with the right result)\n",
" final... | [
" operationTracer.traceEndTransaction(\n",
" worldUpdater,\n",
" transaction,\n",
" initialFrame.getState() == MessageFrame.State.COMPLETED_SUCCESS,\n",
" initialFrame.getOutputData(),\n",
" initialFrame.getLogs(),\n",
" gasUsedByTransaction,\n"... | [
"\n",
" operationTracer.traceEndTransaction(\n",
" worldUpdater,\n",
" transaction,\n",
" initialFrame.getState() == MessageFrame.State.COMPLETED_SUCCESS,\n",
" initialFrame.getOutputData(),\n",
" initialFrame.getLogs(),\n",
" gasUsedByTransac... | [] | [
"\n",
" // update the coinbase\n",
" final var coinbase = worldState.getOrCreate(miningBeneficiary);\n",
" final long usedGas = transaction.getGasLimit() - refundedGas;\n",
" final CoinbaseFeePriceCalculator coinbaseCalculator;\n",
" if (blockHeader.getBaseFee().isPresent()) {\n",... | [
"\n",
" // checkTransactionGas(transaction.getHash(), gasUsedByTransaction);\n"
] | false | f0a8a8571be97c1e | [
"A9",
"A10"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 0cfcf98e18e0ba3a34a220720cc9fc12722e6af6 | e2f541a44700aabe59c527bd5e19580e3bb0f672 | d9ab92e8870b36409e55b745548b495be1c80c33 | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/common/GenesisWorldStateProvider.java | 0 | 1 | [
" * the License. You may obtain a copy of the License at\n",
" *\n",
" * http://www.apache.org/licenses/LICENSE-2.0\n",
" *\n",
" * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on\n",
" * an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIO... | [
"import org.hyperledger.besu.ethereum.trie.diffbased.verkle.cache.VerkleNoOpCachedWorldStorageManager;\n",
"import org.hyperledger.besu.ethereum.trie.diffbased.verkle.storage.VerkleWorldStateKeyValueStorage;\n",
"import org.hyperledger.besu.ethereum.trie.diffbased.verkle.worldview.VerkleWorldState;\n"
] | [] | [
"import org.hyperledger.besu.ethereum.trie.diffbased.common.worldview.DiffBasedWorldStateConfig;\n"
] | [
"import org.hyperledger.besu.ethereum.trie.forest.storage.ForestWorldStateKeyValueStorage;\n",
"import org.hyperledger.besu.ethereum.trie.forest.worldview.ForestMutableWorldState;\n",
"import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;\n",
"import org.hyperledger.besu.evm.internal.EvmCo... | [
"import org.hyperledger.besu.ethereum.trie.diffbased.verkle.cache.VerkleNoOpCachedWorldStorageManager;\n",
"import org.hyperledger.besu.ethereum.trie.diffbased.verkle.storage.VerkleWorldStateKeyValueStorage;\n",
"import org.hyperledger.besu.ethereum.trie.diffbased.verkle.worldview.VerkleWorldState;\n",
"impor... | false | 02f283fd4df69447 | [
"A1",
"A2",
"A3",
"B1"
] | A then B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 1d880633f794cdb42355bb840bfced8073d82087 | 814c89fe5ccc88e7c9395319e78aff1c2b90ee71 | a5e08c8b026a8142d93a3819a8cad2eeb4ff8b1d | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetTransactionProcessor.java | 0 | 1 | [
"package org.hyperledger.besu.ethereum.mainnet;\n",
"\n",
"import static org.hyperledger.besu.ethereum.mainnet.PrivateStateUtils.KEY_IS_PERSISTING_PRIVATE_STATE;\n",
"import static org.hyperledger.besu.ethereum.mainnet.PrivateStateUtils.KEY_PRIVATE_METADATA_UPDATER;\n",
"import static org.hyperledger.besu.e... | [
"import org.hyperledger.besu.ethereum.vm.BlockHashLookup;\n",
"import org.hyperledger.besu.evm.Code;\n"
] | [
"import org.hyperledger.besu.ethereum.vm.BlockHashLookup;\n"
] | [] | [
"import org.hyperledger.besu.evm.account.Account;\n",
"import org.hyperledger.besu.evm.account.MutableAccount;\n",
"import org.hyperledger.besu.evm.code.CodeInvalid;\n",
"import org.hyperledger.besu.evm.code.CodeV0;\n",
"import org.hyperledger.besu.evm.frame.ExceptionalHaltReason;\n",
"import org.hyperled... | [
"import org.hyperledger.besu.evm.Code;\n"
] | false | 117e32a820803c34 | [
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 1d880633f794cdb42355bb840bfced8073d82087 | 814c89fe5ccc88e7c9395319e78aff1c2b90ee71 | a5e08c8b026a8142d93a3819a8cad2eeb4ff8b1d | ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/vm/GeneralStateReferenceTestTools.java | 0 | 1 | [
" for (int i = 0; i < eipSpecs.size(); i++) {\n",
" collector.add(\n",
" prefix + eip + '[' + i + ']', fullPath, eipSpecs.get(i), runTest);\n",
" }\n",
" }\n",
" }\n",
" });\n... | [] | [
"\n",
" // EOF tests are written against an older version of the spec\n",
" params.ignore(\"/stEOF/\");\n"
] | [
"\n",
" // EOF tests are written against an older version of the spec\n",
" params.ignore(\"/stEOF/\");\n",
"\n",
" // None of the Prague tests have withdrawls and deposits handling\n",
" params.ignore(\"-Prague$\");\n"
] | [
" }\n",
"\n",
" private GeneralStateReferenceTestTools() {\n",
" // utility class\n",
" }\n",
"\n",
" public static Collection<Object[]> generateTestParametersForConfig(final String[] filePath) {\n",
" return params.generate(filePath);\n",
" }\n",
"\n",
" @SuppressWarnings(\"java:S59... | [
"\n",
" // EOF tests are written against an older version of the spec\n",
" params.ignore(\"/stEOF/\");\n",
"\n",
" // None of the Prague tests have withdrawls and deposits handling\n",
" params.ignore(\"-Prague$\");\n"
] | false | 15b97efe90941188 | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 1d880633f794cdb42355bb840bfced8073d82087 | 814c89fe5ccc88e7c9395319e78aff1c2b90ee71 | a5e08c8b026a8142d93a3819a8cad2eeb4ff8b1d | evm/src/main/java/org/hyperledger/besu/evm/frame/MessageFrame.java | 0 | 2 | [
" public void setTransientStorageValue(\n",
" final Address accountAddress, final Bytes32 slot, final Bytes32 value) {\n",
" txValues.transientStorage().put(accountAddress, slot, value);\n",
" }\n",
"\n",
" /** Undo all the changes done by this message frame, such as when a revert is called for... | [
" * Get the initcode by hash\n",
" *\n",
" * @param hash the hash\n",
" * @return the correspoding initcode, or null if non-existent\n",
" */\n",
" public Bytes getInitCodeByHash(final Bytes hash) {\n",
" return txValues.getInitcodeByHash(hash);\n"
] | [] | [
" * Accessor for address that authorized future AUTHCALLs.\n",
" *\n",
" * @return the revert reason\n",
" */\n",
" public Address getAuthorizedBy() {\n",
" return authorizedBy;\n",
" }\n",
"\n",
" /**\n",
" * Mutator for address that authorizes future AUTHCALLs, set by AUTH opcode... | [
" }\n",
"\n",
" /** Reset. */\n",
" public void reset() {\n",
" maybeUpdatedMemory = Optional.empty();\n",
" maybeUpdatedStorage = Optional.empty();\n",
" }\n",
"\n",
" /** The MessageFrame Builder. */\n",
" public static class Builder {\n",
"\n",
" private MessageFrame parentMe... | [
" * Accessor for address that authorized future AUTHCALLs.\n",
" *\n",
" * @return the revert reason\n",
" */\n",
" public Address getAuthorizedBy() {\n",
" return authorizedBy;\n",
" }\n",
"\n",
" /**\n",
" * Mutator for address that authorizes future AUTHCALLs, set by AUTH opcode... | false | da816c9c996888b7 | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9",
"B10",
"B11",
"B12",
"B13",
"B14",
"B15"
] | side B | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 1d880633f794cdb42355bb840bfced8073d82087 | 814c89fe5ccc88e7c9395319e78aff1c2b90ee71 | a5e08c8b026a8142d93a3819a8cad2eeb4ff8b1d | evm/src/main/java/org/hyperledger/besu/evm/frame/MessageFrame.java | 1 | 2 | [
" private Wei blobGasPrice = Wei.ZERO;\n",
" private Bytes inputData;\n",
" private Address sender;\n",
" private Wei value;\n",
" private Wei apparentValue;\n",
" private Code code;\n",
" private BlockValues blockValues;\n",
" private int maxStackSize = DEFAULT_MAX_STACK_SIZE;... | [
" private Optional<List<Bytes>> initcodes = Optional.empty();\n"
] | [] | [
" /** Instantiates a new Builder. */\n",
" public Builder() {}\n"
] | [
"\n",
" /**\n",
" * The \"parent\" message frame. When present some fields will be populated from the parent and\n",
" * ignored if passed in via builder\n",
" *\n",
" * @param parentMessageFrame the parent message frame\n",
" * @return the builder\n",
" */\n",
" public... | [
" /** Instantiates a new Builder. */\n",
" public Builder() {}\n"
] | false | 3e564661d0cf813c | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 1d880633f794cdb42355bb840bfced8073d82087 | 814c89fe5ccc88e7c9395319e78aff1c2b90ee71 | a5e08c8b026a8142d93a3819a8cad2eeb4ff8b1d | evm/src/main/java/org/hyperledger/besu/evm/frame/TxValues.java | 0 | 1 | [
"import org.hyperledger.besu.collections.undo.UndoScalar;\n",
"import org.hyperledger.besu.collections.undo.UndoSet;\n",
"import org.hyperledger.besu.collections.undo.UndoTable;\n",
"import org.hyperledger.besu.datatypes.Address;\n",
"import org.hyperledger.besu.datatypes.VersionedHash;\n",
"import org.hy... | [
" * @param blockHashLookup the function that looks up block hashes\n",
" * @param maxStackSize maximum stack size for the vm\n",
" * @param warmedUpAddresses Journaled list of warmed up addresses\n",
" * @param warmedUpStorage Journaled list of warmed up storage\n",
" * @param originator The original addres... | [] | [
" * @param blockHashLookup The block hash lookup function\n",
" * @param maxStackSize The maximum stack size\n",
" * @param warmedUpAddresses The warmed-up addresses\n",
" * @param warmedUpStorage The warmed-up storage\n",
" * @param originator The originator address\n",
" * @param gasPrice The gas price\... | [
" */\n",
"public record TxValues(\n",
" BlockHashLookup blockHashLookup,\n",
" int maxStackSize,\n",
" UndoSet<Address> warmedUpAddresses,\n",
" UndoTable<Address, Bytes32, Boolean> warmedUpStorage,\n",
" Address originator,\n",
" Wei gasPrice,\n",
" Wei blobGasPrice,\n",
" ... | [
" * @param blockHashLookup The block hash lookup function\n",
" * @param maxStackSize The maximum stack size\n",
" * @param warmedUpAddresses The warmed-up addresses\n",
" * @param warmedUpStorage The warmed-up storage\n",
" * @param originator The originator address\n",
" * @param gasPrice The gas price\... | false | 117e910caf5a1216 | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9",
"B10",
"B11",
"B12",
"B13",
"B14",
"B15"
] | side B | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 588a0581379898f27ce9e9b1f15452780619a0bd | 72d2781f1f98eeb734863f7a4d0f1cf0fa28a1c7 | 674a7bae583f8f2ac62bdba62b896e9bccba6dbe | ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV2Test.java | 0 | 1 | [
" // V2 should return error if non-null ExcessBlobGas\n",
" BlockHeader blockHeader =\n",
" createBlockHeaderFixture(Optional.of(Collections.emptyList()))\n",
" .excessBlobGas(BlobGas.MAX_BLOB_GAS)\n",
" .buildHeader();\n",
"\n",
" var resp = resp(mockEnginePayload(... | [
" resp(mockEnginePayload(createBlockHeader(Optional.empty()), Collections.emptyList()));\n"
] | [
" resp(\n",
" mockEnginePayload(\n",
" createBlockHeader(Optional.empty(), Optional.empty()),\n",
" Collections.emptyList(),\n",
" withdrawals));\n"
] | [
" resp(\n",
" mockEnginePayload(\n",
" createBlockHeader(Optional.empty()), Collections.emptyList(), withdrawals));\n"
] | [
"\n",
" assertThat(fromErrorResp(resp).getCode()).isEqualTo(INVALID_PARAMS.getCode());\n",
" verify(engineCallListener, times(1)).executionEngineCalled();\n",
" }\n",
"\n",
" @Test\n",
" public void shouldReturnUnsupportedForkIfBlockTimestampIsAfterCancunMilestone() {\n",
" // Cancun start... | [
" resp(mockEnginePayload(createBlockHeader(Optional.empty()), Collections.emptyList()));\n"
] | false | 91254b1edc8ef6c3 | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 588a0581379898f27ce9e9b1f15452780619a0bd | 72d2781f1f98eeb734863f7a4d0f1cf0fa28a1c7 | 674a7bae583f8f2ac62bdba62b896e9bccba6dbe | ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV3Test.java | 0 | 3 | [
" new JsonRpcRequestContext(\n",
" new JsonRpcRequest(\n",
" \"2.0\",\n",
" RpcMethod.ENGINE_NEW_PAYLOAD_V3.getMethodName(),\n",
" new Object[] {\n",
" payload,\n",
" List.of(shor... | [
"\n",
" final EnginePayloadParameter payload = mockEnginePayload(mockHeader, emptyList(), null, null);\n"
] | [
" final EnginePayloadParameter payload =\n",
" mockEnginePayload(mockHeader, Collections.emptyList(), null);\n"
] | [
" final EnginePayloadParameter payload = mockEnginePayload(mockHeader, emptyList(), null);\n"
] | [
"\n",
" ValidationResult<RpcErrorType> res =\n",
" method.validateParameters(\n",
" payload,\n",
" Optional.of(List.of()),\n",
" Optional.of(\"0x0000000000000000000000000000000000000000000000000000000000000000\"),\n",
" Optional.of(emptyList()));\n",... | [
"\n",
" final EnginePayloadParameter payload = mockEnginePayload(mockHeader, emptyList(), null, null);\n"
] | false | 07ea8c679ca50671 | [
"A1",
"A2"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 588a0581379898f27ce9e9b1f15452780619a0bd | 72d2781f1f98eeb734863f7a4d0f1cf0fa28a1c7 | 674a7bae583f8f2ac62bdba62b896e9bccba6dbe | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/bonsai/BonsaiWorldStateProvider.java | 1 | 2 | [
"\n",
"import com.google.common.annotations.VisibleForTesting;\n",
"import org.apache.tuweni.bytes.Bytes;\n",
"import org.slf4j.Logger;\n",
"import org.slf4j.LoggerFactory;\n",
"\n",
"public class BonsaiWorldStateProvider extends DiffBasedWorldStateProvider {\n",
"\n",
" private static final Logger... | [
" super(\n",
" DataStorageFormat.BONSAI,\n",
" worldStateKeyValueStorage,\n",
" blockchain,\n",
" maxLayersToLoad,\n",
" pluginContext);\n"
] | [
" final BesuContext pluginContext,\n",
" final EvmConfiguration evmConfiguration) {\n",
" super(worldStateKeyValueStorage, blockchain, maxLayersToLoad, pluginContext);\n"
] | [
" super(worldStateKeyValueStorage, blockchain, maxLayersToLoad, pluginContext);\n"
] | [
" this.bonsaiCachedMerkleTrieLoader = bonsaiCachedMerkleTrieLoader;\n",
" this.worldStateHealerSupplier = worldStateHealerSupplier;\n",
" provideCachedWorldStorageManager(\n",
" new BonsaiCachedWorldStorageManager(\n",
" this, worldStateKeyValueStorage, this::cloneBonsaiWorldState... | [
" super(\n",
" DataStorageFormat.BONSAI,\n",
" worldStateKeyValueStorage,\n",
" blockchain,\n",
" maxLayersToLoad,\n",
" pluginContext);\n"
] | false | 67256c9b22bd5b21 | [
"A1",
"A2",
"A3",
"A4",
"A5",
"A6"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 588a0581379898f27ce9e9b1f15452780619a0bd | 72d2781f1f98eeb734863f7a4d0f1cf0fa28a1c7 | 674a7bae583f8f2ac62bdba62b896e9bccba6dbe | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/common/trielog/TrieLogManager.java | 1 | 2 | [
" .getTrieLogStorageTransaction()\n",
" .put(blockHeader.getHash().toArrayUnsafe(), trieLogFactory.serialize(trieLog));\n",
" }\n",
"\n",
" public long getMaxLayersToLoad() {\n",
" return maxLayersToLoad;\n",
" }\n",
"\n",
" public Optional<TrieLog> getTrieLogLayer(final Hash bl... | [
" private TrieLogFactory setupTrieLogFactory(\n",
" final DataStorageFormat dataStorageFormat, final ServiceManager pluginContext) {\n"
] | [
" private TrieLogFactory setupTrieLogFactory(final BesuContext pluginContext) {\n"
] | [
" private TrieLogFactory setupTrieLogFactory(final ServiceManager pluginContext) {\n"
] | [
" // if we have a TrieLogService from pluginContext, use it.\n",
" var trieLogServicez =\n",
" Optional.ofNullable(pluginContext)\n",
" .flatMap(context -> context.getService(TrieLogService.class));\n",
"\n",
" if (trieLogServicez.isPresent()) {\n",
" var trieLogService =... | [
" private TrieLogFactory setupTrieLogFactory(\n",
" final DataStorageFormat dataStorageFormat, final ServiceManager pluginContext) {\n"
] | false | 00714c1b4022d9d4 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 588a0581379898f27ce9e9b1f15452780619a0bd | 72d2781f1f98eeb734863f7a4d0f1cf0fa28a1c7 | 674a7bae583f8f2ac62bdba62b896e9bccba6dbe | evm/src/main/java/org/hyperledger/besu/evm/operation/PushOperation.java | 1 | 2 | [
" Bytes push;\n",
" if (code.length <= copyStart) {\n",
" push = Bytes.EMPTY;\n",
" } else {\n"
] | [
" final int copyLength = Math.min(length, code.length - copyStart);\n",
" final int rightPad = length - copyLength;\n",
" if (rightPad == 0) {\n",
" push = Bytes.wrap(code, copyStart, copyLength);\n",
" } else {\n",
" // Right Pad the push with 0s up to pushSize if greate... | [
" final int copyLength = Math.min(pushSize, code.length - pc - 1);\n",
" push = Bytes.wrap(code, copyStart, copyLength);\n"
] | [
" final int copyLength = Math.min(pushSize, code.length - pc - 1);\n",
" final int rightPad = pushSize - copyLength;\n",
" if (rightPad == 0) {\n",
" push = Bytes.wrap(code, copyStart, copyLength);\n",
" } else {\n",
" // Right Pad the push with 0s up to pushSize if great... | [
" System.arraycopy(code, copyStart, bytecodeLocal, 0, copyLength);\n",
" push = Bytes.wrap(bytecodeLocal);\n",
" }\n",
" }\n",
" frame.pushStackItem(push);\n",
" frame.setPC(pc + length);\n",
" return new OperationResult(gasCost, null);\n",
" }\n",
"}\n"
] | [
" final int copyLength = Math.min(length, code.length - copyStart);\n",
" final int rightPad = length - copyLength;\n",
" if (rightPad == 0) {\n",
" push = Bytes.wrap(code, copyStart, copyLength);\n",
" } else {\n",
" // Right Pad the push with 0s up to pushSize if greate... | false | de4863b46cbfed3e | [
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 7626f2af6baa94d395c547c67daaac16c9c27865 | 9d88191ec859f0a13d78d2ca6cd0304c4b58483c | cfc3e76d650a3d9da9f2aa85ab6d4c7edfaede40 | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java | 2 | 4 | [
"\n",
" static ProtocolSpecBuilder pragueDefinition(\n",
" final Optional<BigInteger> chainId,\n",
" final boolean enableRevertReason,\n",
" final GenesisConfigOptions genesisConfigOptions,\n",
" final EvmConfiguration evmConfiguration,\n",
" final MiningParameters miningParame... | [
" // change contract call creator to accept EOF code\n",
" .contractCreationProcessorBuilder(\n",
" (gasCalculator, evm) ->\n",
" new ContractCreationProcessor(\n",
" gasCalculator,\n",
" evm,\n",
" true,\n"... | [
" // change contract call creator to accept EOF code\n",
" .contractCreationProcessorBuilder(\n",
" (gasCalculator, evm) ->\n",
" new ContractCreationProcessor(\n",
" gasCalculator,\n",
" evm,\n",
" true,\n"... | [] | [
"\n",
" // EIP-2537 BLS12-381 precompiles\n",
" .precompileContractRegistryBuilder(MainnetPrecompiledContractRegistries::prague)\n",
"\n",
" // EIP-7002 Withdrawals / EIP-6610 Deposits / EIP-7685 Requests\n",
" .requestsValidator(pragueRequestsValidator(depositContractAddress))... | [] | false | 323b401b59794402 | [] | side B | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 7626f2af6baa94d395c547c67daaac16c9c27865 | 9d88191ec859f0a13d78d2ca6cd0304c4b58483c | cfc3e76d650a3d9da9f2aa85ab6d4c7edfaede40 | evm/src/main/java/org/hyperledger/besu/evm/processor/ContractCreationProcessor.java | 0 | 1 | [
" frame.setExceptionalHaltReason(Optional.of(ExceptionalHaltReason.ILLEGAL_STATE_CHANGE));\n",
" frame.setState(MessageFrame.State.EXCEPTIONAL_HALT);\n",
" operationTracer.traceAccountCreationResult(\n",
" frame, Optional.of(ExceptionalHaltReason.ILLEGAL_STATE_CHANGE));\n",
"... | [
" final Bytes contractCode = frame.getOutputData();\n",
" final long depositFee = gasCalculator.codeDepositGasCost(frame, contractCode.size());\n"
] | [
" final Bytes contractCode = frame.getOutputData();\n",
"\n",
" final long depositFee = gasCalculator.codeDepositGasCost(contractCode.size());\n",
"\n"
] | [
" final Bytes contractCode =\n",
" frame.getCreatedCode() == null ? frame.getOutputData() : frame.getCreatedCode().getBytes();\n",
"\n",
" final long depositFee = evm.getGasCalculator().codeDepositGasCost(contractCode.size());\n",
"\n"
] | [
" if (frame.getRemainingGas() < depositFee) {\n",
" LOG.trace(\n",
" \"Not enough gas to pay the code deposit fee for {}: \"\n",
" + \"remaining gas = {} < {} = deposit fee\",\n",
" frame.getContractAddress(),\n",
" frame.getRemainingGas(),\n",
" ... | [
"\n",
" final Bytes contractCode =\n",
" frame.getCreatedCode() == null ? frame.getOutputData() : frame.getCreatedCode().getBytes();\n",
"\n",
" final long depositFee = evm.getGasCalculator().codeDepositGasCost(frame, contractCode.size());\n",
"\n"
] | false | ee801b630597c1bc | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 7626f2af6baa94d395c547c67daaac16c9c27865 | 9d88191ec859f0a13d78d2ca6cd0304c4b58483c | cfc3e76d650a3d9da9f2aa85ab6d4c7edfaede40 | evm/src/test/java/org/hyperledger/besu/evm/processor/ContractCreationProcessorTest.java | 1 | 11 | [
" processor.codeSuccess(messageFrame, OperationTracer.NO_TRACING);\n",
" assertThat(messageFrame.getState()).isEqualTo(EXCEPTIONAL_HALT);\n",
" assertThat(messageFrame.getExceptionalHaltReason())\n",
" .contains(ExceptionalHaltReason.INVALID_CODE);\n",
" }\n",
"\n",
" @Test\n",
" vo... | [
" when(gasCalculator.codeDepositGasCost(messageFrame, contractCode.size())).thenReturn(10L);\n"
] | [
" when(gasCalculator.codeDepositGasCost(contractCode.size())).thenReturn(10L);\n"
] | [] | [
" processor.codeSuccess(messageFrame, OperationTracer.NO_TRACING);\n",
" assertThat(messageFrame.getState()).isEqualTo(COMPLETED_SUCCESS);\n",
" }\n",
"\n",
" @Test\n",
" void shouldNotThrowAnExceptionWhenPrefixCodeRuleNotAdded() {\n",
" processor =\n",
" new ContractCreationProcess... | [] | false | 43fe69eae97ede38 | [] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 7626f2af6baa94d395c547c67daaac16c9c27865 | 9d88191ec859f0a13d78d2ca6cd0304c4b58483c | cfc3e76d650a3d9da9f2aa85ab6d4c7edfaede40 | evm/src/test/java/org/hyperledger/besu/evm/processor/ContractCreationProcessorTest.java | 5 | 11 | [
" processor.codeSuccess(messageFrame, OperationTracer.NO_TRACING);\n",
" assertThat(messageFrame.getState()).isEqualTo(COMPLETED_SUCCESS);\n",
" }\n",
"\n",
" @Test\n",
" void eofValidationShouldAllowEOFCode() {\n",
" processor =\n",
" new ContractCreationProcessor(\n",
" ... | [
" when(gasCalculator.codeDepositGasCost(messageFrame, contractCode.size())).thenReturn(10L);\n"
] | [
" when(gasCalculator.codeDepositGasCost(contractCode.size())).thenReturn(10L);\n"
] | [] | [
" processor.codeSuccess(messageFrame, OperationTracer.NO_TRACING);\n",
" assertThat(messageFrame.getState()).isEqualTo(COMPLETED_SUCCESS);\n",
" }\n",
"\n",
" @Test\n",
" void prefixValidationShouldPreventEOFCode() {\n",
" processor =\n",
" new ContractCreationProcessor(\n",
" ... | [] | false | 8a345d26c63d2902 | [] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 7626f2af6baa94d395c547c67daaac16c9c27865 | 9d88191ec859f0a13d78d2ca6cd0304c4b58483c | cfc3e76d650a3d9da9f2aa85ab6d4c7edfaede40 | evm/src/test/java/org/hyperledger/besu/evm/tracing/ExtendedOperationTracerTest.java | 1 | 2 | [
"import java.util.Collections;\n",
"import java.util.Optional;\n",
"\n",
"import org.apache.tuweni.bytes.Bytes;\n",
"import org.junit.jupiter.api.BeforeEach;\n",
"import org.junit.jupiter.api.Test;\n",
"import org.junit.jupiter.api.extension.ExtendWith;\n",
"import org.mockito.Mock;\n",
"import org.... | [
" when(gasCalculator.codeDepositGasCost(eq(frame), anyInt())).thenReturn(0L);\n"
] | [
" when(gasCalculator.codeDepositGasCost(anyInt())).thenReturn(0L);\n"
] | [] | [
" when(frame.getRemainingGas()).thenReturn(1L);\n",
"\n",
" when(frame.getWorldUpdater()).thenReturn(worldUpdater);\n",
" when(worldUpdater.getOrCreate(any())).thenReturn(mutableAccount);\n",
" }\n",
"\n",
" @Test\n",
" void shouldCallTraceAccountCreationResultIfIsExtendedTracing() {\n",
... | [] | false | a04480299bb47e03 | [] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | f6f7b4042f6e239d53241c00550385892e86014d | 2eb7314ca36029ff38654afeefaabcf5f9edf024 | c1c371589b4759b044608650d659ca475ec621bb | ethereum/api/src/integration-test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcResponseUtils.java | 0 | 1 | [
" ommersHash,\n",
" coinbase,\n",
" stateRoot,\n",
" transactionsRoot,\n",
" receiptsRoot,\n",
" logsBloom,\n",
" difficulty,\n",
" number,\n",
" gasLimit,\n",
" gasUsed,\n",
" ... | [
" blockHeaderFunctions,\n",
" null);\n"
] | [
" targetBlobsPerBlock,\n",
" blockHeaderFunctions);\n"
] | [
" blockHeaderFunctions);\n"
] | [
"\n",
" return new JsonRpcSuccessResponse(\n",
" null, new BlockResult(header, transactions, ommers, totalDifficulty, size));\n",
" }\n",
"\n",
" public List<TransactionResult> transactions(final String... values) {\n",
" final List<TransactionResult> nodes = new ArrayList<>(values.length... | [
" blockHeaderFunctions,\n",
" null);\n"
] | false | 7c52c3562871b3a4 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | f6f7b4042f6e239d53241c00550385892e86014d | 2eb7314ca36029ff38654afeefaabcf5f9edf024 | c1c371589b4759b044608650d659ca475ec621bb | ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java | 0 | 1 | [
" }\n",
"\n",
" @Test\n",
" public void shouldReturnInvalidIfRequestsIsNotNull_WhenRequestsProhibited() {\n",
" mockProhibitedRequestsValidator();\n",
"\n",
" var resp = resp(mockEnginePayload(createValidBlockHeaderForV4(Optional.empty()), emptyList()));\n",
"\n",
" final JsonRpcError js... | [
" final EnginePayloadParameter payload = mockEnginePayload(mockHeader, emptyList());\n",
"\n",
" ValidationResult<RpcErrorType> res =\n",
" method.validateParameters(\n",
" payload,\n",
" Optional.of(List.of()),\n",
" Optional.of(\"0x000000000000000000000000... | [] | [
" final EnginePayloadParameter payload = mockEnginePayload(mockHeader, emptyList(), null);\n",
"\n",
" ValidationResult<RpcErrorType> res =\n",
" method.validateParameters(\n",
" payload,\n",
" Optional.of(List.of()),\n",
" Optional.of(\"0x000000000000000000... | [
"\n",
" ValidationResult<RpcErrorType> res =\n",
" method.validateParameters(\n",
" payload,\n",
" Optional.of(List.of()),\n",
" Optional.of(\"0x0000000000000000000000000000000000000000000000000000000000000000\"),\n",
" Optional.of(emptyList()));\n",... | [
" final EnginePayloadParameter payload = mockEnginePayload(mockHeader, emptyList());\n",
"\n",
" ValidationResult<RpcErrorType> res =\n",
" method.validateParameters(\n",
" payload,\n",
" Optional.of(List.of()),\n",
" Optional.of(\"0x000000000000000000000000... | false | 2b10aee8c791678f | [
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9",
"A10",
"A11",
"A12",
"A13",
"A14",
"A15",
"A16",
"A17",
"A18",
"A19"
] | side A | {
"test_file": true,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | f6f7b4042f6e239d53241c00550385892e86014d | 2eb7314ca36029ff38654afeefaabcf5f9edf024 | c1c371589b4759b044608650d659ca475ec621bb | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/BlockHeader.java | 3 | 5 | [
" coinbase,\n",
" stateRoot,\n",
" transactionsRoot,\n",
" receiptsRoot,\n",
" logsBloom,\n",
" difficulty,\n",
" number,\n",
" gasLimit,\n",
" gasUsed,\n",
" timestamp,\n",
" extraData,\n",
" baseFee,\n",
" ... | [
" Optional.of(headerRlp.raw()),\n",
" executionWitness);\n"
] | [
" targetBlobsPerBlock,\n",
" blockHeaderFunctions);\n"
] | [
" Optional.of(headerRlp.raw()));\n"
] | [
" }\n",
"\n",
" @Override\n",
" public boolean equals(final Object obj) {\n",
" if (obj == this) {\n",
" return true;\n",
" }\n",
" if (!(obj instanceof BlockHeader other)) {\n",
" return false;\n",
" }\n",
" return getHash().equals(other.getHash());\n",
" }\n",
... | [
" Optional.of(headerRlp.raw()),\n",
" executionWitness);\n"
] | false | 073e84e23d0e2729 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | f6f7b4042f6e239d53241c00550385892e86014d | 2eb7314ca36029ff38654afeefaabcf5f9edf024 | c1c371589b4759b044608650d659ca475ec621bb | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java | 3 | 5 | [
" metricsSystem)\n",
" // gas calculator has new code to support EIP-3860 limit and meter initcode\n",
" .gasCalculator(ShanghaiGasCalculator::new)\n",
" // EVM has a new operation for EIP-3855 PUSH0 instruction\n",
" .evmBuilder(\n",
" (gasCalculator, jdC... | [
" .clearEmptyAccountStrategy(clearEmptyAccountStrategy)\n"
] | [
" new MainnetTransactionProcessor(\n",
" gasCalculator,\n",
" transactionValidatorFactory,\n",
" contractCreationProcessor,\n",
" messageCallProcessor,\n",
" true,\n",
" true,... | [
" .clearEmptyAccounts(true)\n"
] | [
" .warmCoinbase(true)\n",
" .maxStackSize(evmConfiguration.evmStackSize())\n",
" .feeMarket(feeMarket)\n",
" .coinbaseFeePriceCalculator(CoinbaseFeePriceCalculator.eip1559())\n",
" .build())\n",
" // Cont... | [
" .clearEmptyAccountStrategy(clearEmptyAccountStrategy)\n"
] | false | 5c1fbeedcf854932 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | f6f7b4042f6e239d53241c00550385892e86014d | 2eb7314ca36029ff38654afeefaabcf5f9edf024 | c1c371589b4759b044608650d659ca475ec621bb | evm/src/main/java/org/hyperledger/besu/evm/operation/ExtCodeCopyOperation.java | 0 | 1 | [
"\n",
" @Override\n",
" public OperationResult execute(final MessageFrame frame, final EVM evm) {\n",
" final Address address = Words.toAddress(frame.popStackItem());\n",
" final long memOffset = clampedToLong(frame.popStackItem());\n",
" final long sourceOffset = clampedToLong(frame.popStackIt... | [] | [
" final Account account = frame.getWorldUpdater().get(address);\n",
"\n",
" if (account != null) {\n",
" final DelegatedCodeGasCostHelper.Result result =\n",
" deductDelegatedCodeGasCost(frame, gasCalculator(), account);\n",
" if (result.status() != DelegatedCodeGasCostHelper.Stat... | [
" final Account account = frame.getWorldUpdater().get(address);\n",
" final Bytes code = account != null ? account.getCode() : Bytes.EMPTY;\n",
"\n"
] | [
" if (enableEIP3540\n",
" && code.size() >= 2\n",
" && code.get(0) == EOFLayout.EOF_PREFIX_BYTE\n",
" && code.get(1) == 0) {\n",
" frame.writeMemory(memOffset, sourceOffset, readSize, EOF_REPLACEMENT_CODE);\n",
" } else {\n",
" frame.writeMemory(memOffset, sourceOffs... | [] | false | 140e5d22f8df59e3 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | ccdb9806920c4bfd1bb0a87c7fc003f8ae1bdfea | a368a353d80098e6d7970d9545a4097772bfcbe6 | 7f77d307a0b50d2618505549963514d6bfc8f7bd | besu/src/test/java/org/hyperledger/besu/controller/BesuControllerBuilderTest.java | 1 | 3 | [
"\n"
] | [
" when(worldStateKeyValueStorage.isWorldStateAvailable(any())).thenReturn(true);\n",
" when(worldStatePreimageStorage.updater())\n"
] | [
" when(worldStateStorage.isWorldStateAvailable(any(), any())).thenReturn(true);\n",
" when(worldStatePreimageStorage.updater())\n"
] | [
" lenient().when(worldStateStorage.isWorldStateAvailable(any(), any())).thenReturn(true);\n",
" lenient()\n",
" .when(worldStatePreimageStorage.updater())\n"
] | [
" .thenReturn(mock(WorldStatePreimageStorage.Updater.class));\n"
] | [
" lenient().when(worldStateKeyValueStorage.isWorldStateAvailable(any())).thenReturn(true);\n",
" lenient()\n",
" .when(worldStatePreimageStorage.updater())\n"
] | false | bc18c80cee18dd35 | null | needs new code | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | ccdb9806920c4bfd1bb0a87c7fc003f8ae1bdfea | a368a353d80098e6d7970d9545a4097772bfcbe6 | 7f77d307a0b50d2618505549963514d6bfc8f7bd | besu/src/test/java/org/hyperledger/besu/controller/BesuControllerBuilderTest.java | 2 | 3 | [
" .thenReturn(mock(WorldStatePreimageStorage.Updater.class));\n"
] | [
" when(worldStateKeyValueStorage.updater())\n",
" .thenReturn(mock(ForestWorldStateKeyValueStorage.Updater.class));\n"
] | [
" when(worldStateStorage.updater()).thenReturn(mock(WorldStateStorage.Updater.class));\n"
] | [
" lenient().when(worldStateStorage.updater()).thenReturn(mock(WorldStateStorage.Updater.class));\n"
] | [
" besuControllerBuilder = spy(visitWithMockConfigs(new MainnetBesuControllerBuilder()));\n",
" }\n",
"\n",
" BesuControllerBuilder visitWithMockConfigs(final BesuControllerBuilder builder) {\n",
" return builder\n",
" .gasLimitCalculator(gasLimitCalculator)\n",
" .genesisConfigFile... | [
" lenient()\n",
" .when(worldStateKeyValueStorage.updater())\n",
" .thenReturn(mock(ForestWorldStateKeyValueStorage.Updater.class));\n",
"\n"
] | false | 964392d6b82d621e | null | needs new code | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | ccdb9806920c4bfd1bb0a87c7fc003f8ae1bdfea | a368a353d80098e6d7970d9545a4097772bfcbe6 | 7f77d307a0b50d2618505549963514d6bfc8f7bd | besu/src/test/java/org/hyperledger/besu/controller/MergeBesuControllerBuilderTest.java | 0 | 4 | [
" @Mock(answer = Answers.RETURNS_DEEP_STUBS)\n",
" MiningParameters miningParameters;\n",
"\n",
" @Mock PrivacyParameters privacyParameters;\n",
" @Mock Clock clock;\n",
" @Mock StorageProvider storageProvider;\n",
" @Mock GasLimitCalculator gasLimitCalculator;\n",
" @Mock WorldStatePreimageSto... | [
" final ForestWorldStateKeyValueStorage worldStateKeyValueStorage =\n",
" mock(ForestWorldStateKeyValueStorage.class);\n",
" final WorldStateStorageCoordinator worldStateStorageCoordinator =\n",
" new WorldStateStorageCoordinator(worldStateKeyValueStorage);\n",
"\n",
" when(genesisC... | [
" when(genesisConfigFile.getParentHash()).thenReturn(Hash.ZERO.toHexString());\n",
" when(genesisConfigFile.getDifficulty()).thenReturn(Bytes.of(0).toHexString());\n",
" when(genesisConfigFile.getExtraData()).thenReturn(Bytes.EMPTY.toHexString());\n",
" when(genesisConfigFile.getMixHash()).thenRet... | [
" lenient().when(genesisConfigFile.getParentHash()).thenReturn(Hash.ZERO.toHexString());\n",
" lenient().when(genesisConfigFile.getDifficulty()).thenReturn(Bytes.of(0).toHexString());\n",
" lenient().when(genesisConfigFile.getExtraData()).thenReturn(Bytes.EMPTY.toHexString());\n",
" lenient().when... | [
" when(genesisConfigOptions.getTerminalTotalDifficulty())\n",
" .thenReturn((Optional.of(UInt256.valueOf(100L))));\n",
" when(genesisConfigOptions.getThanosBlockNumber()).thenReturn(OptionalLong.empty());\n",
" when(genesisConfigOptions.getTerminalBlockHash()).thenReturn(Optional.of(Hash.ZERO)... | [
"\n",
" final ForestWorldStateKeyValueStorage worldStateKeyValueStorage =\n",
" mock(ForestWorldStateKeyValueStorage.class);\n",
" final WorldStateStorageCoordinator worldStateStorageCoordinator =\n",
" new WorldStateStorageCoordinator(worldStateKeyValueStorage);\n",
"\n",
" lenie... | false | 736db89b5415049d | null | needs new code | {
"test_file": true,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | ccdb9806920c4bfd1bb0a87c7fc003f8ae1bdfea | a368a353d80098e6d7970d9545a4097772bfcbe6 | 7f77d307a0b50d2618505549963514d6bfc8f7bd | besu/src/test/java/org/hyperledger/besu/controller/MergeBesuControllerBuilderTest.java | 1 | 4 | [
" when(genesisConfigOptions.getTerminalBlockHash()).thenReturn(Optional.of(Hash.ZERO));\n",
" lenient().when(genesisConfigOptions.getTerminalBlockNumber()).thenReturn(OptionalLong.of(1L));\n",
" lenient()\n",
" .when(storageProvider.createBlockchainStorage(any(), any()))\n",
" .thenRe... | [
" when(storageProvider.createWorldStateStorageCoordinator(DataStorageFormat.FOREST))\n",
" .thenReturn(worldStateStorageCoordinator);\n",
" when(storageProvider.createWorldStatePreimageStorage()).thenReturn(worldStatePreimageStorage);\n"
] | [
" when(storageProvider.createWorldStateStorage(DataStorageFormat.FOREST))\n",
" .thenReturn(worldStateStorage);\n",
" when(storageProvider.createWorldStatePreimageStorage()).thenReturn(worldStatePreimageStorage);\n"
] | [
" lenient()\n",
" .when(storageProvider.createWorldStateStorage(DataStorageFormat.FOREST))\n",
" .thenReturn(worldStateStorage);\n",
" lenient()\n",
" .when(storageProvider.createWorldStatePreimageStorage())\n",
" .thenReturn(worldStatePreimageStorage);\n"
] | [
"\n"
] | [
" lenient()\n",
" .when(storageProvider.createWorldStateStorageCoordinator(DataStorageFormat.FOREST))\n",
" .thenReturn(worldStateStorageCoordinator);\n",
" lenient()\n",
" .when(storageProvider.createWorldStatePreimageStorage())\n",
" .thenReturn(worldStatePreimageStorag... | false | 764ded05e962072a | null | needs new code | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | ccdb9806920c4bfd1bb0a87c7fc003f8ae1bdfea | a368a353d80098e6d7970d9545a4097772bfcbe6 | 7f77d307a0b50d2618505549963514d6bfc8f7bd | besu/src/test/java/org/hyperledger/besu/controller/MergeBesuControllerBuilderTest.java | 3 | 4 | [
" .thenReturn(mock(WorldStatePreimageStorage.Updater.class));\n"
] | [
" when(worldStateKeyValueStorage.updater())\n",
" .thenReturn(mock(ForestWorldStateKeyValueStorage.Updater.class));\n",
" when(miningParameters.getTargetGasLimit()).thenReturn(OptionalLong.empty());\n"
] | [
" when(worldStateStorage.updater()).thenReturn(mock(WorldStateStorage.Updater.class));\n",
" when(miningParameters.getTargetGasLimit()).thenReturn(OptionalLong.empty());\n"
] | [
" lenient().when(worldStateStorage.updater()).thenReturn(mock(WorldStateStorage.Updater.class));\n",
" lenient().when(miningParameters.getTargetGasLimit()).thenReturn(OptionalLong.empty());\n"
] | [
"\n",
" besuControllerBuilder = visitWithMockConfigs(new MergeBesuControllerBuilder());\n",
" }\n",
"\n",
" MergeBesuControllerBuilder visitWithMockConfigs(final MergeBesuControllerBuilder builder) {\n",
" return (MergeBesuControllerBuilder)\n",
" builder\n",
" .gasLimitCalcu... | [
" lenient()\n",
" .when(worldStateKeyValueStorage.updater())\n",
" .thenReturn(mock(ForestWorldStateKeyValueStorage.Updater.class));\n",
" lenient().when(miningParameters.getTargetGasLimit()).thenReturn(OptionalLong.empty());\n"
] | false | d791d8c2b18c10b7 | null | needs new code | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 41e6fd88c82adf014efba26285516450101efc15 | 1b52150c15fecf42f8dea548ce07dd079d24ba29 | 4facca230e3430a61f7915d7b316c6b4ef5b0f0a | consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java | 0 | 1 | [
" preparePayloadArgs\n",
" .inclusionListTransactions()\n",
" .map(InclusionListTransactions::getTransactions)\n",
" .orElse(Set.of());\n",
"\n",
" // put the empty block in first\n",
" final BlockCreationResult minimalBlockResult =\n",
" mergeBlock... | [
" validateProposedBlock(\n",
" minimalBlock, minimalBlockResult.getBlockAccessList(), inclusionListTransactions);\n"
] | [
" validateProposedBlock(emptyBlock, emptyBlockResult.getBlockAccessList());\n"
] | [
" validateProposedBlock(minimalBlock, minimalBlockResult.getBlockAccessList());\n"
] | [
" if (result.isSuccessful()) {\n",
" mergeContext.putPayloadById(\n",
" new PayloadWrapper(\n",
" payloadIdentifier,\n",
" new BlockWithReceipts(minimalBlock, result.getReceipts()),\n",
" minimalBlockResult.getBlockAccessList(),\n",
" ... | [
" validateProposedBlock(\n",
" minimalBlock, minimalBlockResult.getBlockAccessList(), inclusionListTransactions);\n"
] | false | 38571cb6a0286c60 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 9ebc32bf4184124747a3b257e9bb9a4c10976f71 | 8ab3aaca043f1345ca09bb2e5f0a0040e8aa183a | f16d3526db2e5b22e64d0e975b4b98bfec4b09db | ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreatorTest.java | 0 | 1 | [
" assertThat(excessBlobGas).isNotNull();\n",
" }\n",
"\n",
" private CreateOn blockCreatorWithBlobGasSupport() {\n",
" final var alwaysValidTransactionValidatorFactory = mock(TransactionValidatorFactory.class);\n",
" when(alwaysValidTransactionValidatorFactory.get())\n",
" .thenReturn(... | [
" // private CreateOn blockCreatorWithProhibitedDepositRequests() {\n",
" // final ProtocolSpecAdapters protocolSpecAdapters =\n",
" // ProtocolSpecAdapters.create(0, specBuilder -> specBuilder);\n",
" // return createBlockCreator(protocolSpecAdapters);\n",
" // }\n",
"\n"
] | [
" private CreateOn blockCreatorWithProhibitedDepositRequests() {\n",
" final ProtocolSpecAdapters protocolSpecAdapters =\n",
" ProtocolSpecAdapters.create(0, specBuilder -> specBuilder);\n",
" return createBlockCreator(protocolSpecAdapters);\n",
" }\n",
"\n"
] | [] | [
" private CreateOn blockCreatorWithWithdrawalsProcessor() {\n",
" final ProtocolSpecAdapters protocolSpecAdapters =\n",
" ProtocolSpecAdapters.create(\n",
" 0, specBuilder -> specBuilder.withdrawalsProcessor(withdrawalsProcessor));\n",
" return createBlockCreator(protocolSpecAdapter... | [] | false | b9f3738e94c60464 | [] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 9ebc32bf4184124747a3b257e9bb9a4c10976f71 | 8ab3aaca043f1345ca09bb2e5f0a0040e8aa183a | f16d3526db2e5b22e64d0e975b4b98bfec4b09db | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/requests/MainnetRequestsValidator.java | 0 | 3 | [
"/*\n",
" * Copyright contributors to Hyperledger Besu.\n",
" *\n",
" * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\n",
" * the License. You may obtain a copy of the License at\n",
" *\n",
" * http://www.apache.org/licenses/LICENS... | [
"import org.hyperledger.besu.datatypes.RequestType;\n"
] | [
"import org.hyperledger.besu.datatypes.RequestType;\n"
] | [] | [
"import org.hyperledger.besu.ethereum.core.Request;\n",
"\n",
"import java.util.List;\n",
"import java.util.Optional;\n"
] | [] | false | faedeccfb1ac1553 | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 9ebc32bf4184124747a3b257e9bb9a4c10976f71 | 8ab3aaca043f1345ca09bb2e5f0a0040e8aa183a | f16d3526db2e5b22e64d0e975b4b98bfec4b09db | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/requests/MainnetRequestsValidator.java | 2 | 3 | [
" return false;\n",
" }\n",
"\n",
" return true;\n",
" }\n",
"\n",
" private static boolean isRequestOrderValid(final List<Request> requests) {\n"
] | [
" return IntStream.range(0, requests.size() - 1)\n",
" .allMatch(i -> requests.get(i).getType().compareTo(requests.get(i + 1).getType()) <= 0);\n",
" }\n",
"\n",
" private static boolean allRequestTypesAreContained(final List<Request> requests) {\n",
" return requests.stream().map(Request::... | [
" public static RequestProcessorCoordinator pragueRequestsProcessors(\n",
" final RequestContractAddresses requestContractAddresses) {\n",
" return new RequestProcessorCoordinator.Builder()\n",
" .addProcessor(\n",
" RequestType.WITHDRAWAL,\n",
" new WithdrawalRequest... | [
" return Ordering.natural().onResultOf(Request::getType).isOrdered(requests);\n"
] | [
" }\n",
"}\n"
] | [
" return Ordering.natural().onResultOf(Request::getType).isOrdered(requests);\n"
] | false | c686dd6c1f052bec | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 9ebc32bf4184124747a3b257e9bb9a4c10976f71 | 8ab3aaca043f1345ca09bb2e5f0a0040e8aa183a | f16d3526db2e5b22e64d0e975b4b98bfec4b09db | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/requests/SystemCallRequestProcessor.java | 0 | 1 | [
" /**\n",
" * Processes a system call and converts the result as a Request.\n",
" *\n",
" * @param context The request context being processed.\n",
" * @return A {@link Request} request\n",
" */\n",
" @Override\n",
" public Request process(final ProcessRequestContext context) {\n",
"\n"... | [
" Bytes requestData = systemCallOutput == null ? Bytes.EMPTY : systemCallOutput;\n",
" return new Request(requestType, requestData);\n"
] | [] | [
" return new Request(requestType, systemCallOutput);\n"
] | [
" }\n",
"}\n"
] | [
" return new Request(requestType, systemCallOutput);\n"
] | false | 8a3991dc30a329f2 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 9ebc32bf4184124747a3b257e9bb9a4c10976f71 | 8ab3aaca043f1345ca09bb2e5f0a0040e8aa183a | f16d3526db2e5b22e64d0e975b4b98bfec4b09db | ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/T8nExecutor.java | 0 | 1 | [
" p ->\n",
" p.processWithdrawals(\n",
" referenceTestEnv.getWithdrawals(), worldState.updater()));\n",
" } catch (RuntimeException re) {\n",
" resultObject.put(\"exception\", re.getMessage());\n",
" }\n",
" }\n",... | [
" Optional<List<Request>> maybeRequests = rpc.process(context);\n"
] | [
" Optional<List<Request>> maybeRequests = rpc.process(context);\n",
" Hash requestRoot = BodyValidation.requestsRoot(maybeRequests.orElse(List.of()));\n"
] | [
" Optional<List<Request>> maybeRequests = Optional.of(rpc.process(context));\n"
] | [
" Hash requestsHash = BodyValidation.requestsHash(maybeRequests.orElse(List.of()));\n",
"\n",
" resultObject.put(\"requestsHash\", requestsHash.toHexString());\n",
" ArrayNode requests = resultObject.putArray(\"requests\");\n",
" maybeRequests\n",
" .orElseGet(List::of)\n",
... | [
" Optional<List<Request>> maybeRequests = Optional.of(rpc.process(context));\n"
] | false | 9f7b562ff67611fa | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
klikli-dev/occultism | e228368527b501a5cbed6d93761c3f1a31ba4fc3 | 46856f087e7501e5ca3375c772e6b94d5f9ba75f | 3da0a09a7d755ea6179f9e9da5c73eb484b2d0d1 | src/main/java/com/github/klikli_dev/occultism/common/entity/ChimeraFamiliarEntity.java | 0 | 1 | [
" }\n",
"\n",
" @Override\n",
" protected InteractionResult mobInteract(Player playerIn, InteractionHand hand) {\n",
" ItemStack stack = playerIn.getItemInHand(hand);\n",
" FoodProperties food = stack.getItem().getFoodProperties();\n",
" if (this.hasGoat() && stack.getItem(... | [
" this.setSize((byte) (this.getSize() + food.getNutrition()));\n",
" return InteractionResult.sidedSuccess(this.level.isClientSide);\n",
" } else if (!this.isSitting() && !this.isVehicle() && !playerIn.isSecondaryUseActive()\n",
" && this.getFamiliarOwner() == playe... | [
" setSize((byte) (getSize() + food.getNutrition()));\n",
" return ActionResultType.sidedSuccess(this.level.isClientSide);\n",
" } else if (!isSitting() && !this.isVehicle() && !playerIn.isSecondaryUseActive()\n",
" && getFamiliarOwner() == playerIn && getSize() > RI... | [
" setSize((byte) (getSize() + food.getNutrition()));\n",
" this.heal(4);\n",
" return ActionResultType.sidedSuccess(this.level.isClientSide);\n",
" } else if (!isSitting() && !this.isVehicle() && !playerIn.isSecondaryUseActive()\n",
" && getFamiliarOwne... | [
" if (!this.level.isClientSide) {\n",
" playerIn.startRiding(this);\n",
" OccultismAdvancements.FAMILIAR.trigger(playerIn, FamiliarTrigger.Type.CHIMERA_RIDE);\n",
" }\n",
" return InteractionResult.sidedSuccess(this.level.isClientSide);\n",
" ... | [
" this.setSize((byte) (this.getSize() + food.getNutrition()));\n",
" this.heal(4);\n",
" return InteractionResult.sidedSuccess(this.level.isClientSide);\n",
" } else if (!this.isSitting() && !this.isVehicle() && !playerIn.isSecondaryUseActive()\n",
" &&... | false | 27178ce947aaed07 | [
"A1",
"B2",
"A2",
"A3",
"A4"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | e228368527b501a5cbed6d93761c3f1a31ba4fc3 | 46856f087e7501e5ca3375c772e6b94d5f9ba75f | 3da0a09a7d755ea6179f9e9da5c73eb484b2d0d1 | src/main/java/com/github/klikli_dev/occultism/handlers/FamiliarEventHandler.java | 0 | 1 | [
"\n",
" EntityType<?> headType = event.getEntityLiving().getType();\n",
"\n",
" if (!FamiliarUtil.hasFamiliar(player, OccultismEntities.HEADLESS_FAMILIAR.get(),\n",
" h -> h.getHeadType() == headType))\n",
" return;\n",
"\n",
" event.setAmount(event.getAm... | [
"\n",
" if (event.getEntityLiving().getType() == OccultismEntities.CTHULHU_FAMILIAR.get())\n"
] | [
" \n",
" if (event.getEntityLiving().getType() == OccultismEntities.CTHULHU_FAMILIAR.get())\n"
] | [
" \n",
" if (!headlesses.isEmpty() && event.getEntityLiving().getType() == OccultismEntities.CTHULHU_FAMILIAR.get())\n"
] | [
" OccultismAdvancements.FAMILIAR.trigger(player, FamiliarTrigger.Type.HEADLESS_CTHULHU_HEAD);\n",
"\n",
" headlesses.forEach(h -> h.setHeadType(event.getEntityLiving().getType()));\n",
" }\n",
"\n",
" private static void guardianUltimateSacrifice(LivingDeathEvent event) {\n",
" ... | [
" \n",
" if (!headlesses.isEmpty() && event.getEntityLiving().getType() == OccultismEntities.CTHULHU_FAMILIAR.get())\n"
] | false | 2152bcc8b2ec4760 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | f73f0c325e7e67e6079990225a13a55067565808 | 1d1ed194f7f623b51a3e31cf9299fb053a160c94 | d0cc4b6af656ce014bd77b987c6a9de24c5f98dd | src/main/java/com/github/klikli_dev/occultism/common/ritual/Ritual.java | 0 | 2 | [
" }\n",
" //endregion Getter / Setter\n",
"\n",
" //region Methods\n",
"\n",
" /**\n",
" * Checks whether the ritual is valid.\n",
" * Validity is required to start and continue a ritual.\n",
" *\n",
" * @param level the level.\n",
" * @param goldenBo... | [
" this.areAdditionalIngredientsFulfilled(level, goldenBowlPosition, remainingAdditionalIngredients) &&\n",
" this.recipe.getPentacle().validate(level, goldenBowlPosition);\n"
] | [
" return this.recipe.getActivationItem().test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(world, goldenBowlPosition, remainingAdditionalIngredients) &&\n",
" this.recipe.getPentacle().validate(world, goldenBowlPosition);\n"
] | [
" this.areAdditionalIngredientsFulfilled(world, goldenBowlPosition, remainingAdditionalIngredients) &&\n",
" this.recipe.getPentacle().validate(world, goldenBowlPosition);\n"
] | [
" }\n",
"\n",
" /**\n",
" * Called when starting the ritual.\n",
" *\n",
" * @param level the level.\n",
" * @param goldenBowlPosition the position of the golden bowl.\n",
" * @param blockEntity the tile entity controlling the ritual.\n",
" * @param ... | [
" this.areAdditionalIngredientsFulfilled(level, goldenBowlPosition, remainingAdditionalIngredients) &&\n",
" this.recipe.getPentacle().validate(level, goldenBowlPosition);\n"
] | false | a7014fe72c8eb252 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | f73f0c325e7e67e6079990225a13a55067565808 | 1d1ed194f7f623b51a3e31cf9299fb053a160c94 | d0cc4b6af656ce014bd77b987c6a9de24c5f98dd | src/main/java/com/github/klikli_dev/occultism/common/ritual/Ritual.java | 1 | 2 | [
" * @param goldenBowlPosition the position of the golden bowl.\n",
" * @param blockEntity the tile entity controlling the ritual.\n",
" * @param castingPlayer the player starting the ritual.\n",
" * @param activationItem the item used to start the ritual.\n",
" * @param t... | [
" public boolean identify(Level level, BlockPos goldenBowlPosition, ItemStack activationItem) {\n",
" return this.recipe.getPentacle() != null && this.recipe.getActivationItem().test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(level, goldenBowlPosition, this.recipe.g... | [
" public boolean identify(World world, BlockPos goldenBowlPosition, ItemStack activationItem) {\n",
" return this.recipe.getActivationItem().test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(world, goldenBowlPosition, this.recipe.getIngredients()) &&\n",
" ... | [
" public boolean identify(World world, BlockPos goldenBowlPosition, ItemStack activationItem) {\n",
" return this.recipe.getPentacle() != null && this.recipe.getActivationItem().test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(world, goldenBowlPosition, this.recipe.g... | [
" }\n",
"\n",
" /**\n",
" * Consumes additional ingredients from sacrificial bowls depending on the time passed.\n",
" *\n",
" * @param level the level.\n",
" * @param goldenBowlPosition the position of the golden bowl.\n",
" * @param rema... | [
" public boolean identify(Level level, BlockPos goldenBowlPosition, ItemStack activationItem) {\n",
" return this.recipe.getPentacle() != null && this.recipe.getActivationItem().test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(level, goldenBowlPosition, this.recipe.g... | false | 8c5bade247cb0b36 | [
"A1",
"A2",
"A3",
"A4"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | f73f0c325e7e67e6079990225a13a55067565808 | 1d1ed194f7f623b51a3e31cf9299fb053a160c94 | d0cc4b6af656ce014bd77b987c6a9de24c5f98dd | src/main/java/com/github/klikli_dev/occultism/crafting/recipe/RitualRecipe.java | 0 | 1 | [
"public class RitualRecipe extends ShapelessRecipe {\n",
" public static Serializer SERIALIZER = new Serializer();\n",
"\n",
" private final ResourceLocation pentacleId;\n",
" private final ResourceLocation ritualType;\n",
" private final ResourceLocation spiritJobType;\n",
" private fina... | [
" Tag<EntityType<?>> entityToSacrifice, String entityToSacrificeDisplayName, Ingredient itemToUse) {\n"
] | [
" ItemStack result, EntityType entityToSummon, Ingredient activationItem, NonNullList<Ingredient> input, int duration, int spiritMaxAge, ResourceLocation spiritJobType,\n",
" ITag<EntityType<?>> entityToSacrifice, String entityToSacrificeDisplayName, Ingredient itemTo... | [
" ITag<EntityType<?>> entityToSacrifice, String entityToSacrificeDisplayName, Ingredient itemToUse) {\n"
] | [
" super(id, group, result, input);\n",
" this.entityToSummon = entityToSummon;\n",
" this.pentacleId = pentacleId;\n",
" this.ritualType = ritualType;\n",
" this.ritual = OccultismRituals.RITUAL_FACTORY_REGISTRY.getValue(this.ritualType).create(this);\n",
" this.r... | [
" Tag<EntityType<?>> entityToSacrifice, String entityToSacrificeDisplayName, Ingredient itemToUse) {\n"
] | false | 7b39e906bc4b3761 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 9c34316d6cad5af8a2f5403c69820d9842893975 | 6102893c91e9ed4cc719dbabd779d91a4d172553 | 84e664e0096992af2b4b1769ca0b056bd71b2354 | src/main/java/com/github/klikli_dev/occultism/common/entity/ai/FellTreesGoal.java | 0 | 1 | [
" this.entity.playSound(SoundEvents.PLAYER_ATTACK_SWEEP, 1, 0.5F);\n",
" }\n",
" if (i != this.previousBreakProgress) {\n",
" this.entity.level.destroyBlockProgress(this.entity.getId(), this.targetBlock, i);\n",
" this.previousBreakProgress = i;\n",
" ... | [
" World world = this.entity.level;\n"
] | [
" Level level = this.entity.level;\n"
] | [
" this.shouldUseLumberjackDimensions = true;\n",
"\n",
" Level level = this.entity.level;\n"
] | [
"\n",
" //if work area was recently empty, wait until refresh time has elapsed\n",
" if (world.getGameTime() - this.lastWorkareaEmptyTime < WORKAREA_EMPTY_REFRESH_TIME)\n",
" return;\n",
"\n",
"\n",
" Set<BlockPos> ignoredTrees = this.entity.getJob().map(j -> (LumberjackJ... | [
" World world = this.entity.level;\n",
" this.shouldUseLumberjackDimensions = true;\n"
] | false | 62e444fca3decc1b | [
"A1",
"B1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 9c34316d6cad5af8a2f5403c69820d9842893975 | 6102893c91e9ed4cc719dbabd779d91a4d172553 | 84e664e0096992af2b4b1769ca0b056bd71b2354 | src/main/java/com/github/klikli_dev/occultism/common/entity/spirit/SpiritEntity.java | 0 | 3 | [
"import net.minecraft.network.datasync.DataSerializers;\n",
"import net.minecraft.network.datasync.EntityDataManager;\n",
"import net.minecraft.particles.ParticleTypes;\n",
"import net.minecraft.util.*;\n",
"import net.minecraft.util.math.BlockPos;\n",
"import net.minecraft.util.math.vector.Vector3d;\n",
... | [
"public abstract class SpiritEntity extends TameableEntity implements ISkinnedCreatureMixin, INamedContainerProvider {\n",
" //region Fields\n",
" public static final DataParameter<Integer> SKIN = EntityDataManager\n",
" .defineId(SpiritEntity.class, DataSerializers.INT);\n"
] | [
"public abstract class SpiritEntity extends TamableAnimal implements ISkinnedCreatureMixin, MenuProvider {\n",
" //region Fields\n",
" public static final EntityDataAccessor<Integer> SKIN = SynchedEntityData\n",
" .defineId(SpiritEntity.class, EntityDataSerializers.INT);\n"
] | [
"public abstract class SpiritEntity extends TamableAnimal implements ISkinnedCreatureMixin, MenuProvider {\n",
" public static final EntityDataAccessor<Integer> SKIN = SynchedEntityData\n",
" .defineId(SpiritEntity.class, EntityDataSerializers.INT);\n"
] | [
" /**\n",
" * The default max age in seconds.\n",
" */\n",
" public static final int DEFAULT_MAX_AGE = -1;//default age is unlimited.\n",
" public static final int MAX_FILTER_SLOTS = 7;\n",
" private static final DataParameter<Optional<BlockPos>> DEPOSIT_POSITION =\n",
" E... | [
"public abstract class SpiritEntity extends TameableEntity implements ISkinnedCreatureMixin, INamedContainerProvider {\n",
" //region Fields\n",
" public static final DataParameter<Integer> SKIN = EntityDataManager\n",
" .defineId(SpiritEntity.class, DataSerializers.INT);\n"
] | false | 59b4cfddccd9f688 | [
"A1",
"A2",
"A3",
"A4"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 9c34316d6cad5af8a2f5403c69820d9842893975 | 6102893c91e9ed4cc719dbabd779d91a4d172553 | 84e664e0096992af2b4b1769ca0b056bd71b2354 | src/main/java/com/github/klikli_dev/occultism/common/entity/spirit/SpiritEntity.java | 1 | 3 | [
" private static final DataParameter<CompoundNBT> FILTER_ITEMS = EntityDataManager\n",
" .defineId(SpiritEntity.class, DataSerializers.COMPOUND_TAG);\n",
"\n",
" /**\n",
" * The filter for tags\n",
" */\n",
" private static final DataParameter<String> TAG_FILTER = EntityDataM... | [
" //endregion Fields\n",
" //region Initialization\n",
" public SpiritEntity(EntityType<? extends SpiritEntity> type, World worldIn) {\n"
] | [
" //endregion Fields\n",
" //region Initialization\n",
" public SpiritEntity(EntityType<? extends SpiritEntity> type, Level worldIn) {\n"
] | [
" public SpiritEntity(EntityType<? extends SpiritEntity> type, Level worldIn) {\n"
] | [
" super(type, worldIn);\n",
" this.setPersistenceRequired();\n",
" }\n",
"\n"
] | [
" //endregion Fields\n",
" //region Initialization\n",
" public SpiritEntity(EntityType<? extends SpiritEntity> type, World worldIn) {\n"
] | false | 500a59b59934934a | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 9c34316d6cad5af8a2f5403c69820d9842893975 | 6102893c91e9ed4cc719dbabd779d91a4d172553 | 84e664e0096992af2b4b1769ca0b056bd71b2354 | src/main/java/com/github/klikli_dev/occultism/common/item/tool/FamiliarRingItem.java | 0 | 2 | [
" if (!playerIn.level.isClientSide && target instanceof IFamiliar) {\n",
" IFamiliar familiar = (IFamiliar) target;\n",
" if ((familiar.getFamiliarOwner() == playerIn || familiar.getFamiliarOwner() == null) && getCurio(stack).captureFamiliar(playerIn.level, familiar)) {\n",
" ... | [
" return ActionResult.consume(stack);\n"
] | [
" return InteractionResult.SUCCESS;\n"
] | [
" return InteractionResult.sidedSuccess(pContext.getPlayer().level.isClientSide);\n"
] | [
" }\n"
] | [
" return ActionResult.sidedSuccess(stack, playerIn.level.isClientSide);\n"
] | false | 053f94fe2518107a | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 9c34316d6cad5af8a2f5403c69820d9842893975 | 6102893c91e9ed4cc719dbabd779d91a4d172553 | 84e664e0096992af2b4b1769ca0b056bd71b2354 | src/main/java/com/github/klikli_dev/occultism/common/job/LumberjackJob.java | 2 | 3 | [
" @Override\n",
" public void cleanup() {\n",
" this.entity.targetSelector.removeGoal(this.replantSaplingGoal);\n",
" this.entity.targetSelector.removeGoal(this.pickupItemsGoal);\n",
" this.entity.goalSelector.removeGoal(this.fellTreesGoal);\n",
" this.entity.goalSelector... | [
" public CompoundNBT serializeNBT() {\n",
" CompoundNBT compound = super.serializeNBT();\n",
" ListNBT list = new ListNBT();\n"
] | [
" public CompoundTag serializeNBT() {\n",
" CompoundTag compound = super.serializeNBT();\n",
" ListTag list = new ListTag();\n"
] | [
" public EntityDimensions getDimensions(Pose pPose, EntityDimensions original) {\n",
" return this.fellTreesGoal.shouldUseLumberjackDimensions() ? this.lumberJackDimensions : original;\n",
" }\n",
"\n",
" @Override\n",
" public CompoundTag serializeNBT() {\n",
" CompoundTag com... | [
" for (BlockPos ignoredTree : this.ignoredTrees) {\n",
" list.add(LongNBT.valueOf(ignoredTree.asLong()));\n",
" }\n",
" compound.put(\"ignoredTrees\", list);\n",
" return compound;\n",
" }\n",
"\n",
" @Override\n",
" public void deserializeNBT(Compound... | [
" public EntitySize getDimensions(Pose pPose, EntitySize original) {\n",
" return this.fellTreesGoal.shouldUseLumberjackDimensions() ? this.lumberJackDimensions : original;\n",
" }\n",
"\n",
" @Override\n",
" public CompoundNBT serializeNBT() {\n",
" CompoundNBT compound = supe... | false | f0be79dae7090b4f | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 35fa5adaba0e214f1afb5f298def1586b496224c | 75f83a129921ba4b997d4afa9a98934453be650d | f5e59ab3b8122b92b979955febba9658d463bb59 | src/main/java/com/github/klikli_dev/occultism/Occultism.java | 0 | 1 | [
" modEventBus.addListener(this::enqueueIMC);\n",
"\n",
" MinecraftForge.EVENT_BUS.register(this);\n",
" MinecraftForge.EVENT_BUS.addListener(OccultismCapabilities::onPlayerClone);\n",
" }\n",
"\n",
"\n",
" private void commonSetup(final FMLCommonSetupEvent event) {\n",
" ... | [
" event.put(OccultismEntities.FOLIOT_TYPE.get(), FoliotEntity.createAttributes().build());\n",
" event.put(OccultismEntities.DJINNI_TYPE.get(), DjinniEntity.createAttributes().build());\n",
" event.put(OccultismEntities.AFRIT_TYPE.get(), AfritEntity.createAttributes().build());\n",
" ... | [
" event.put(OccultismEntities.FOLIOT_TYPE.get(), FoliotEntity.registerAttributes().build());\n",
" event.put(OccultismEntities.DJINNI_TYPE.get(), DjinniEntity.registerAttributes().build());\n",
" event.put(OccultismEntities.AFRIT_TYPE.get(), AfritEntity.registerAttributes().build());\n",
... | [
" event.put(OccultismEntities.FOLIOT_TYPE.get(), FoliotEntity.registerAttributes().build());\n",
" event.put(OccultismEntities.DJINNI_TYPE.get(), DjinniEntity.registerAttributes().build());\n",
" event.put(OccultismEntities.AFRIT_TYPE.get(), AfritEntity.registerAttributes().build());\n",
... | [
" }\n",
"\n",
" private void serverSetup(final FMLDedicatedServerSetupEvent event) {\n",
" LOGGER.info(\"Dedicated server setup complete.\");\n",
" }\n",
"\n",
" private void enqueueIMC(final InterModEnqueueEvent event) {\n",
" InterModComms.sendTo(CuriosApi.MODID, SlotTypeMe... | [
" event.put(OccultismEntities.FOLIOT_TYPE.get(), FoliotEntity.createAttributes().build());\n",
" event.put(OccultismEntities.DJINNI_TYPE.get(), DjinniEntity.createAttributes().build());\n",
" event.put(OccultismEntities.AFRIT_TYPE.get(), AfritEntity.createAttributes().build());\n",
" ... | false | 3c42ec9ccc52240e | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 35fa5adaba0e214f1afb5f298def1586b496224c | 75f83a129921ba4b997d4afa9a98934453be650d | f5e59ab3b8122b92b979955febba9658d463bb59 | src/main/java/com/github/klikli_dev/occultism/registry/OccultismEntities.java | 0 | 3 | [
" * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and\n",
" * associated documentation files (the \"Software\"), to deal in the Software without restriction, including\n",
" * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicen... | [
"import com.github.klikli_dev.occultism.common.entity.*;\n"
] | [
"import com.github.klikli_dev.occultism.common.entity.BatFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.BeholderFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.BlacksmithFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.ChimeraFamili... | [
"import com.github.klikli_dev.occultism.common.entity.BatFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.BeholderFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.BlacksmithFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.ChimeraFamili... | [
"import com.github.klikli_dev.occultism.common.entity.possessed.PossessedEndermanEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.possessed.PossessedEndermiteEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.possessed.PossessedGhastEntity;\n",
"import com.github.klikli_dev.occ... | [
"import com.github.klikli_dev.occultism.common.entity.*;\n"
] | false | 0e47739006000308 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 35fa5adaba0e214f1afb5f298def1586b496224c | 75f83a129921ba4b997d4afa9a98934453be650d | f5e59ab3b8122b92b979955febba9658d463bb59 | src/main/java/com/github/klikli_dev/occultism/registry/OccultismEntities.java | 1 | 3 | [
" .sized(0.7F, 1.1F)\n",
" .clientTrackingRange(8)\n",
" .build(modLoc(\"headless_familiar\").toString()));\n",
"\n",
" public static final NonNullLazy<EntityType<ChimeraFamiliarEntity>> CHIMERA_FAMILIAR_TYPE =\n",
" NonNullLazy.of(() ... | [
" NonNullLazy.of(() -> EntityType.Builder.of(BeholderFamiliarEntity::new, MobCategory.CREATURE)\n",
" .sized(0.6F, 1F)\n",
" .clientTrackingRange(8)\n",
" .build(modLoc(\"beholder_familiar\").toString()));\n",
"\n"
] | [
" NonNullLazy.of(() -> EntityType.Builder.of(BeholderFamiliarEntity::new, EntityClassification.CREATURE)\n",
" .sized(0.6F, 1F)\n",
" .clientTrackingRange(8)\n",
" .build(modLoc(\... | [
" NonNullLazy.of(() -> EntityType.Builder.of(BeholderFamiliarEntity::new, EntityClassification.CREATURE)\n",
" .sized(0.6F, 1F)\n",
" .clientTrackingRange(8)\n",
" .build(modLoc(\... | [
" public static final NonNullLazy<EntityType<ThrownSwordEntity>> THROWN_SWORD_TYPE =\n",
" NonNullLazy.of(() -> EntityType.Builder.of(ThrownSwordEntity::new, MobCategory.MISC)\n",
" .sized(0.5F, 0.5F)\n",
" .clientTrackingRange(8)\n",
" ... | [
" NonNullLazy.of(() -> EntityType.Builder.of(BeholderFamiliarEntity::new, MobCategory.CREATURE)\n",
" .sized(0.6F, 1F)\n",
" .clientTrackingRange(8)\n",
" .build(modLoc(\"beholder_familiar\").toString()));\n",
"\n",
" public static fin... | false | 766e82a01a336c36 | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 35fa5adaba0e214f1afb5f298def1586b496224c | 75f83a129921ba4b997d4afa9a98934453be650d | f5e59ab3b8122b92b979955febba9658d463bb59 | src/main/java/com/github/klikli_dev/occultism/registry/OccultismEntities.java | 2 | 3 | [
" public static final RegistryObject<EntityType<CthulhuFamiliarEntity>> CTHULHU_FAMILIAR =\n",
" ENTITIES.register(\"cthulhu_familiar\", CTHULHU_FAMILIAR_TYPE::get);\n",
" public static final RegistryObject<EntityType<DevilFamiliarEntity>> DEVIL_FAMILIAR =\n",
" ENTITIES.register(\... | [
"\n"
] | [
" \n"
] | [
" public static final RegistryObject<EntityType<FairyFamiliarEntity>> FAIRY_FAMILIAR =\n",
" ENTITIES.register(\"fairy_familiar\", FAIRY_FAMILIAR_TYPE::get);\n",
" \n"
] | [
" public static final RegistryObject<EntityType<ThrownSwordEntity>> THROWN_SWORD =\n",
" ENTITIES.register(\"thrown_sword\", THROWN_SWORD_TYPE::get);\n",
" public static final RegistryObject<EntityType<ShubNiggurathSpawnEntity>> SHUB_NIGGURATH_SPAWN =\n",
" ENTITIES.register(\"shub... | [
" public static final RegistryObject<EntityType<FairyFamiliarEntity>> FAIRY_FAMILIAR =\n",
" ENTITIES.register(\"fairy_familiar\", FAIRY_FAMILIAR_TYPE::get);\n",
"\n"
] | false | 0a6de25a80f4658b | [
"B1",
"B2",
"A1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | b223d6b24fae6b3bfed15f6e47ba8847b76a94ff | 013ddd7a378a9222b24a209d621106088ca59aa3 | 28f9efdadf96f0cc6b0051a0b0871f26da44c52e | src/main/java/com/github/klikli_dev/occultism/datagen/DataGenerators.java | 0 | 1 | [
"import net.minecraftforge.data.event.GatherDataEvent;\n",
"import net.minecraftforge.eventbus.api.SubscribeEvent;\n",
"import net.minecraftforge.fml.common.Mod;\n",
"import net.minecraftforge.registries.ForgeRegistries;\n",
"\n",
"import java.util.List;\n",
"import java.util.Map;\n",
"\n",
"@Mod.Ev... | [
" generator.addProvider(event.includeServer(), new BookGenerator(generator, Occultism.MODID));\n"
] | [
" //generator.addProvider(event.includeClient(), new ENUSProvider(generator));\n"
] | [
" generator.addProvider(event.includeClient(), new FRFRProvider(generator));\n"
] | [
"\n",
" registerFeatures(event);\n",
"\n",
" }\n",
"\n",
" public static void registerFeatures(GatherDataEvent event) {\n",
" var generator = event.getGenerator();\n",
"\n",
" var registries = RegistryAccess.builtinCopy();\n",
" var ops = RegistryOps.create(JsonOp... | [
" generator.addProvider(event.includeClient(), new FRFRProvider(generator));\n",
" generator.addProvider(event.includeServer(), new BookGenerator(generator, Occultism.MODID));\n"
] | false | e166678788829d12 | [
"B1",
"A1"
] | B then A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 2f0a4e883d3c2effe8ad735c105ecce9ee28e0a6 | a3fd4505428c7d1bdfdb555c70864d02251dadab | 58bf919ddaa3f3bb64620fdd9fb0b0d9393971d9 | src/main/java/com/github/klikli_dev/occultism/client/model/entity/CthulhuFamiliarModel.java | 0 | 2 | [
" PartDefinition rightEar = head.addOrReplaceChild(\"rightEar\", CubeListBuilder.create().texOffs(0, 21).addBox(-3.0F, 0.0F, 0.0F, 3.0F, 4.0F, 0.0F, true), PartPose.offsetAndRotation(-3.0F, -4.5F, -1.0F, 0, 0, 0));\n",
" PartDefinition hat1 = head.addOrReplaceChild(\"hat1\", CubeListBuilder.create()... | [
" this.head.yRot = netHeadYaw * (PI / 180f) * 0.7f;\n",
" this.head.xRot = headPitch * (PI / 180f) * 0.7f - 0.26f;\n",
" if (entityIn.isSitting()) {\n",
" this.rightArm.xRot = 0;\n",
" this.leftArm.xRot = 0;\n",
" this.rightLeg.xRot = -PI / 2;\n",
" ... | [
" this.head.rotateAngleY = netHeadYaw * (PI / 180f) * 0.7f;\n",
" this.head.rotateAngleX = headPitch * (PI / 180f) * 0.7f - 0.26f;\n",
" if (entityIn.isSitting()) {\n",
" this.rightArm.rotateAngleX = 0;\n",
" this.leftArm.rotateAngleX = 0;\n",
" this.r... | [
" this.head.rotateAngleY = netHeadYaw * (PI / 180f) * 0.7f;\n",
" this.head.rotateAngleX = headPitch * (PI / 180f) * 0.7f - 0.26f;\n",
"\n",
" if (entityIn.isPartying()) {\n",
" this.body.rotateAngleX = -toRads(90);\n",
" this.rightLeg.rotateAngleX = toRads(15);\... | [
" } else {\n",
" this.rightArm.xRot = Mth.cos(limbSwing * 0.5f + PI) * limbSwingAmount * 0.2f - 0.44f;\n",
" this.leftArm.xRot = Mth.cos(limbSwing * 0.5f + PI) * limbSwingAmount * 0.2f - 0.44f;\n",
" this.rightLeg.xRot = Mth.cos(limbSwing * 0.5f) * 1.4f * limbSwingAmoun... | [
" this.head.yRot = netHeadYaw * (PI / 180f) * 0.7f;\n",
" this.head.xRot = headPitch * (PI / 180f) * 0.7f - 0.26f;\n",
"\n",
" if (entityIn.isPartying()) {\n",
" this.body.xRot = -toRads(90);\n",
" this.rightLeg.xRot = toRads(15);\n",
" this.leftLeg.... | false | df47950f3a49eb20 | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 2f0a4e883d3c2effe8ad735c105ecce9ee28e0a6 | a3fd4505428c7d1bdfdb555c70864d02251dadab | 58bf919ddaa3f3bb64620fdd9fb0b0d9393971d9 | src/main/java/com/github/klikli_dev/occultism/client/model/entity/DeerFamiliarModel.java | 0 | 2 | [
" return (float) Math.toRadians(deg);\n",
" }\n",
"\n",
" @Override\n",
" public void prepareMobModel(DeerFamiliarEntity entityIn, float limbSwing, float limbSwingAmount,\n",
" float partialTick) {\n",
" this.neck.xRot = entityIn.getNeckRot(partialTi... | [
" this.tail.xRot = Mth.cos(limbSwing * 0.7f) * 0.4f * limbSwingAmount - 0.3f;\n"
] | [
" this.tail.rotateAngleX = MathHelper.cos(limbSwing * 0.7f) * 0.4f * limbSwingAmount - 0.3f;\n"
] | [
" this.tail.rotateAngleX = MathHelper.cos(limbSwing * 0.7f) * 0.4f * limbSwingAmount - 0.3f;\n",
" this.body.rotateAngleX = 0;\n"
] | [
"\n"
] | [
" this.tail.xRot = Mth.cos(limbSwing * 0.7f) * 0.4f * limbSwingAmount - 0.3f;\n",
" this.body.xRot = 0;\n"
] | false | 2937c64fc8792e46 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 2f0a4e883d3c2effe8ad735c105ecce9ee28e0a6 | a3fd4505428c7d1bdfdb555c70864d02251dadab | 58bf919ddaa3f3bb64620fdd9fb0b0d9393971d9 | src/main/java/com/github/klikli_dev/occultism/client/model/entity/DevilFamiliarModel.java | 0 | 2 | [
" PartDefinition jawHorn2 = jawHorn1.addOrReplaceChild(\"jawHorn2\", CubeListBuilder.create().texOffs(0, 29).addBox(-0.5F, -2.0F, -0.5F, 1.0F, 2.0F, 1.0F, false), PartPose.offsetAndRotation(0.0F, -2.7F, 0.0F, -0.1563815016444822F, 0.0F, 0.0F));\n",
" PartDefinition leftHornBig2 = leftHornBig1.addOrR... | [
" this.head.yRot = netHeadYaw * (PI / 180f) * 0.7f;\n",
" this.head.xRot = 0.03f + headPitch * (PI / 180f) * 0.7f;\n",
"\n",
" if (entityIn.isSitting()) {\n",
" this.leftLeg.xRot = 0;\n",
" this.rightLeg.xRot = 0;\n",
" } else {\n",
" this.l... | [
" this.head.rotateAngleY = netHeadYaw * (PI / 180f) * 0.7f;\n",
" this.head.rotateAngleX = 0.03f + headPitch * (PI / 180f) * 0.7f;\n",
" \n",
" if (entityIn.isSitting()) {\n",
" this.leftLeg.rotateAngleX = 0;\n",
" this.rightLeg.rotateAngleX = 0;\n",
" ... | [
" this.head.rotateAngleY = netHeadYaw * (PI / 180f) * 0.7f;\n",
" this.head.rotateAngleX = 0.03f + headPitch * (PI / 180f) * 0.7f;\n",
" this.egg.rotateAngleY = 0;\n",
" this.egg.rotateAngleZ = 0;\n",
" \n"
] | [
" if (ageInTicks % 300 < 60) {\n",
" float progress = ageInTicks % 300 % 60;\n",
" float armHeight = Mth.sin(progress * PI / 60) * 0.4f;\n",
" this.leftArm.xRot = 0.35f - armHeight + Mth.sin(progress * PI / 10) * 0.45f;\n",
" this.rightArm.xRot = 0.35f - ar... | [
" this.head.yRot = netHeadYaw * (PI / 180f) * 0.7f;\n",
" this.head.xRot = 0.03f + headPitch * (PI / 180f) * 0.7f;\n",
" this.egg.yRot = 0;\n",
" this.egg.zRot = 0;\n",
"\n",
"\n",
" if (entityIn.isPartying()) {\n",
" this.egg.yRot = ageInTicks / 4;\n",
... | false | 9effc57468b5bd2a | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 2f0a4e883d3c2effe8ad735c105ecce9ee28e0a6 | a3fd4505428c7d1bdfdb555c70864d02251dadab | 58bf919ddaa3f3bb64620fdd9fb0b0d9393971d9 | src/main/java/com/github/klikli_dev/occultism/client/model/entity/GreedyFamiliarModel.java | 0 | 2 | [
" PartDefinition parts = mesh.getRoot();\n",
" PartDefinition body = parts.addOrReplaceChild(\"body\", CubeListBuilder.create().texOffs(0, 10).addBox(-2.5F, -5.0F, -1.5F, 5.0F, 5.0F, 3.0F, false), PartPose.offsetAndRotation(0.0F, 19.0F, 0.6F, 0, 0, 0));\n",
" PartDefinition rightArm = body.... | [
" public void setupAnim(GreedyFamiliarEntity entityIn, float limbSwing, float limbSwingAmount,\n",
" float ageInTicks, float netHeadYaw, float headPitch) {\n",
" this.head.yRot = netHeadYaw * (PI / 180f);\n",
" this.head.xRot = headPitch * (PI / 180f);\n",
" ... | [
" public void setRotationAngles(GreedyFamiliarEntity entityIn, float limbSwing, float limbSwingAmount,\n",
" float ageInTicks, float netHeadYaw, float headPitch) {\n",
" this.head.rotateAngleY = netHeadYaw * (PI / 180f);\n",
" this.head.rotateAngleX = headPitch * (PI / 180f);\n",
... | [
" public void setRotationAngles(GreedyFamiliarEntity entityIn, float limbSwing, float limbSwingAmount,\n",
" float ageInTicks, float netHeadYaw, float headPitch) {\n",
" this.head.rotateAngleY = netHeadYaw * (PI / 180f);\n",
" this.head.rotateAngleX = headPitch * (PI / 180f);\n",
... | [
" } else {\n",
" this.rightArm.xRot = Mth.cos(limbSwing * 0.5f + PI) * limbSwingAmount;\n",
" this.leftArm.xRot = Mth.cos(limbSwing * 0.5f) * limbSwingAmount;\n",
" this.rightLeg.xRot = Mth.cos(limbSwing * 0.5f) * 1.4f * limbSwingAmount;\n",
" this.leftLeg.... | [
" public void setupAnim(GreedyFamiliarEntity entityIn, float limbSwing, float limbSwingAmount,\n",
" float ageInTicks, float netHeadYaw, float headPitch) {\n",
" this.head.yRot = netHeadYaw * (PI / 180f);\n",
" this.head.xRot = headPitch * (PI / 180f);\n",
" ... | false | bad2bb13ed0d1da2 | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 2f0a4e883d3c2effe8ad735c105ecce9ee28e0a6 | a3fd4505428c7d1bdfdb555c70864d02251dadab | 58bf919ddaa3f3bb64620fdd9fb0b0d9393971d9 | src/main/java/com/github/klikli_dev/occultism/client/render/entity/BatFamiliarRenderer.java | 0 | 1 | [
"import com.github.klikli_dev.occultism.common.entity.BatFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.registry.OccultismModelLayers;\n",
"import com.mojang.blaze3d.vertex.PoseStack;\n",
"import net.minecraft.client.renderer.MultiBufferSource;\n",
"import net.minecraft.client.renderer.entity.E... | [
" public void render(BatFamiliarEntity entityIn, float entityYaw, float partialTicks, PoseStack poseStack,\n",
" MultiBufferSource bufferIn, int packedLightIn) {\n",
" poseStack.pushPose();\n",
" if (!entityIn.isSitting())\n",
" poseStack.translate(0, entityIn.getAnima... | [
" public void render(BatFamiliarEntity entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn,\n",
" IRenderTypeBuffer bufferIn, int packedLightIn) {\n",
" matrixStackIn.push();\n",
" if (!entityIn.isSitting())\n",
" matrixStackIn.translate(0, entityI... | [
" public void render(BatFamiliarEntity entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn,\n",
" IRenderTypeBuffer bufferIn, int packedLightIn) {\n",
" matrixStackIn.push();\n",
" if (!entityIn.isSitting() || entityIn.isPartying())\n",
" matrixSta... | [
" }\n",
"\n",
" @Override\n",
" public ResourceLocation getTextureLocation(BatFamiliarEntity entity) {\n",
" return TEXTURES;\n",
" }\n",
"}\n"
] | [
" public void render(BatFamiliarEntity entityIn, float entityYaw, float partialTicks, PoseStack poseStack,\n",
" MultiBufferSource bufferIn, int packedLightIn) {\n",
" poseStack.pushPose();\n",
" if (!entityIn.isSitting() || entityIn.isPartying())\n",
" poseStack.trans... | false | 7446982bced8994e | [
"A1",
"A2",
"A3",
"B4",
"A5",
"A6",
"A7"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 6beb46552fe9ab91c75f87e82b46bb2b35cefc72 | 4c441ad0098aa7c441a035a99bd0c1c8e10640f0 | e02b93cdbebc39c70824b1200c0e65cb7357d625 | src/main/java/com/github/klikli_dev/occultism/common/entity/BlacksmithFamiliarEntity.java | 0 | 3 | [
" private IFamiliar target;\n",
" private int cooldown = MAX_COOLDOWN.get();\n",
"\n",
" public UpgradeGoal(BlacksmithFamiliarEntity blacksmith) {\n",
" this.blacksmith = blacksmith;\n",
" this.setFlags(EnumSet.of(Goal.Flag.JUMP, Goal.Flag.MOVE));\n",
" ... | [
" this.blacksmith.getNavigation().moveTo(this.target.getEntity(), 0.7);\n"
] | [
" blacksmith.getNavigation().moveTo(target.getEntity(), 0.7);\n"
] | [
" blacksmith.getNavigation().moveTo(target.getFamiliarEntity(), 0.7);\n"
] | [
" }\n",
"\n",
" public void stop() {\n",
" this.blacksmith.getNavigation().stop();\n",
" this.cooldown = MAX_COOLDOWN.get();\n",
" this.target = null;\n",
" }\n",
"\n",
" @Override\n",
" public void tick() {\n",
" if ... | [
" this.blacksmith.getNavigation().moveTo(this.target.getFamiliarEntity(), 0.7);\n"
] | false | 1d7cea9ce4c7b2bf | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 6beb46552fe9ab91c75f87e82b46bb2b35cefc72 | 4c441ad0098aa7c441a035a99bd0c1c8e10640f0 | e02b93cdbebc39c70824b1200c0e65cb7357d625 | src/main/java/com/github/klikli_dev/occultism/common/entity/BlacksmithFamiliarEntity.java | 2 | 3 | [
"\n"
] | [
" if (this.blacksmith.distanceToSqr(this.target.getEntity()) < 3) {\n",
" if (this.target.canBlacksmithUpgrade()) {\n",
" this.target.blacksmithUpgrade();\n",
" this.blacksmith.changeIronCount(-UPGRADE_COST.get());\n",
" Occu... | [
" if (blacksmith.distanceToSqr(target.getEntity()) < 3) {\n",
" if (target.canBlacksmithUpgrade()) {\n",
" target.blacksmithUpgrade();\n",
" blacksmith.changeIronCount(-UPGRADE_COST.get());\n",
" OccultismAdvancements.FAMILIA... | [
" if (blacksmith.distanceToSqr(target.getFamiliarEntity()) < 3) {\n",
" if (target.canBlacksmithUpgrade()) {\n",
" target.blacksmithUpgrade();\n",
" blacksmith.changeIronCount(-UPGRADE_COST.get());\n",
" OccultismAdvancements... | [
" FamiliarTrigger.Type.BLACKSMITH_UPGRADE);\n",
" }\n",
" this.target = null;\n",
" }\n",
" }\n",
"\n",
" private IFamiliar findTarget() {\n",
" for (LivingEntity e : this.blacksmith.level.getEntitiesOfClass(L... | [
" if (this.blacksmith.distanceToSqr(this.target.getFamiliarEntity()) < 3) {\n",
" if (this.target.canBlacksmithUpgrade()) {\n",
" this.target.blacksmithUpgrade();\n",
" this.blacksmith.changeIronCount(-UPGRADE_COST.get());\n",
" ... | false | fd62286418aaa516 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 6beb46552fe9ab91c75f87e82b46bb2b35cefc72 | 4c441ad0098aa7c441a035a99bd0c1c8e10640f0 | e02b93cdbebc39c70824b1200c0e65cb7357d625 | src/main/java/com/github/klikli_dev/occultism/common/item/tool/FamiliarRingItem.java | 2 | 3 | [
" return true;\n",
" }\n",
"\n"
] | [
" private boolean releaseFamiliar(Player player, Level level) {\n",
" if (this.getFamiliar(level) != null\n",
" && !this.getFamiliar(level).getEntity().isAddedToWorld()) {\n",
" EntityType.loadEntityRecursive(this.getFamiliar(level).getEntity().serializeNBT(... | [
" private boolean releaseFamiliar(PlayerEntity player, World world) {\n",
" if (this.getFamiliar(world) != null\n",
" && !this.getFamiliar(world).getEntity().isAddedToWorld()) {\n",
" EntityType.loadEntityRecursive(this.getFamiliar(world).getEntity().seriali... | [
" private boolean releaseFamiliar(PlayerEntity player, World world) {\n",
" if (this.getFamiliar(world) != null\n",
" && !this.getFamiliar(world).getFamiliarEntity().isAddedToWorld()) {\n",
" EntityType.loadEntityRecursive(this.getFamiliar(world).getFamiliar... | [
" e.setPos(player.getX(), player.getY(), player.getZ());\n",
" //on release overwrite owner -> familiar rings can be used to trade familiars.\n",
" ((IFamiliar) e).setFamiliarOwner(player);\n",
" level.addFreshEntity(e);\n",
" ... | [
" private boolean releaseFamiliar(Player player, Level level) {\n",
" if (this.getFamiliar(level) != null\n",
" && !this.getFamiliar(level).getFamiliarEntity().isAddedToWorld()) {\n",
" EntityType.loadEntityRecursive(this.getFamiliar(level).getFamiliarEntity... | false | aa1cb66bfd8e624a | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 6beb46552fe9ab91c75f87e82b46bb2b35cefc72 | 4c441ad0098aa7c441a035a99bd0c1c8e10640f0 | e02b93cdbebc39c70824b1200c0e65cb7357d625 | src/main/java/com/github/klikli_dev/occultism/handlers/ClientSetupEventHandler.java | 0 | 1 | [
" @SubscribeEvent\n",
" public static void onClientSetup(FMLClientSetupEvent event) {\n",
" //Register client side event handlers\n",
" MinecraftForge.EVENT_BUS.register(Occultism.SELECTED_BLOCK_RENDERER);\n",
" MinecraftForge.EVENT_BUS.register(Occultism.THIRD_EYE_EFFECT_RENDERER... | [] | [
" //Register Entity Renderers\n",
" RenderingRegistry.registerEntityRenderingHandler(OccultismEntities.FOLIOT.get(), FoliotRenderer::new);\n",
" RenderingRegistry.registerEntityRenderingHandler(OccultismEntities.DJINNI.get(), DjinniRenderer::new);\n",
" RenderingRegistry.registerEn... | [
" //Register Entity Renderers\n",
" RenderingRegistry.registerEntityRenderingHandler(OccultismEntities.FOLIOT.get(), FoliotRenderer::new);\n",
" RenderingRegistry.registerEntityRenderingHandler(OccultismEntities.DJINNI.get(), DjinniRenderer::new);\n",
" RenderingRegistry.registerEn... | [
" //Register Tile Entity Renderers\n",
" BlockEntityRenderers.register(OccultismTiles.STORAGE_CONTROLLER.get(), StorageControllerRenderer::new);\n",
" BlockEntityRenderers.register(OccultismTiles.SACRIFICIAL_BOWL.get(), SacrificialBowlRenderer::new);\n",
" BlockEntityRenderers.regi... | [] | false | 3b55d8bb98d74252 | [] | side A | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 6beb46552fe9ab91c75f87e82b46bb2b35cefc72 | 4c441ad0098aa7c441a035a99bd0c1c8e10640f0 | e02b93cdbebc39c70824b1200c0e65cb7357d625 | src/main/java/com/github/klikli_dev/occultism/handlers/LootEventHandler.java | 0 | 4 | [
"\n",
" if (!FamiliarUtil.isFamiliarEnabled(player, OccultismEntities.BLACKSMITH_FAMILIAR.get()) || !FamiliarUtil.hasFamiliar(player, OccultismEntities.BLACKSMITH_FAMILIAR.get()))\n",
" return;\n",
"\n",
" if (player.getRandom().nextDouble() < Occultism.SERVER_CONFIG.spiritJobs.blac... | [
" private static boolean isBlacksmithEnabled(Player player) {\n",
" return player.getCapability(OccultismCapabilities.FAMILIAR_SETTINGS)\n",
" .lazyMap(c -> c.isFamiliarEnabled(OccultismEntities.BLACKSMITH_FAMILIAR.get())).orElse(false);\n",
" }\n"
] | [
" private static boolean isBlacksmithEnabled(PlayerEntity player) {\n",
" return player.getCapability(OccultismCapabilities.FAMILIAR_SETTINGS)\n",
" .lazyMap(c -> c.isFamiliarEnabled(OccultismEntities.BLACKSMITH_FAMILIAR.get())).orElse(false);\n",
" }\n"
] | [] | [
"\n"
] | [] | false | 9b27259ea92eede0 | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 4fb6d9af4ed53673150f630ac6168b51aa697913 | f3b4bbcca4faec7b1e5a6f1b893c4e8069a7af81 | 3ba6814a95cfe0798a2487e519af77d22d578729 | src/main/java/com/klikli_dev/occultism/datagen/lang/RURUProvider.java | 29 | 177 | [
" - Положить ингредиенты в миски;\n"
] | [
" - Нажать [#](%1$s)ПКМ[#]() по золотой миске с помощью активационного предмета.\n"
] | [
" - Нажать [#](%1$s)ПКМ[#]() по золотой миске при помощи активационного предмета.\n",
" - *При желании: совершить жертвоприношение в центре пентакля.*\n"
] | [
" - Нажать [#](%1$s)ПКМ[#]() на золотую миску с помощью активационного предмета.\n"
] | [
" - *Необязательно: совершить жертвоприношение в центре пентакля.*\n",
" \"\"\".formatted(COLOR_PURPLE));\n",
"\n",
" helper.page(\"additional_requirements\");\n",
" this.lang(\"ru_ru\").add(helper.pageTitle(), \"Дополнительные требования\");\n",
... | [
" - Нажать [#](%1$s)ПКМ[#]() на золотую миску с помощью активационного предмета.\n"
] | false | 35b0b37da428c140 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 4fb6d9af4ed53673150f630ac6168b51aa697913 | f3b4bbcca4faec7b1e5a6f1b893c4e8069a7af81 | 3ba6814a95cfe0798a2487e519af77d22d578729 | src/main/java/com/klikli_dev/occultism/datagen/lang/RURUProvider.java | 34 | 177 | [
"\n",
" helper.entry(\"familiar_rituals\");\n",
" this.lang(\"ru_ru\").add(helper.entryName(), \"Ритуалы для фамильяров\");\n",
" }\n",
"\n",
" private void addSummoningRitualsCategory(BookContextHelper helper) {\n",
" helper.category(\"summoning_rituals\");\n",
" thi... | [
" Ритуалы вызова заставляют духов входить в этот мир в своём Избранном облике, что приводит к небольшим ограничениям на их силе. Вызванные духи классифицируются от Духов-Торговцев, которые торгуют и преобразуют предметы, до рабов-помощников для физического труда.\n"
] | [
" Ритуалы вызова вынуждают духов входить в этот мир в своём выбранном облике, что приводит к небольшим ограничениям на их силе. Вызванные духи классифицируются, начиная с Духов-Торговцев, торгующих и преобразующих предметы, заканчивая рабами-помощниками для физического труда.\n"
] | [
" Ритуалы для вызова заставляют духов входить в этот мир в своём избранном облике, что приводит к небольшим ограничениям на их силе. Вызванные духи классифицируются от духов-торговцев, которые торгуют и преобразуют предметы, до рабов-помощников для физического труда.\n"
] | [
" \"\"\");\n",
"\n",
" helper.entry(\"return_to_rituals\");\n",
" this.lang(\"ru_ru\").add(helper.entryName(), \"Вернуться к категории ритуалов\");\n",
"\n",
" helper.entry(\"summon_crusher_t1\");\n",
" //Moved to OccultismBookProvider#makeSummonCrushe... | [
" Ритуалы для вызова заставляют духов входить в этот мир в своём избранном облике, что приводит к небольшим ограничениям на их силе. Вызванные духи классифицируются от духов-торговцев, которые торгуют и преобразуют предметы, до рабов-помощников для физического труда.\n"
] | false | ee5332df25f12161 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 4fb6d9af4ed53673150f630ac6168b51aa697913 | f3b4bbcca4faec7b1e5a6f1b893c4e8069a7af81 | 3ba6814a95cfe0798a2487e519af77d22d578729 | src/main/java/com/klikli_dev/occultism/datagen/lang/RURUProvider.java | 44 | 177 | [
" this.lang(\"ru_ru\").add(helper.pageText(),\n",
" \"\"\"\n"
] | [
" Марид-Дробильщик быстрее, эффективнее и искуснее Африта-Дробильщика,\n",
" что позволяет ему дробить Осколок Эха с сохранением его свойств.\n"
] | [
" Дробильщик-Марид быстрее, эффективнее и весьма искуснее Дробильщика-Африта.\n",
" Способен дробить Осколок Эха при сохранении его свойств.\n"
] | [
" Марид-дробильщик быстрее, эффективнее и искуснее Африта-дробильщика,\n",
" что позволяет ему дробить осколок эха с сохранением его свойств.\n"
] | [
" \\\\\n",
" Он дробит **одну** руду на **шесть** аналогичных пылей.\n",
" \"\"\");\n",
"\n",
" helper.page(\"ritual\");\n",
" //no text\n",
"\n",
" helper.entry(\"summon_lumberjack\");\n",
" //Moved t... | [
" Марид-дробильщик быстрее, эффективнее и искуснее Африта-дробильщика,\n",
" что позволяет ему дробить осколок эха с сохранением его свойств.\n"
] | false | cf66efef66174533 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 4fb6d9af4ed53673150f630ac6168b51aa697913 | f3b4bbcca4faec7b1e5a6f1b893c4e8069a7af81 | 3ba6814a95cfe0798a2487e519af77d22d578729 | src/main/java/com/klikli_dev/occultism/datagen/lang/RURUProvider.java | 135 | 177 | [
" \\\\\n",
" \\\\\n"
] | [
" (**Совет:** Если Вы используете моды, защищающие питомцев от смерти, используйте Ритуал: Дикий попугай!)\n"
] | [
" **Совет:** Если используете моды, защищающие питомцев от смерти, используйте Ритуал: Дикий попугай!\n"
] | [
" (**Совет:** Если вы используете моды, защищающие питомцев от смерти, используйте ритуал: дикий попугай!)\n"
] | [
" \"\"\".formatted(COLOR_PURPLE));\n",
"\n",
" helper.entry(\"familiar_parrot\");\n",
" this.lang(\"ru_ru\").add(helper.entryName(), \"Фамильяр-попугай\");\n",
"\n",
" helper.page(\"entity\");\n",
" this.lang(\"ru_ru\").add(helper.pageText(),\n",
... | [
" (**Совет:** Если вы используете моды, защищающие питомцев от смерти, используйте ритуал: дикий попугай!)\n"
] | false | ec3e8e071bb7caae | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 4fb6d9af4ed53673150f630ac6168b51aa697913 | f3b4bbcca4faec7b1e5a6f1b893c4e8069a7af81 | 3ba6814a95cfe0798a2487e519af77d22d578729 | src/main/java/com/klikli_dev/occultism/datagen/lang/RURUProvider.java | 152 | 177 | [
" \\\\\n",
" \\\\\n"
] | [
" Их может быть **до 5 блоков** в отдалении от Пространственной матрицы (должны быть по прямой линии, в зоне видимости). См. следующую страницу на предмет возможной — очень простой установки.\n"
] | [
" Их может быть **до 5 блоков** вдали от Пространственной матрицы, и должны быть по прямой линии в зоне видимости. Ознакомьтесь со следующей страницей, касательно предполагаемой, очень простой установки.\n"
] | [
" Их может быть **до 5 блоков** в отдалении от пространственной матрицы (должны быть по прямой линии, в зоне видимости). См. следующую страницу на предмет возможной — очень простой установки.\n"
] | [
" \"\"\".formatted(COLOR_PURPLE));\n",
"\n",
" helper.page(\"demo\");\n",
" this.lang(\"ru_ru\").add(helper.pageTitle(), \"Установка стабилизатора хранилища\");\n",
" this.lang(\"ru_ru\").add(helper.pageText(),\n",
" \"\"\"\n"
] | [
" Их может быть **до 5 блоков** в отдалении от пространственной матрицы (должны быть по прямой линии, в зоне видимости). См. следующую страницу на предмет возможной — очень простой установки.\n"
] | false | c2753305f048b370 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | a08fa1afb36fef443218eaf4a90d7d54864fd197 | 8ff2bd45da5adb3ba6b458d76c0e0930d8eddb2f | 40c59bd5d3e8c987dfe92562452f4c2682f9923e | src/main/java/com/github/klikli_dev/occultism/client/render/entity/DjinniRenderer.java | 0 | 1 | [
" //region Fields\n",
" private static final ResourceLocation[] TEXTURES = {new ResourceLocation(Occultism.MODID,\n",
" \"textures/entity/djinni.png\")};\n",
" //endregion Fields\n",
"\n",
"\n",
" //region Initialization\n",
" public DjinniRenderer(EntityRendererProvider.Cont... | [
" protected void scale(DjinniEntity entity, PoseStack matrixStackIn, float partialTickTime) {\n"
] | [
" protected void preRenderCallback(DjinniEntity entity, MatrixStack matrixStackIn, float partialTickTime) {\n",
" super.preRenderCallback(entity, matrixStackIn, partialTickTime);\n"
] | [
" protected void scale(DjinniEntity entity, MatrixStack matrixStackIn, float partialTickTime) {\n"
] | [
" super.scale(entity, matrixStackIn, partialTickTime);\n",
" matrixStackIn.scale(0.6f, 0.6f, 0.6f);\n",
" }\n",
" //endregion Overrides\n",
"}\n"
] | [
" protected void scale(DjinniEntity entity, PoseStack matrixStackIn, float partialTickTime) {\n"
] | false | 3666747d7a6e7de8 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | a08fa1afb36fef443218eaf4a90d7d54864fd197 | 8ff2bd45da5adb3ba6b458d76c0e0930d8eddb2f | 40c59bd5d3e8c987dfe92562452f4c2682f9923e | src/main/java/com/github/klikli_dev/occultism/common/container/DimensionalMineshaftContainer.java | 0 | 2 | [
" public Inventory playerInventory;\n",
" //endregion Fields\n",
"\n",
" //region Initialization\n",
" public DimensionalMineshaftContainer(int id, Inventory playerInventory,\n",
" DimensionalMineshaftBlockEntity otherworldMiner) {\n",
" super(O... | [
" public boolean stillValid(Player player) {\n"
] | [
" public boolean canInteractWith(PlayerEntity player) {\n",
" return player.getDistanceSq(this.otherworldMiner.getPos().getX() + 0.5D,\n",
" this.otherworldMiner.getPos().getY() + 0.5D,\n",
" this.otherworldMiner.getPos().getZ() + 0.5D) <= 64.0D;\n"
] | [
" public boolean stillValid(PlayerEntity player) {\n"
] | [
" return player.distanceToSqr(this.otherworldMiner.getBlockPos().getX() + 0.5D,\n",
" this.otherworldMiner.getBlockPos().getY() + 0.5D,\n",
" this.otherworldMiner.getBlockPos().getZ() + 0.5D) <= 64.0D;\n",
" }\n",
"\n",
" @Override\n"
] | [
" public boolean stillValid(Player player) {\n"
] | false | 38779de6a1689d48 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | a08fa1afb36fef443218eaf4a90d7d54864fd197 | 8ff2bd45da5adb3ba6b458d76c0e0930d8eddb2f | 40c59bd5d3e8c987dfe92562452f4c2682f9923e | src/main/java/com/github/klikli_dev/occultism/common/entity/ai/FellTreesGoal.java | 7 | 9 | [
"\n"
] | [
" //find the stump of the tree\n",
" if (isLeaf(level, topOfTree)) {\n",
" BlockPos logPos = this.getStump(topOfTree);\n",
" if (isLog(level, logPos))\n",
" allBlocks.add(logPos);\n",
" }\n",
" ... | [
" //find the stump of the tree\n",
" if (isLeaf(world, topOfTree)) {\n",
" BlockPos logPos = this.getStump(topOfTree);\n",
" if (isLog(world, logPos))\n",
" allBlocks.add(logPos);\n",
" }\n",
" ... | [
" if (!potentialStumps.isEmpty()) {\n",
" potentialStumps.sort(this.targetSorter);\n",
" this.targetBlock = potentialStumps.get(0);\n"
] | [
"\n",
" //Find a nearby empty block to move to\n",
" this.moveTarget = null;\n",
" for (Direction facing : Direction.Plane.HORIZONTAL) {\n",
" BlockPos pos = this.targetBlock.relative(facing);\n",
" if (this.entity.level.isEmptyBlock(pos)) {\n... | [
" if (!potentialStumps.isEmpty()) {\n",
" potentialStumps.sort(this.targetSorter);\n",
" this.targetBlock = potentialStumps.get(0);\n"
] | false | 9ee5878fb92b8a48 | [
"B1",
"B2",
"B3"
] | side B | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | a08fa1afb36fef443218eaf4a90d7d54864fd197 | 8ff2bd45da5adb3ba6b458d76c0e0930d8eddb2f | 40c59bd5d3e8c987dfe92562452f4c2682f9923e | src/main/java/com/github/klikli_dev/occultism/datagen/BaseLootTableProvider.java | 1 | 5 | [
" private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();\n",
"\n",
" // Filled by subclasses\n",
" protected final Map<Block, LootTable.Builder> blockLootTable = new HashMap<>();\n",
" protected final Map<EntityType<?>, LootTable.Builder> entityLoo... | [
" public void run(HashCache cache) {\n"
] | [
" // Entry point\n",
" public void act(DirectoryCache cache) {\n"
] | [
" // Entry point\n",
" public void run(DirectoryCache cache) {\n"
] | [
" this.addTables();\n",
" Map<ResourceLocation, LootTable> tables = new HashMap<>();\n",
" for (Map.Entry<Block, LootTable.Builder> entry : this.blockLootTable.entrySet()) {\n",
" tables.put(entry.getKey().getLootTable(),\n"
] | [
" public void run(HashCache cache) {\n"
] | false | 6d09dba7f431557f | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | a08fa1afb36fef443218eaf4a90d7d54864fd197 | 8ff2bd45da5adb3ba6b458d76c0e0930d8eddb2f | 40c59bd5d3e8c987dfe92562452f4c2682f9923e | src/main/java/com/github/klikli_dev/occultism/registry/OccultismTags.java | 5 | 7 | [
" return ItemTags.bind(id.toString());\n",
" }\n",
"\n",
" public static Tag.Named<Block> makeBlockTag(String id) {\n",
" return makeBlockTag(new ResourceLocation(id));\n",
" }\n",
"\n"
] | [
" public static Tag.Named<Block> makeBlockTag(ResourceLocation id) {\n"
] | [
" public static ITag.INamedTag<Block> makeBlockTag(ResourceLocation id) {\n",
" return BlockTags.makeWrapperTag(id.toString());\n"
] | [
" public static ITag.INamedTag<Block> makeBlockTag(ResourceLocation id) {\n"
] | [
" return BlockTags.bind(id.toString());\n",
" }\n",
"\n",
" public static Tag<EntityType<?>> makeEntityTypeTag(String id) {\n",
" return makeEntityTypeTag(new ResourceLocation(id));\n",
" }\n",
"\n"
] | [
" public static Tag.Named<Block> makeBlockTag(ResourceLocation id) {\n"
] | false | fc726d8ac290d64d | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 93d7e448caf38cd4f7397a559456212f39958c80 | 2c1db64f152afdb5ad99bb04e5af2fb773f03838 | 7c5204f670107050edb89084ec9c6eac2326211f | src/main/java/com/github/klikli_dev/occultism/client/model/entity/BlacksmithFamiliarModel.java | 4 | 5 | [
" this.body.yRot = this.toRad(180);\n",
" this.leftLeg.xRot = this.toRad(-70);\n",
" this.rightLeg.xRot = this.toRad(-70);\n",
" this.body.y = 23f;\n",
" this.body.z = 4;\n",
" this.body.xRot = this.toRad(-20);\n",
" this.head.... | [
" float partialTick) {\n"
] | [
" float partialTick) {\n",
" showModels(entityIn);\n"
] | [
" float partialTick) {\n"
] | [
" this.showModels(entityIn);\n",
" }\n",
"\n",
" private void showModels(BlacksmithFamiliarEntity entityIn) {\n",
" boolean hasSquarehair = entityIn.hasSquareHair();\n",
" boolean hasMarioMoustache = entityIn.hasMarioMoustache();\n",
"\n",
" this.earring.visible = ent... | [
" float partialTick) {\n"
] | false | cb9af86f34910343 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": true
} | MIT |
klikli-dev/occultism | 93d7e448caf38cd4f7397a559456212f39958c80 | 2c1db64f152afdb5ad99bb04e5af2fb773f03838 | 7c5204f670107050edb89084ec9c6eac2326211f | src/main/java/com/github/klikli_dev/occultism/client/model/entity/GuardianFamiliarModel.java | 3 | 5 | [
" this.head.yRot = pAgeInTicks / 10;\n",
" } else if (!pEntity.isSitting()) {\n",
" this.rightArm1.xRot = Mth.cos(limbSwing * 0.5f + PI) * limbSwingAmount * 0.5f;\n",
" this.leftArm1.xRot = Mth.cos(limbSwing * 0.5f) * limbSwingAmount * 0.5f;\n",
" }\n",
"\n",... | [
" this.birdLeftWing.zRot = this.toRads(20) + Mth.sin(wingProgress / 20 * this.toRads(360) * 2) * this.toRads(25);\n",
" this.birdRightWing.zRot = this.toRads(-20)\n",
" - Mth.sin(wingProgress / 20 * this.toRads(360) * 2) * this.toRads(25);\n"
] | [
" this.birdLeftWing.zRot = toRads(20) + MathHelper.sin(wingProgress / 20 * toRads(360) * 2) * toRads(25);\n",
" this.birdRightWing.zRot = toRads(-20)\n",
" - MathHelper.sin(wingProgress / 20 * toRads(360) * 2) * toRads(25);\n"
] | [
" this.birdLeftWing.zRot = this.toRads(20) + MathHelper.sin(wingProgress / 20 * this.toRads(360) * 2) * this.toRads(25);\n",
" this.birdRightWing.zRot = this.toRads(-20)\n",
" - MathHelper.sin(wingProgress / 20 * this.toRads(360) * 2) * this.toRads(25);\n"
] | [
" }\n",
" this.birdBody.y = -2.9f;\n",
" } else {\n",
" this.birdLeftLeg.y = -0.31f;\n",
" this.birdRightLeg.y = -0.31f;\n"
] | [
" this.birdLeftWing.zRot = this.toRads(20) + Mth.sin(wingProgress / 20 * this.toRads(360) * 2) * this.toRads(25);\n",
" this.birdRightWing.zRot = this.toRads(-20)\n",
" - Mth.sin(wingProgress / 20 * this.toRads(360) * 2) * this.toRads(25);\n"
] | false | 0a448c2d48869217 | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 93d7e448caf38cd4f7397a559456212f39958c80 | 2c1db64f152afdb5ad99bb04e5af2fb773f03838 | 7c5204f670107050edb89084ec9c6eac2326211f | src/main/java/com/github/klikli_dev/occultism/client/model/entity/GuardianFamiliarModel.java | 4 | 5 | [
" }\n",
" this.birdBody.y = -2.9f;\n",
" } else {\n",
" this.birdLeftLeg.y = -0.31f;\n",
" this.birdRightLeg.y = -0.31f;\n"
] | [
" this.birdLeftWing.zRot = this.toRads(20) + Mth.sin(pAgeInTicks / 2) * this.toRads(25);\n",
" this.birdRightWing.zRot = this.toRads(-20) - Mth.sin(pAgeInTicks / 2) * this.toRads(25);\n",
" this.birdBody.y = -2.9f - Mth.sin(pAgeInTicks / 2) * 0.4f;\n"
] | [
" this.birdLeftWing.zRot = toRads(20) + MathHelper.sin(pAgeInTicks / 2) * toRads(25);\n",
" this.birdRightWing.zRot = toRads(-20) - MathHelper.sin(pAgeInTicks / 2) * toRads(25);\n",
" this.birdBody.y = -2.9f - MathHelper.sin(pAgeInTicks / 2) * 0.4f;\n"
] | [
" this.birdLeftWing.zRot = this.toRads(20) + MathHelper.sin(pAgeInTicks / 2) * this.toRads(25);\n",
" this.birdRightWing.zRot = this.toRads(-20) - MathHelper.sin(pAgeInTicks / 2) * this.toRads(25);\n",
" this.birdBody.y = -2.9f - MathHelper.sin(pAgeInTicks / 2) * 0.4f;\n"
] | [
" this.birdBody.zRot = lives <= GuardianFamiliarEntity.ONE_LEGGED ? -0 : 0;\n",
" }\n",
" }\n",
"\n",
" private void showModels(GuardianFamiliarEntity entity) {\n",
" boolean hasTree = entity.hasTree();\n",
" byte lives = entity.getLives();\n",
"\n",
" th... | [
" this.birdLeftWing.zRot = this.toRads(20) + Mth.sin(pAgeInTicks / 2) * this.toRads(25);\n",
" this.birdRightWing.zRot = this.toRads(-20) - Mth.sin(pAgeInTicks / 2) * this.toRads(25);\n",
" this.birdBody.y = -2.9f - Mth.sin(pAgeInTicks / 2) * 0.4f;\n"
] | false | 85eda9379ed41109 | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 93d7e448caf38cd4f7397a559456212f39958c80 | 2c1db64f152afdb5ad99bb04e5af2fb773f03838 | 7c5204f670107050edb89084ec9c6eac2326211f | src/main/java/com/github/klikli_dev/occultism/common/entity/BlacksmithFamiliarEntity.java | 1 | 2 | [
" public void tick() {\n",
" if (this.target == null)\n",
" return;\n",
"\n",
" if (!this.blacksmith.isPathFinding())\n",
" this.blacksmith.getNavigation().moveTo(this.target.getFamiliarEntity(), 0.7);\n",
"\n",
" if (this.blacksmit... | [
" this.blacksmith.getBoundingBox().inflate(4), this::familiarPred)) {\n"
] | [
" for (LivingEntity e : blacksmith.level.getEntitiesOfClass(LivingEntity.class,\n",
" blacksmith.getBoundingBox().inflate(4), e -> familiarPred(e))) {\n"
] | [
" this.blacksmith.getBoundingBox().inflate(4), e -> this.familiarPred(e))) {\n"
] | [
" return (IFamiliar) e;\n",
" }\n",
" return null;\n",
" }\n",
"\n",
" private boolean familiarPred(Entity e) {\n",
" if (!(e instanceof IFamiliar))\n",
" return false;\n",
" IFamiliar familiar = (IFamiliar) e;\n... | [
" this.blacksmith.getBoundingBox().inflate(4), this::familiarPred)) {\n"
] | false | 7d801a1abca2dd9e | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 93d7e448caf38cd4f7397a559456212f39958c80 | 2c1db64f152afdb5ad99bb04e5af2fb773f03838 | 7c5204f670107050edb89084ec9c6eac2326211f | src/main/java/com/github/klikli_dev/occultism/registry/OccultismEntities.java | 0 | 3 | [
" * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and\n",
" * associated documentation files (the \"Software\"), to deal in the Software without restriction, including\n",
" * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicen... | [
"import com.github.klikli_dev.occultism.common.entity.*;\n"
] | [
"import com.github.klikli_dev.occultism.common.entity.BatFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.BlacksmithFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.CthulhuFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.DeerFamiliarEn... | [
"import com.github.klikli_dev.occultism.common.entity.BatFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.BlacksmithFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.CthulhuFamiliarEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.DeerFamiliarEn... | [
"import com.github.klikli_dev.occultism.common.entity.possessed.PossessedEndermanEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.possessed.PossessedEndermiteEntity;\n",
"import com.github.klikli_dev.occultism.common.entity.possessed.PossessedSkeletonEntity;\n",
"import com.github.klikli_dev.... | [
"import com.github.klikli_dev.occultism.common.entity.*;\n"
] | false | 2d77ef0326a80154 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 5145429921bdfdb71c3d94c91715469c90e73503 | 54f110051f9207d9b2194207e5cd7dab2cdd066a | 6817bc60c224f6a29db77265bc01ada27da975d4 | src/main/java/com/github/klikli_dev/occultism/common/ritual/FamiliarOtherworldBirdRitual.java | 0 | 1 | [
"import com.github.klikli_dev.occultism.registry.OccultismEntities;\n",
"import com.github.klikli_dev.occultism.registry.OccultismItems;\n",
"import com.github.klikli_dev.occultism.registry.OccultismRituals;\n",
"import com.github.klikli_dev.occultism.registry.OccultismTags;\n",
"import com.github.klikli_de... | [
" OccultismRituals.SUMMON_DJINNI_PENTACLE.get(),\n",
" Ingredient.of(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()),\n"
] | [
" OccultismRituals.SUMMON_DJINNI_PENTACLE.get(),\n",
" Ingredient.fromItems(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()),\n"
] | [
" OccultismRituals.POSSESS_DJINNI_PENTACLE.get(),\n",
" Ingredient.fromItems(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()),\n"
] | [
" \"familiar_otherworld_bird\", 30);\n",
" this.sacrificePredicate =\n",
" (entity) -> OccultismTags.PARROTS.contains(entity.getType());\n",
" }\n",
" //endregion Initialization\n",
"\n",
" //region Overrides\n",
"\n",
" @Override\n",
" public vo... | [
" OccultismRituals.POSSESS_DJINNI_PENTACLE.get(),\n",
" Ingredient.of(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()),\n"
] | false | 74a891f0fb3659fe | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 5145429921bdfdb71c3d94c91715469c90e73503 | 54f110051f9207d9b2194207e5cd7dab2cdd066a | 6817bc60c224f6a29db77265bc01ada27da975d4 | src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonWildOtherworldBirdRitual.java | 0 | 1 | [
"import com.github.klikli_dev.occultism.registry.OccultismEntities;\n",
"import com.github.klikli_dev.occultism.registry.OccultismItems;\n",
"import com.github.klikli_dev.occultism.registry.OccultismRituals;\n",
"import com.github.klikli_dev.occultism.registry.OccultismTags;\n",
"import com.github.klikli_de... | [
" OccultismRituals.SUMMON_DJINNI_PENTACLE.get(),\n",
" Ingredient.of(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()),\n"
] | [
" OccultismRituals.SUMMON_DJINNI_PENTACLE.get(),\n",
" Ingredient.fromItems(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()),\n"
] | [
" OccultismRituals.POSSESS_DJINNI_PENTACLE.get(),\n",
" Ingredient.fromItems(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()),\n"
] | [
" \"summon_wild_otherworld_bird\", 30);\n",
" this.sacrificePredicate =\n",
" (entity) -> OccultismTags.PARROTS.contains(entity.getType());\n",
" }\n",
" //endregion Initialization\n",
"\n",
" //region Overrides\n",
"\n",
" @Override\n",
" public... | [
" OccultismRituals.POSSESS_DJINNI_PENTACLE.get(),\n",
" Ingredient.of(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()),\n"
] | false | 3f4b266962967526 | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | b0f640ca563fbca9a49e9663df0dfd7cc3f5b1c8 | 1912a8872dcb6b76dafb3572e6988c3cd9783b94 | f9828b239c01ab2ca638fc54371ad5f5e6e87119 | src/main/java/com/github/klikli_dev/occultism/common/job/NightTimeJob.java | 0 | 2 | [
" * associated documentation files (the \"Software\"), to deal in the Software without restriction, including\n",
" * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n",
" * of the Software, and to permit persons to whom the Software is furnished to... | [
"import net.minecraft.Util;\n",
"import net.minecraft.network.chat.TranslatableComponent;\n",
"import net.minecraft.server.level.ServerLevel;\n"
] | [
"import net.minecraft.util.Util;\n",
"import net.minecraft.util.text.TranslationTextComponent;\n",
"import net.minecraft.world.server.ServerWorld;\n"
] | [
"import net.minecraft.util.Util;\n",
"import net.minecraft.util.text.TranslationTextComponent;\n",
"import net.minecraft.world.storage.IServerWorldInfo;\n"
] | [
"\n",
"public class NightTimeJob extends ChangeTimeJob {\n",
"\n",
" //region Initialization\n",
" public NightTimeJob(SpiritEntity entity, int ticksToClear) {\n",
" super(entity, ticksToClear);\n",
" }\n",
" //endregion Initialization\n",
"\n",
" //region Overrides\n",
" ... | [
"import net.minecraft.Util;\n",
"import net.minecraft.network.chat.TranslatableComponent;\n",
"import net.minecraft.server.level.ServerLevel;\n",
"import net.minecraft.world.level.storage.ServerLevelData;\n"
] | false | e63a532cb51584a5 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | b0f640ca563fbca9a49e9663df0dfd7cc3f5b1c8 | 1912a8872dcb6b76dafb3572e6988c3cd9783b94 | f9828b239c01ab2ca638fc54371ad5f5e6e87119 | src/main/java/com/github/klikli_dev/occultism/common/job/NightTimeJob.java | 1 | 2 | [
"\n",
"public class NightTimeJob extends ChangeTimeJob {\n",
"\n",
" //region Initialization\n",
" public NightTimeJob(SpiritEntity entity, int ticksToClear) {\n",
" super(entity, ticksToClear);\n",
" }\n",
" //endregion Initialization\n",
"\n",
" //region Overrides\n",
" ... | [
" if (Occultism.SERVER_CONFIG.rituals.enableClearWeatherRitual.get()) {\n",
" ServerLevel level = (ServerLevel) this.entity.level.getLevelData();\n",
" level.setDayTime(13000);\n"
] | [
" if (Occultism.SERVER_CONFIG.rituals.enableNightTimeRitual.get()) {\n",
" ServerWorld world = (ServerWorld) this.entity.level.getLevelData();\n",
" world.setDayTime(13000);\n"
] | [
" if (Occultism.SERVER_CONFIG.rituals.enableNightTimeRitual.get()) {\n",
" IServerWorldInfo world = (IServerWorldInfo) this.entity.level.getLevelData();\n",
" world.setDayTime(13000);\n"
] | [
" } else {\n",
" this.entity.getOwner().sendMessage(new TranslatableComponent(\"ritual.occultism.disabled\"), Util.NIL_UUID);\n",
" }\n",
" }\n",
" //endregion Overrides\n",
"\n",
"}\n"
] | [
" if (Occultism.SERVER_CONFIG.rituals.enableClearWeatherRitual.get()) {\n",
" ServerLevelData level = (ServerLevelData) this.entity.level.getLevelData();\n",
" level.setDayTime(13000);\n"
] | false | b250380afa339655 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 0bce1c0af1cc27ca9d72d575fab01845de6001c3 | 758e764d78fe8c96afff3d747a4d1d19001f57d6 | 683e07be7a995cf8974577b82055a88546b43977 | src/main/java/com/github/klikli_dev/occultism/common/block/GoldenSacrificialBowlBlock.java | 0 | 2 | [
" @Override\n",
" public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player,\n",
" InteractionHand hand, BlockHitResult hit) {\n",
" BlockEntity blockEntity = level.getBlockEntity(pos);\n",
" if (blockEntity instanceof GoldenS... | [
" for (BlockPos positionToCheck : BlockPos.betweenClosed(pos.offset(-range, -range, -range),\n",
" pos.offset(range, range, range))) {\n",
" BlockEntity blockEntity = player.level.getBlockEntity(positionToCheck);\n",
" if (blockEntity instanceof Gold... | [
" for (BlockPos positionToCheck : BlockPos.getAllInBoxMutable(pos.add(-range, -range, -range),\n",
" pos.add(range, range, range))) {\n",
" TileEntity tileEntity = player.world.getTileEntity(positionToCheck);\n",
" if (tileEntity instanceof GoldenSac... | [
" for (BlockPos positionToCheck : BlockPos.getAllInBoxMutable(pos.add(-range, -range, -range),\n",
" pos.add(range, range, range))) {\n",
" TileEntity tileEntity = player.world.getTileEntity(positionToCheck);\n",
" if (tileEntity instanceof GoldenSac... | [
" bowl.notifyItemUse(event);\n",
" }\n",
" }\n",
" }\n",
" }\n",
" }\n",
"\n",
" @SubscribeEvent\n",
" public void livingDeath(LivingDeathEvent event) {\n",
" LivingEntity entityLivingBase = event.getEntityL... | [
" for (BlockPos positionToCheck : BlockPos.betweenClosed(pos.offset(-range, -range, -range),\n",
" pos.offset(range, range, range))) {\n",
" BlockEntity blockEntity = player.level.getBlockEntity(positionToCheck);\n",
" if (blockEntity instanceof Gold... | false | 2a497e6a449c22c4 | [
"A1",
"A2",
"A3",
"A4",
"B6"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 0bce1c0af1cc27ca9d72d575fab01845de6001c3 | 758e764d78fe8c96afff3d747a4d1d19001f57d6 | 683e07be7a995cf8974577b82055a88546b43977 | src/main/java/com/github/klikli_dev/occultism/common/job/RainWeatherJob.java | 0 | 2 | [
" * associated documentation files (the \"Software\"), to deal in the Software without restriction, including\n",
" * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n",
" * of the Software, and to permit persons to whom the Software is furnished to... | [
"import net.minecraft.server.level.ServerLevel;\n"
] | [
"import net.minecraft.world.storage.ServerWorldInfo;\n"
] | [
"import net.minecraft.util.Util;\n",
"import net.minecraft.util.text.TranslationTextComponent;\n",
"import net.minecraft.world.storage.ServerWorldInfo;\n"
] | [
"\n",
"public class RainWeatherJob extends ChangeWeatherJob {\n",
"\n",
" //region Initialization\n",
" public RainWeatherJob(SpiritEntity entity, int ticksToClear) {\n",
" super(entity, ticksToClear);\n",
" }\n",
" //endregion Initialization\n",
"\n",
" //region Overrides\n"... | [
"import net.minecraft.Util;\n",
"import net.minecraft.network.chat.TranslatableComponent;\n",
"import net.minecraft.server.level.ServerLevel;\n"
] | false | 998b86b9fdb62c24 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 0bce1c0af1cc27ca9d72d575fab01845de6001c3 | 758e764d78fe8c96afff3d747a4d1d19001f57d6 | 683e07be7a995cf8974577b82055a88546b43977 | src/main/java/com/github/klikli_dev/occultism/common/ritual/Ritual.java | 4 | 15 | [
" * @param goldenBowlPosition the position of the golden bowl.\n",
" * @param BlockEntity the tile entity controlling the ritual.\n",
" * @param castingPlayer the player starting the ritual.\n",
" * @param activationItem the item used to start the ritual.\n",
" * @param t... | [
" public boolean identify(Level level, BlockPos goldenBowlPosition, ItemStack activationItem) {\n",
" return this.startingItem.test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(level, goldenBowlPosition,\n",
" this.getAdditionalIngredients(lev... | [
" public boolean identify(World world, BlockPos goldenBowlPosition, ItemStack activationItem) {\n",
" return this.startingItem.test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(world, goldenBowlPosition,\n",
" this.getAdditionalIngredients(world... | [
" public boolean identify(World world, BlockPos goldenBowlPosition, ItemStack activationItem) {\n",
" return this.recipe.getActivationItem().test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(world, goldenBowlPosition, this.recipe.getIngredients()) &&\n",
" ... | [
" }\n",
"\n",
" /**\n",
" * Consumes additional ingredients from sacrificial bowls depending on the time passed.\n",
" *\n",
" * @param level the level.\n",
" * @param goldenBowlPosition the position of the golden bowl.\n",
" * @param rema... | [
" public boolean identify(Level level, BlockPos goldenBowlPosition, ItemStack activationItem) {\n",
" return this.recipe.getActivationItem().test(activationItem) &&\n",
" this.areAdditionalIngredientsFulfilled(level, goldenBowlPosition, this.recipe.getIngredients()) &&\n",
" ... | false | 6ada87c65b03d4d5 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 0bce1c0af1cc27ca9d72d575fab01845de6001c3 | 758e764d78fe8c96afff3d747a4d1d19001f57d6 | 683e07be7a995cf8974577b82055a88546b43977 | src/main/java/com/github/klikli_dev/occultism/common/ritual/Ritual.java | 8 | 15 | [
" * - initializing it\n",
" * - setting the taming player\n",
" * - preparing position and rotation\n",
" * - setting the custom name.\n",
" *\n"
] | [
" * @param spirit the spirit to prepare.\n",
" * @param level the level to spawn in.\n"
] | [
" * @param spirit the spirit to prepare.\n",
" * @param world the world to spawn in.\n"
] | [
" * @param livingEntity the living entity to prepare.\n",
" * @param world the world to spawn in.\n"
] | [
" * @param goldenBowlPosition the golden bowl position.\n",
" * @param castingPlayer the ritual casting player.\n",
" * @param spiritName the spirit name.\n",
" */\n"
] | [
" * @param livingEntity the living entity to prepare.\n",
" * @param level the level to spawn in.\n"
] | false | 043d2f6f5fe6526c | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | 0bce1c0af1cc27ca9d72d575fab01845de6001c3 | 758e764d78fe8c96afff3d747a4d1d19001f57d6 | 683e07be7a995cf8974577b82055a88546b43977 | src/main/java/com/github/klikli_dev/occultism/common/ritual/Ritual.java | 12 | 15 | [
" * @param goldenBowlPosition the golden bowl position.\n",
" * @param castingPlayer the ritual casting player.\n",
" * @param spiritName the spirit name.\n",
" * @param setTamed true to tame the spirit\n",
" */\n"
] | [
" public void prepareSpiritForSpawn(SpiritEntity spirit, Level level, BlockPos goldenBowlPosition,\n",
" Player castingPlayer, String spiritName, boolean setTamed) {\n",
" if (setTamed) {\n",
" spirit.tame(castingPlayer);\n"
] | [
" public void prepareSpiritForSpawn(SpiritEntity spirit, World world, BlockPos goldenBowlPosition,\n",
" PlayerEntity castingPlayer, String spiritName, boolean setTamed) {\n",
" if(setTamed){\n",
" spirit.setTamedBy(castingPlayer);\n"
] | [
" public void prepareLivingEntityForSpawn(LivingEntity livingEntity, World world, BlockPos goldenBowlPosition, GoldenSacrificialBowlTileEntity tileEntity,\n",
" PlayerEntity castingPlayer, String spiritName, boolean setTamed) {\n",
" if (setTamed && livingEnt... | [
" }\n"
] | [
" public void prepareLivingEntityForSpawn(LivingEntity livingEntity, Level level, BlockPos goldenBowlPosition, GoldenSacrificialBowlBlockEntity blockEntity,\n",
" Player castingPlayer, String spiritName, boolean setTamed) {\n",
" if (setTamed && livingEntity ... | false | 411e1c1c21b5e092 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | c97b471453a8dace712d5e180a61f79009597623 | 8d71fe61544005405e29db696bd3039a3b2a7814 | 8bb69c75bfc48bddce61a7c8c736b44b415c8e72 | src/main/java/com/github/klikli_dev/occultism/common/entity/spirit/AfritWildEntity.java | 0 | 1 | [
"import net.minecraft.world.level.Level;\n",
"import net.minecraft.world.level.ServerLevelAccessor;\n",
"\n",
"import javax.annotation.Nullable;\n",
"\n",
"public class AfritWildEntity extends AfritEntity {\n",
"\n",
" //region Initialization\n",
" public AfritWildEntity(EntityType<? extends S... | [
" Blaze entity = EntityType.BLAZE.create(level.getLevel());\n",
" entity.finalizeSpawn(level, difficultyIn, reason, spawnDataIn, dataTag);\n",
" double offsetX = (level.getRandom().nextGaussian() - 1.0) * (1 + level.getRandom().nextInt(4));\n",
" double offsetZ = (l... | [
" BlazeEntity entity = EntityType.BLAZE.create(this.world);\n",
" entity.onInitialSpawn(world, difficultyIn, reason, spawnDataIn, dataTag);\n",
" double offsetX = (world.getRandom().nextGaussian() - 1.0) * (1 + world.getRandom().nextInt(4));\n",
" double offsetZ = (... | [
" BlazeEntity entity = EntityType.BLAZE.create(this.world);\n",
" entity.onInitialSpawn(world, difficultyIn, reason, spawnDataIn, dataTag);\n",
" double offsetX = world.getRandom().nextGaussian() * (1 + world.getRandom().nextInt(4));\n",
" double offsetZ = world.get... | [
" }\n",
"\n",
" return super.finalizeSpawn(level, difficultyIn, reason, spawnDataIn, dataTag);\n",
" }\n",
"\n",
" @Override\n",
" protected void registerGoals() {\n",
" //Override all base goals\n",
" this.goalSelector.addGoal(1, new FloatGoal(this));\n",
" ... | [
" Blaze entity = EntityType.BLAZE.create(level.getLevel());\n",
" entity.finalizeSpawn(level, difficultyIn, reason, spawnDataIn, dataTag);\n",
" double offsetX = level.getRandom().nextGaussian() * (1 + level.getRandom().nextInt(4));\n",
" double offsetZ = level.getR... | false | d61fa55bc8da96d1 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | c97b471453a8dace712d5e180a61f79009597623 | 8d71fe61544005405e29db696bd3039a3b2a7814 | 8bb69c75bfc48bddce61a7c8c736b44b415c8e72 | src/main/java/com/github/klikli_dev/occultism/common/entity/spirit/WildHuntWitherSkeletonEntity.java | 0 | 1 | [
"\n",
"public class WildHuntWitherSkeletonEntity extends WitherSkeleton {\n",
" //region Fields\n",
" List<WildHuntSkeletonEntity> minions = new ArrayList<>();\n",
" //endregion Fields\n",
"\n",
" //region Initialization\n",
" public WildHuntWitherSkeletonEntity(EntityType<? extends Wil... | [
" WildHuntSkeletonEntity entity = OccultismEntities.WILD_HUNT_SKELETON.get().create(this.level);\n",
" entity.finalizeSpawn(level, difficultyIn, reason, spawnDataIn, dataTag);\n",
" double offsetX = (level.getRandom().nextGaussian() - 1.0) * (1 + level.getRandom().nextInt(4));\n... | [
" WildHuntSkeletonEntity entity = OccultismEntities.WILD_HUNT_SKELETON.get().create(this.world);\n",
" entity.onInitialSpawn(world, difficultyIn, reason, spawnDataIn, dataTag);\n",
" double offsetX = (world.getRandom().nextGaussian() - 1.0) * (1 + world.getRandom().nextInt(4));\... | [
" WildHuntSkeletonEntity entity = OccultismEntities.WILD_HUNT_SKELETON.get().create(this.world);\n",
" entity.onInitialSpawn(world, difficultyIn, reason, spawnDataIn, dataTag);\n",
" double offsetX = world.getRandom().nextGaussian() * (1 + world.getRandom().nextInt(4));\n",
" ... | [
" entity.setMaster(this);\n",
" this.minions.add(entity);\n",
" }\n",
"\n",
" return super.finalizeSpawn(level, difficultyIn, reason, spawnDataIn, dataTag);\n",
" }\n",
"\n",
" @Override\n",
" protected boolean shouldDespawnInPeaceful() {\n",
" r... | [
" WildHuntSkeletonEntity entity = OccultismEntities.WILD_HUNT_SKELETON.get().create(this.level);\n",
" entity.finalizeSpawn(level, difficultyIn, reason, spawnDataIn, dataTag);\n",
" double offsetX = level.getRandom().nextGaussian() * (1 + level.getRandom().nextInt(4));\n",
" ... | false | 0449f7338d71803a | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | c97b471453a8dace712d5e180a61f79009597623 | 8d71fe61544005405e29db696bd3039a3b2a7814 | 8bb69c75bfc48bddce61a7c8c736b44b415c8e72 | src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonWildHuntRitual.java | 0 | 1 | [
" super(recipe, false);\n",
" }\n",
"\n",
" @Override\n",
" public void finish(Level level, BlockPos goldenBowlPosition, GoldenSacrificialBowlBlockEntity blockEntity,\n",
" Player castingPlayer, ItemStack activationItem) {\n",
" super.finish(level, goldenBowl... | [
" if (entity instanceof LivingEntity living) {\n",
" double offsetX = (level.getRandom().nextGaussian()) * (1 + level.getRandom().nextInt(4));\n",
" double offsetZ = (level.getRandom().nextGaussian()) * (1 + level.getRandom().nextInt(4));\n"
] | [
" if (entity instanceof LivingEntity) {\n",
" LivingEntity living = (LivingEntity) entity;\n",
" double offsetX = (world.getRandom().nextGaussian()) * (1 + world.getRandom().nextInt(4));\n",
" double offsetZ = (world.getRandom().nextGauss... | [
" if (entity instanceof LivingEntity) {\n",
" LivingEntity living = (LivingEntity) entity;\n",
" double offsetX = world.getRandom().nextGaussian() * (1 + world.getRandom().nextInt(4));\n",
" double offsetZ = world.getRandom().nextGaussian... | [
"\n",
" living.absMoveTo(goldenBowlPosition.getX() + offsetX, goldenBowlPosition.getY() + 1.5,\n",
" goldenBowlPosition.getZ() + offsetZ,\n",
" level.getRandom().nextInt(360), 0);\n",
" living.setCustomName(new TextC... | [
" if (entity instanceof LivingEntity living) {\n",
" double offsetX = level.getRandom().nextGaussian() * (1 + level.getRandom().nextInt(4));\n",
" double offsetZ = level.getRandom().nextGaussian() * (1 + level.getRandom().nextInt(4));\n"
] | false | 998b10089f0fddac | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | ac13c9d08ab53edbdbc1b293387c788cb8df80e5 | 4dceed95e167dcefa7aae89f7c580476ae9cfa22 | 605b9f7f3875e7f69cb80cb931c14055312c433e | src/main/java/com/github/klikli_dev/occultism/client/render/entity/BatFamiliarRenderer.java | 0 | 1 | [
"import net.minecraft.client.renderer.MultiBufferSource;\n",
"import net.minecraft.client.renderer.entity.EntityRendererProvider;\n",
"import net.minecraft.client.renderer.entity.MobRenderer;\n",
"import net.minecraft.resources.ResourceLocation;\n",
"\n",
"public class BatFamiliarRenderer extends MobRende... | [
" poseStack.translate(0, entityIn.getAnimationHeight(partialTicks) * 0.1, 0);\n",
" super.render(entityIn, entityYaw, partialTicks, poseStack, bufferIn, packedLightIn);\n",
" poseStack.popPose();\n"
] | [
" matrixStackIn.translate(0, entityIn.getAnimationHeight(partialTicks) * 0.1, 0);\n",
" super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn);\n",
" matrixStackIn.popPose();\n"
] | [
" matrixStackIn.translate(0, entityIn.getAnimationHeight(partialTicks) * 0.1f + 0.1f, 0);\n",
" super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn);\n",
" matrixStackIn.popPose();\n"
] | [
" }\n",
"\n",
" @Override\n",
" public ResourceLocation getTextureLocation(BatFamiliarEntity entity) {\n",
" return TEXTURES;\n",
" }\n",
"}\n"
] | [
" poseStack.translate(0, entityIn.getAnimationHeight(partialTicks) * 0.1 + 0.1f, 0);\n",
" super.render(entityIn, entityYaw, partialTicks, poseStack, bufferIn, packedLightIn);\n",
" poseStack.popPose();\n"
] | false | b39d28c899c07161 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | ac13c9d08ab53edbdbc1b293387c788cb8df80e5 | 4dceed95e167dcefa7aae89f7c580476ae9cfa22 | 605b9f7f3875e7f69cb80cb931c14055312c433e | src/main/java/com/github/klikli_dev/occultism/common/entity/BatFamiliarEntity.java | 1 | 4 | [
"import com.github.klikli_dev.occultism.common.advancement.FamiliarTrigger;\n",
"import com.github.klikli_dev.occultism.registry.OccultismAdvancements;\n"
] | [
"import com.google.common.collect.ImmutableList;\n",
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.util.Mth;\n",
"import net.minecraft.world.damagesource.DamageSource;\n",
"import net.minecraft.world.effect.MobEffectInstance;\n",
"import net.minecraft.world.effect.MobEffects;\n",
"impor... | [
"import com.google.common.collect.ImmutableList;\n"
] | [
"import com.github.klikli_dev.occultism.registry.OccultismEffects;\n"
] | [
"\n"
] | [
"import com.github.klikli_dev.occultism.registry.OccultismEffects;\n",
"import net.minecraft.core.BlockPos;\n",
"import net.minecraft.nbt.CompoundTag;\n",
"import net.minecraft.util.Mth;\n",
"import net.minecraft.world.DifficultyInstance;\n",
"import net.minecraft.world.damagesource.DamageSource;\n",
"i... | false | cf2f502cda2e62fb | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | ac13c9d08ab53edbdbc1b293387c788cb8df80e5 | 4dceed95e167dcefa7aae89f7c580476ae9cfa22 | 605b9f7f3875e7f69cb80cb931c14055312c433e | src/main/java/com/github/klikli_dev/occultism/common/entity/BatFamiliarEntity.java | 3 | 4 | [
"\n",
" @Override\n",
" protected void checkFallDamage(double pY, boolean pOnGround, BlockState pState, BlockPos pPos) {\n",
" }\n",
"\n",
" @Override\n",
" public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource source) {\n",
" return false;\n",
... | [
" public Iterable<MobEffectInstance> getFamiliarEffects() {\n",
" return ImmutableList.of(new MobEffectInstance(MobEffects.NIGHT_VISION, 300, 1, false, false));\n",
" }\n",
"\n",
" @Override\n",
" public boolean isFlying() {\n",
" return !this.onGround;\n"
] | [
" public Iterable<EffectInstance> getFamiliarEffects() {\n",
" return ImmutableList.of(new EffectInstance(Effects.NIGHT_VISION, 300, 1, false, false));\n"
] | [
" public Iterable<EffectInstance> getFamiliarEffects() {\n",
" List<EffectInstance> effects = new ArrayList<>();\n",
" effects.add(new EffectInstance(Effects.NIGHT_VISION, 300, 1, false, false));\n",
" if (this.hasBlacksmithUpgrade())\n",
" effects.add(new EffectInstance(O... | [
" }\n",
"\n",
" private static class CannibalismGoal extends Goal {\n",
"\n",
" BatFamiliarEntity bat;\n",
" Bat nearby;\n",
"\n",
" private CannibalismGoal(BatFamiliarEntity bat) {\n",
" this.bat = bat;\n",
" }\n",
"\n",
" @Override\n",
" ... | [
" public boolean isFlying() {\n",
" return !this.onGround;\n",
" }\n",
"\n",
" public Iterable<MobEffectInstance> getFamiliarEffects() {\n",
" List<MobEffectInstance> effects = new ArrayList<>();\n",
" effects.add(new MobEffectInstance(MobEffects.NIGHT_VISION, 300, 1, false... | false | bcf966085db5a852 | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | ac13c9d08ab53edbdbc1b293387c788cb8df80e5 | 4dceed95e167dcefa7aae89f7c580476ae9cfa22 | 605b9f7f3875e7f69cb80cb931c14055312c433e | src/main/java/com/github/klikli_dev/occultism/common/entity/ChimeraFamiliarEntity.java | 0 | 1 | [
" this.setAttacker(NO_ATTACKER);\n",
"\n",
" if (this.level.isClientSide) {\n",
" this.goatNoseTimer++;\n",
"\n",
" if (this.attackTimer > 0 && this.getAttacker() == LION_ATTACKER) {\n",
" Vec3 direction = Vec3.directionFromRotation(this.getRotation... | [
" public SpawnGroupData finalizeSpawn(ServerLevelAccessor pLevel, DifficultyInstance pDifficulty, MobSpawnType pReason, @Nullable SpawnGroupData pSpawnData, @Nullable CompoundTag pDataTag) {\n"
] | [
" public ILivingEntityData finalizeSpawn(IServerWorld pLevel, DifficultyInstance pDifficulty, SpawnReason pReason,\n",
" ILivingEntityData pSpawnData, CompoundNBT pDataTag) {\n"
] | [
" public ILivingEntityData finalizeSpawn(IServerWorld pLevel, DifficultyInstance pDifficulty, SpawnReason pReason,\n",
" ILivingEntityData pSpawnData, CompoundNBT pDataTag) {\n",
" this.setGoat(true);\n"
] | [
" this.setSize((byte) 0);\n",
" this.setFlaps(this.getRandom().nextBoolean());\n",
" this.setRing(this.getRandom().nextBoolean());\n",
" this.setBeard(this.getRandom().nextBoolean());\n",
" this.setHat(this.getRandom().nextDouble() < 0.1);\n",
" return super.final... | [
" public SpawnGroupData finalizeSpawn(ServerLevelAccessor pLevel, DifficultyInstance pDifficulty, MobSpawnType pReason, @Nullable SpawnGroupData pSpawnData, @Nullable CompoundTag pDataTag) {\n",
" this.setGoat(true);\n"
] | false | 639abe382bd069d8 | [
"A1",
"B3"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | ac13c9d08ab53edbdbc1b293387c788cb8df80e5 | 4dceed95e167dcefa7aae89f7c580476ae9cfa22 | 605b9f7f3875e7f69cb80cb931c14055312c433e | src/main/java/com/github/klikli_dev/occultism/registry/OccultismEffects.java | 0 | 1 | [
" * OTHER DEALINGS IN THE SOFTWARE.\n",
" */\n",
"\n",
"package com.github.klikli_dev.occultism.registry;\n",
"\n",
"import com.github.klikli_dev.occultism.Occultism;\n",
"import com.github.klikli_dev.occultism.common.effect.DoubleJumpEffect;\n",
"import com.github.klikli_dev.occultism.common.effect.T... | [
" public static final RegistryObject<ModEffect> DRAGON_GREED = EFFECTS.register(\"dragon_greed\", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0xFFD700));\n",
" public static final RegistryObject<ModEffect> MUMMY_DODGE = EFFECTS.register(\"mummy_dodge\", () -> new ModEffect(MobEffectCategory.BENEFICIAL... | [
" public static final RegistryObject<ModEffect> DRAGON_GREED = EFFECTS.register(\"dragon_greed\", () -> new ModEffect(EffectType.BENEFICIAL, 0xFFD700));\n",
" public static final RegistryObject<ModEffect> MUMMY_DODGE = EFFECTS.register(\"mummy_dodge\", () -> new ModEffect(EffectType.BENEFICIAL, 0xe4d8a7));\... | [
" public static final RegistryObject<ModEffect> DRAGON_GREED = EFFECTS.register(\"dragon_greed\", () -> new ModEffect(EffectType.BENEFICIAL, 0xFFD700));\n",
" public static final RegistryObject<ModEffect> MUMMY_DODGE = EFFECTS.register(\"mummy_dodge\", () -> new ModEffect(EffectType.BENEFICIAL, 0xe4d8a7));\... | [
"\n",
" private static class ModEffect extends MobEffect {\n",
"\n",
" private ModEffect(MobEffectCategory category, int color) {\n",
" super(category, color);\n",
" }\n",
"\n",
" }\n",
"}\n"
] | [
" public static final RegistryObject<ModEffect> DRAGON_GREED = EFFECTS.register(\"dragon_greed\", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0xFFD700));\n",
" public static final RegistryObject<ModEffect> MUMMY_DODGE = EFFECTS.register(\"mummy_dodge\", () -> new ModEffect(MobEffectCategory.BENEFICIAL... | false | 62393a027cda373a | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | fb50d11fa64beac3729a58b37ffd0ccc768b539c | baba724debcc6a978b0e0b85dc7225637f14b6bf | 83b4fdbfbffdbe122fd5fec4f8d035daa36dd391 | src/main/java/com/github/klikli_dev/occultism/common/capability/FamiliarSettingsCapability.java | 0 | 2 | [
" //endregion Initialization\n",
"\n",
" //region Getter / Setter\n",
"\n",
" //endregion Getter / Setter\n",
"\n",
" //region Methods\n",
"\n",
" /**\n",
" * Clones the settings from an existing settings instance into this instance\n",
" *\n",
" * @param settings th... | [] | [
" public CompoundNBT write(CompoundNBT compound) {\n",
" compound.putBoolean(\"greedyEnabled\", this.greedyEnabled);\n",
" compound.putBoolean(\"otherworldBirdEnabled\", this.otherworldBirdEnabled);\n",
" compound.putBoolean(\"batEnabled\", this.batEnabled);\n",
" return compo... | [
" public CompoundNBT write(CompoundNBT compound) {\n",
" compound.putBoolean(\"greedyEnabled\", this.greedyEnabled);\n",
" compound.putBoolean(\"otherworldBirdEnabled\", this.otherworldBirdEnabled);\n",
" compound.putBoolean(\"batEnabled\", this.batEnabled);\n",
" compound.put... | [
" public boolean isGreedyEnabled() {\n",
" return this.greedyEnabled;\n",
" }\n",
"\n",
" public void setGreedyEnabled(boolean greedyEnabled) {\n",
" this.greedyEnabled = greedyEnabled;\n",
" }\n",
"\n",
" public boolean isOtherworldBirdEnabled() {\n",
" return ... | [
" public CompoundNBT write(CompoundNBT compound) {\n",
" compound.putBoolean(\"greedyEnabled\", this.greedyEnabled);\n",
" compound.putBoolean(\"otherworldBirdEnabled\", this.otherworldBirdEnabled);\n",
" compound.putBoolean(\"batEnabled\", this.batEnabled);\n",
" compound.put... | false | 3270247e1755f8e4 | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9",
"B10",
"B11",
"B12",
"B13",
"B14",
"B15",
"B16"
] | side B | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | fb50d11fa64beac3729a58b37ffd0ccc768b539c | baba724debcc6a978b0e0b85dc7225637f14b6bf | 83b4fdbfbffdbe122fd5fec4f8d035daa36dd391 | src/main/java/com/github/klikli_dev/occultism/common/capability/FamiliarSettingsCapability.java | 1 | 2 | [
"\n",
" public void setGreedyEnabled(boolean greedyEnabled) {\n",
" this.greedyEnabled = greedyEnabled;\n",
" }\n",
"\n",
" public boolean isOtherworldBirdEnabled() {\n",
" return this.otherworldBirdEnabled;\n",
" }\n",
"\n",
" public void setOtherworldBirdEnabled(bool... | [] | [
" //endregion Methods\n"
] | [
"\n",
" public boolean isDeerEnabled() {\n",
" return this.deerEnabled;\n",
" }\n",
"\n",
" public void setDeerEnabled(boolean deerEnabled) {\n",
" this.deerEnabled = deerEnabled;\n",
" }\n",
" //endregion Methods\n"
] | [
"\n",
" @Override\n",
" public CompoundTag serializeNBT() {\n",
" CompoundTag compound = new CompoundTag();\n",
" compound.putBoolean(\"greedyEnabled\", this.greedyEnabled);\n",
" compound.putBoolean(\"otherworldBirdEnabled\", this.otherworldBirdEnabled);\n",
" compound... | [
"\n",
" public boolean isDeerEnabled() {\n",
" return this.deerEnabled;\n",
" }\n",
"\n",
" public void setDeerEnabled(boolean deerEnabled) {\n",
" this.deerEnabled = deerEnabled;\n",
" }\n",
" //endregion Methods\n"
] | false | a681e81175978ee2 | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | fb50d11fa64beac3729a58b37ffd0ccc768b539c | baba724debcc6a978b0e0b85dc7225637f14b6bf | 83b4fdbfbffdbe122fd5fec4f8d035daa36dd391 | src/main/java/com/github/klikli_dev/occultism/handlers/ClientSetupEventHandler.java | 0 | 1 | [
"@Mod.EventBusSubscriber(modid = Occultism.MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)\n",
"public class ClientSetupEventHandler {\n",
"\n",
" //region Fields\n",
" public static final KeyMapping KEY_BACKPACK =\n",
" new KeyMapping(\"key.occultism.backpack\", Backpac... | [
" public static final KeyMapping KEY_FAMILIAR_BAT =\n",
" new KeyMapping(\"key.occultism.familiar.bat\", KeyConflictContext.IN_GAME,\n",
" InputConstants.Type.KEYSYM.getOrCreate(-1), \"key.occultism.category\");\n"
] | [
" public static final KeyBinding KEY_FAMILIAR_BAT =\n",
" new KeyBinding(\"key.occultism.familiar.bat\", KeyConflictContext.IN_GAME,\n",
" InputMappings.Type.KEYSYM.getOrMakeInput(-1), \"key.occultism.category\");\n"
] | [
" public static final KeyBinding KEY_FAMILIAR_BAT =\n",
" new KeyBinding(\"key.occultism.familiar.bat\", KeyConflictContext.IN_GAME,\n",
" InputMappings.Type.KEYSYM.getOrMakeInput(-1), \"key.occultism.category\");\n",
"\n",
" public static final KeyBinding KEY_FAMILIAR_DE... | [
" //endregion Fields\n",
"\n",
" //region Static Methods\n",
" @SubscribeEvent\n",
" public static void onClientSetup(FMLClientSetupEvent event) {\n",
" //Register client side event handlers\n",
" MinecraftForge.EVENT_BUS.register(Occultism.SELECTED_BLOCK_RENDERER);\n",
" ... | [
" public static final KeyBinding KEY_FAMILIAR_BAT =\n",
" new KeyBinding(\"key.occultism.familiar.bat\", KeyConflictContext.IN_GAME,\n",
" InputMappings.Type.KEYSYM.getOrMakeInput(-1), \"key.occultism.category\");\n",
"\n",
" public static final KeyBinding KEY_FAMILIAR_DE... | false | f3348c7bd7a5de1f | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
klikli-dev/occultism | fb50d11fa64beac3729a58b37ffd0ccc768b539c | baba724debcc6a978b0e0b85dc7225637f14b6bf | 83b4fdbfbffdbe122fd5fec4f8d035daa36dd391 | src/main/java/com/github/klikli_dev/occultism/registry/OccultismEntities.java | 0 | 1 | [
" NonNullLazy.of(() -> EntityType.Builder.of(WildHuntSkeletonEntity::new, MobCategory.MONSTER)\n",
" .sized(0.6F, 2.9F)\n",
" .clientTrackingRange(8)\n",
" .build(modLoc(\"wild_hunt_skeleton\").toString()));\n",
" public static final Non... | [
" NonNullLazy.of(() -> EntityType.Builder.of(BatFamiliarEntity::new, MobCategory.CREATURE)\n",
" .sized(0.5F, 0.9F)\n",
" .clientTrackingRange(8)\n",
" .build(modLoc(\"bat_familiar\").toString()));\n"
] | [
" NonNullLazy.of(() -> EntityType.Builder.create(BatFamiliarEntity::new, EntityClassification.CREATURE)\n",
" .size(0.5F, 0.9F)\n",
" .trackingRange(8)\n",
" .build(modLoc(\"bat_f... | [
" NonNullLazy.of(() -> EntityType.Builder.create(BatFamiliarEntity::new, EntityClassification.CREATURE)\n",
" .size(0.5F, 0.9F)\n",
" .trackingRange(8)\n",
" .build(modLoc(\"bat_f... | [
"\n",
" public static final RegistryObject<EntityType<FoliotEntity>> FOLIOT = ENTITIES.register(\"foliot\", FOLIOT_TYPE::get);\n",
" public static final RegistryObject<EntityType<DjinniEntity>> DJINNI = ENTITIES.register(\"djinni\", DJINNI_TYPE::get);\n",
" public static final RegistryObject<EntityTy... | [
" NonNullLazy.of(() -> EntityType.Builder.create(BatFamiliarEntity::new, EntityClassification.CREATURE)\n",
" .size(0.5F, 0.9F)\n",
" .trackingRange(8)\n",
" .build(modLoc(\"bat_f... | false | e9602dfe03cb1e55 | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.