id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
122426223_141
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(WalletTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(WalletTest.class);", "type": "Logger", "var_name": "log" }, { "declarator":...
{ "body": "@Test\n public void testWalletGeneration() {\n DefaultConfig defaultConfig = new DefaultConfig();\n String keyFilePath = defaultConfig.getString(Constants.YGGDRASH_KEY_PATH);\n\n assertFalse(\"Check yggdrash.conf(yggdrash.key.path & yggdrash.key.password)\",\n Strings...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(Wallet.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(Wallet.class);", "type": "Logger", "var_name": "log" }, { "declarator": "WALLET...
{ "body": "@Override\n public String toString() {\n return \"Wallet{\"\n + \"keyPath=\" + keyPath\n + \", keyName=\" + keyName\n + \", address=\" + getHexAddress()\n + \", publicKey=\" + Hex.toHexString(publicKey)\n + '}';\n }", ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_29
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TransactionApiImplTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TransactionApiImplTest.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Test\n public void sendInvalidDataFormatOfRawTx() {\n byte[] input = \"Invalid Raw Transaction Input Data\".getBytes();\n TransactionResponseDto transactionResponseDto = txApi.sendRawTransaction(input);\n assertTrue(!transactionResponseDto.logs.isEmpty());\n }", "class_method_...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TransactionApiImpl.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TransactionApiImpl.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@Override\n public TransactionResponseDto sendRawTransaction(byte[] bytes) {\n Transaction transaction = TransactionImpl.parseFromRaw(bytes);\n return addTx(transaction);\n }", "class_method_signature": "TransactionApiImpl.sendRawTransaction(byte[] bytes)", "constructor": false, "...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_100
{ "fields": [ { "declarator": "peer1 = Peer.valueOf(\"ynode://75bff16c@127.0.0.1:32921\")", "modifier": "private final", "original_string": "private final Peer peer1 = Peer.valueOf(\"ynode://75bff16c@127.0.0.1:32921\");", "type": "Peer", "var_name": "peer1" }, { "declar...
{ "body": "@Test\n public void testBump() { // moveToFront\n Peer peer3 = Peer.valueOf(\"ynode://75bff16c@127.0.0.1:32923\");\n\n bucket.addPeer(peer1); // [0] -> [1]\n bucket.addPeer(peer2); // [1] -> [2]\n bucket.addPeer(peer3); // [2] -> [0]\n\n bucket.bump(peer3);\n\n ...
{ "fields": [ { "declarator": "MAX_REPLACEMENT = 10", "modifier": "private static final", "original_string": "private static final int MAX_REPLACEMENT = 10;", "type": "int", "var_name": "MAX_REPLACEMENT" }, { "declarator": "depth", "modifier": "private final", ...
{ "body": "public synchronized void bump(Peer peer) {\n if (peers.contains(peer)) {\n moveToFront(peers, peer);\n }\n }", "class_method_signature": "PeerBucket.bump(Peer peer)", "constructor": false, "full_signature": "public synchronized void bump(Peer peer)", "identifier": "bump"...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_91
{ "fields": [], "file": "yggdrash-core/src/test/java/io/yggdrash/common/util/UtilsTest.java", "identifier": "UtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = RuntimeException.class)\n public void showErrorAndExit() {\n Utils.showErrorAndExit(\"test\");\n }", "class_method_signature": "UtilsTest.showErrorAndExit()", "constructor": false, "full_signature": "@Test(expected = RuntimeException.class) public void showErrorAndExit()...
{ "fields": [ { "declarator": "_1000_ = new BigInteger(\"1000\")", "modifier": "private static final", "original_string": "private static final BigInteger _1000_ = new BigInteger(\"1000\");", "type": "BigInteger", "var_name": "_1000_" }, { "declarator": "random = new Se...
{ "body": "public static void showErrorAndExit(String message, String... messages) {\n LoggerFactory.getLogger(\"general\").error(message);\n final String ANSI_RED = \"\\u001B[31m\";\n final String ANSI_RESET = \"\\u001B[0m\";\n\n System.err.println(ANSI_RED);\n System.err.println()...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_52
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(EbftBlockKeyStoreTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(EbftBlockKeyStoreTest.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Test\n public void getTest_NegativeNumber() {\n assertNull(blockKeyStore.get(-1L));\n }", "class_method_signature": "EbftBlockKeyStoreTest.getTest_NegativeNumber()", "constructor": false, "full_signature": "@Test public void getTest_NegativeNumber()", "identifier": "getTest_NegativeNu...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(EbftBlockKeyStore.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(EbftBlockKeyStore.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@Override\n public byte[] get(Long key) {\n if (key < 0) {\n log.debug(\"Key is not vaild.\");\n return null;\n }\n\n lock.lock();\n try {\n log.trace(\"get \" + \"({})\", key);\n return db.get(ByteUtil.longToBytes(key));\n }...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_44
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(PbftBlockChainTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(PbftBlockChainTest.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@Test\n public void addBlockTest() {\n this.pbftBlockChain.addBlock(pbftBlock1);\n assertEquals(1L, this.blockChainManager.getLastIndex());\n\n this.pbftBlockChain.addBlock(pbftBlock2);\n assertEquals(2L, this.blockChainManager.getLastIndex());\n\n this.pbftBlockChain....
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(PbftBlockChain.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(PbftBlockChain.class);", "type": "Logger", "var_name": "log" }, { "decl...
{ "body": "@Override\n public Map<String, List<String>> addBlock(ConsensusBlock<PbftProto.PbftBlock> block) {\n blockChainManagerMock.addBlock(block);\n this.blockKeyStore.put(block.getIndex(), block.getHash().getBytes());\n loggingBlock((PbftBlock) block);\n return new HashMap<>();\n ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_13
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TransactionApiImplTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TransactionApiImplTest.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Test\n public void getBlockTransactionCountByHashTest() {\n assertThat(txApi.getTransactionCountByBlockHash(yggdrashBranch, testBlockHash))\n .isNotZero();\n }", "class_method_signature": "TransactionApiImplTest.getBlockTransactionCountByHashTest()", "constructor": false, ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TransactionApiImpl.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TransactionApiImpl.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@Override\n public int getTransactionCountByBlockHash(String branchId, String blockId) {\n ConsensusBlock block = branchGroup.getBlockByHash(BranchId.of(branchId), blockId);\n return block.getBody().getCount();\n }", "class_method_signature": "TransactionApiImpl.getTransactionCountByB...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_64
{ "fields": [ { "declarator": "keccak512", "modifier": "private", "original_string": "private Keccak512 keccak512;", "type": "Keccak512", "var_name": "keccak512" } ], "file": "yggdrash-core/src/test/java/io/yggdrash/common/crypto/cryptohash/Keccak512Test.java", "identifier"...
{ "body": "@Test\n public void engineUpdate() {\n keccak512.engineUpdate((byte) 'b');\n keccak512.engineUpdate(\"byte\".getBytes(), 0, 4);\n }", "class_method_signature": "Keccak512Test.engineUpdate()", "constructor": false, "full_signature": "@Test public void engineUpdate()", "identifier...
{ "fields": [], "file": "yggdrash-core/src/main/java/io/yggdrash/common/crypto/cryptohash/Keccak512.java", "identifier": "Keccak512", "interfaces": "", "methods": [ { "class_method_signature": "Keccak512.Keccak512()", "constructor": true, "full_signature": "public Keccak512()", "i...
{ "body": "@Override\n protected void engineUpdate(byte input) {\n }", "class_method_signature": "Keccak512.engineUpdate(byte input)", "constructor": false, "full_signature": "@Override protected void engineUpdate(byte input)", "identifier": "engineUpdate", "invocations": [], "modifiers": "@Override...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_33
{ "fields": [ { "declarator": "runningPort", "modifier": "@LocalRunningGrpcPort\n private", "original_string": "@LocalRunningGrpcPort\n private int runningPort;", "type": "int", "var_name": "runningPort" }, { "declarator": "grpcServerRunner", "modifier": "@A...
{ "body": "@Test(expected = StatusRuntimeException.class)\n public void testIpBlockInterceptor() {\n assertThat(grpcServerRunner).isNotNull();\n\n // Create channel\n ManagedChannel channel = ManagedChannelBuilder\n .forAddress(\"localhost\", runningPort)\n .usePl...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(\"interceptor.ipBlock\")", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(\"interceptor.ipBlock\");", "type": "Logger", "var_name": "log" }, { ...
{ "body": "public void setBlackIps(String[] ips) {\n this.blackIps = ips;\n this.blackIpsForLog = Arrays.toString(blackIps);\n }", "class_method_signature": "IpBlockInterceptor.setBlackIps(String[] ips)", "constructor": false, "full_signature": "public void setBlackIps(String[] ips)", "identi...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_25
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TransactionApiImplTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TransactionApiImplTest.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Test\n public void getTransactionReceiptTest() {\n assertThat(txApi.getTransactionReceipt(yggdrashBranch,\n testTransactionHash))\n .isNotNull();\n }", "class_method_signature": "TransactionApiImplTest.getTransactionReceiptTest()", "constructor": false, "fu...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TransactionApiImpl.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TransactionApiImpl.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@Override\n public TransactionReceiptDto getTransactionReceipt(String branchId, String txId) {\n return TransactionReceiptDto.createBy(branchGroup.getReceipt(BranchId.of(branchId), txId));\n }", "class_method_signature": "TransactionApiImpl.getTransactionReceipt(String branchId, String txId)...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_72
{ "fields": [], "file": "yggdrash-core/src/test/java/io/yggdrash/common/util/BiUtilTest.java", "identifier": "BiUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void isMoreThan() {\n Assert.assertTrue(BiUtil.isMoreThan(BigInteger.ONE, BigInteger.ZERO));\n }", "class_method_signature": "BiUtilTest.isMoreThan()", "constructor": false, "full_signature": "@Test public void isMoreThan()", "identifier": "isMoreThan", "invocations": ...
{ "fields": [], "file": "yggdrash-core/src/main/java/io/yggdrash/common/util/BiUtil.java", "identifier": "BiUtil", "interfaces": "", "methods": [ { "class_method_signature": "BiUtil.BiUtil()", "constructor": true, "full_signature": "private BiUtil()", "identifier": "BiUtil", ...
{ "body": "public static boolean isMoreThan(BigInteger valueA, BigInteger valueB) {\n return valueA.compareTo(valueB) > 0;\n }", "class_method_signature": "BiUtil.isMoreThan(BigInteger valueA, BigInteger valueB)", "constructor": false, "full_signature": "public static boolean isMoreThan(BigInteger val...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_3
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(BlockApiImplTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(BlockApiImplTest.class);", "type": "Logger", "var_name": "log" }, { "...
{ "body": "@Test\n public void blockNumberTest() {\n try {\n assertThat(BLOCK_API.blockNumber(branchId)).isNotNull();\n } catch (Exception exception) {\n log.debug(\"blockNumberTest :: exception : \" + exception);\n }\n }", "class_method_signature": "BlockApiImplTest...
{ "fields": [ { "declarator": "branchGroup", "modifier": "private final", "original_string": "private final BranchGroup branchGroup;", "type": "BranchGroup", "var_name": "branchGroup" } ], "file": "yggdrash-node/src/main/java/io/yggdrash/node/api/BlockApiImpl.java", "identi...
{ "body": "@Override\n public long blockNumber(String branchId) {\n return branchGroup.getLastIndex(BranchId.of(branchId));\n }", "class_method_signature": "BlockApiImpl.blockNumber(String branchId)", "constructor": false, "full_signature": "@Override public long blockNumber(String branchId)", "i...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_120
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(BlockHeaderTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(BlockHeaderTest.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "@Test\n public void testBlockHeader() {\n\n JsonObject jsonParam = new JsonObject();\n jsonParam.addProperty(\"address\", \"5db10750e8caff27f906b41c71b3471057dd2000\");\n jsonParam.addProperty(\"amount\", \"10000000\");\n\n JsonObject jsonObject = new JsonObject();\n j...
{ "fields": [ { "declarator": "VERSION_LENGTH = 8", "modifier": "public static final", "original_string": "public static final int VERSION_LENGTH = 8;", "type": "int", "var_name": "VERSION_LENGTH" }, { "declarator": "TYPE_LENGTH = 8", "modifier": "public static fi...
{ "body": "public BlockHeader(byte[] bytes) {\n this(toProto(bytes));\n }", "class_method_signature": "BlockHeader.BlockHeader(byte[] bytes)", "constructor": true, "full_signature": "public BlockHeader(byte[] bytes)", "identifier": "BlockHeader", "invocations": [], "modifiers": "public", "par...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_48
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(PbftStatusTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(PbftStatusTest.class);", "type": "Logger", "var_name": "log" }, { "decl...
{ "body": "@Test\n public void verifyTest() {\n assertTrue(PbftStatus.verify(this.pbftStatus));\n log.debug(Hex.toHexString(this.pbftStatus.getHashForSigning()));\n log.debug(Hex.toHexString(this.pbftStatus.getSignature()));\n assertTrue(PbftStatus.verify(this.pbftStatus2));\n as...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(PbftStatus.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger log = LoggerFactory.getLogger(PbftStatus.class);", "type": "org.slf4j.Logger", "var_name": "log" }, {...
{ "body": "public static boolean verify(PbftStatus status) {\n if (status == null || status.getSignature() == null) {\n log.debug(\"PbftStatus is null.\");\n return false;\n }\n\n byte[] hashData = status.getHashForSigning();\n byte[] signature = status.getSignature()...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
122426223_136
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ContractExecutorTest.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ContractExecutorTest.class);", "type": "Logger", "var_name": "log" }, {...
{ "body": "@Test\n public void executeTxsTest() {\n //error tx [contract is not exist]\n ContractVersion notExistedVersion = ContractVersion.of(\n Hex.encodeHexString(\"Wrong ContractVersion\".getBytes()));\n Transaction errTx = generateTx(BigInteger.valueOf(100), notExistedVers...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ContractExecutor.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ContractExecutor.class);", "type": "Logger", "var_name": "log" }, { "...
{ "body": "BlockRuntimeResult executeTxs(Map<String, Object> serviceMap, List<Transaction> txs) {\n // Execute unconfirmed Txs by pbftServie\n return getBlockRuntimeResult(new BlockRuntimeResult(txs), serviceMap);\n }", "class_method_signature": "ContractExecutor.executeTxs(Map<String, Object> serv...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 122426223, "size": 59331, "stargazer_count": 44, "stars": null, "updates": null, "url": "https://github.com/yggdrash/yggdrash" }
73087334_6
{ "fields": [ { "declarator": "daoUnderTest", "modifier": "private", "original_string": "private CachingSamlClientDaoImpl daoUnderTest;", "type": "CachingSamlClientDaoImpl", "var_name": "daoUnderTest" }, { "declarator": "realDaoMock", "modifier": "private", ...
{ "body": "@Test\n\tpublic void testLoadAllClients() {\n\t\t// Read 10 times.\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tList<DbLoadedSamlClientConfigurationDto> all = daoUnderTest.loadAllClients();\n\t\t\tassertNotNull(all);\n\t\t\tassertEquals(3, all.size());\n\t\t}\n\t\t\n\t\t// The real DAO must have been called ...
{ "fields": [ { "declarator": "realDao", "modifier": "private final", "original_string": "private final SamlClientDao realDao;", "type": "SamlClientDao", "var_name": "realDao" }, { "declarator": "cachedConfigurations", "modifier": "private", "original_string...
{ "body": "@Override\n\tpublic List<DbLoadedSamlClientConfigurationDto> loadAllClients() {\n\t\tcheckAndLoadFromRealDao();\n\t\tCollection<DbLoadedSamlClientConfigurationDto> values = cachedConfigurations.values();\n\t\treturn new ArrayList<DbLoadedSamlClientConfigurationDto>(values);\n\t}", "class_method_signature...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_7
{ "fields": [ { "declarator": "daoUnderTest", "modifier": "private", "original_string": "private CachingSamlClientDaoImpl daoUnderTest;", "type": "CachingSamlClientDaoImpl", "var_name": "daoUnderTest" }, { "declarator": "realDaoMock", "modifier": "private", ...
{ "body": "@Test\n\tpublic void testLoadClient() {\n\t\tString[] clientNames = {\"Client1\", \"Client2\", \"Client3\"};\n\t\t\n\t\t// Read 10 times.\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (String clientName: clientNames) {\n\t\t\t\tDbLoadedSamlClientConfigurationDto cfg = daoUnderTest.loadClient(clientName);\...
{ "fields": [ { "declarator": "realDao", "modifier": "private final", "original_string": "private final SamlClientDao realDao;", "type": "SamlClientDao", "var_name": "realDao" }, { "declarator": "cachedConfigurations", "modifier": "private", "original_string...
{ "body": "@Override\n\tpublic DbLoadedSamlClientConfigurationDto loadClient(String clientName) {\n\t\tcheckAndLoadFromRealDao();\n\t\treturn cachedConfigurations.get(clientName);\n\t}", "class_method_signature": "CachingSamlClientDaoImpl.loadClient(String clientName)", "constructor": false, "full_signature": "...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_0
{ "fields": [ { "declarator": "TABLE_NAME = \"PAC4J_CFG\"", "modifier": "private static final", "original_string": "private static final String TABLE_NAME = \"PAC4J_CFG\";", "type": "String", "var_name": "TABLE_NAME" }, { "declarator": "ENVIRONMENT = \"UnitTest\"", ...
{ "body": "@Test\n\tpublic void allNamesMustBeLoaded() {\n\t\tString[] expectedNames = {\"One\", \"Two\", \"Three\", \"Four\", \"Five\"};\n\t\tList<String> names = templateUnderTest.loadClientNames();\n\n\t\tassertNotNull(names);\n\t\tassertEquals(5, names.size());\n\t\t\n\t\tfor (String expected: expectedNames) {\n\...
{ "fields": [ { "declarator": "SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\"", "modifier": "private static final", "original_string": "private static final String SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\";", "type": ...
{ "body": "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<String> loadClientNames() {\n\t\tfinal List<String> names = template.query(selectAllNamesSqlText, selectAllNamesParameters, selectAllNamesParameterTypes, onlyNamesRowMapper);\n\t\treturn names;\n\t}", "class_method_signature": "SpringJdbcTemplateS...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_1
{ "fields": [ { "declarator": "TABLE_NAME = \"PAC4J_CFG\"", "modifier": "private static final", "original_string": "private static final String TABLE_NAME = \"PAC4J_CFG\";", "type": "String", "var_name": "TABLE_NAME" }, { "declarator": "ENVIRONMENT = \"UnitTest\"", ...
{ "body": "@Test\n\tpublic void allClientConfigurationsMustBeLoaded() {\n\t\tString[] expectedNames = {\"One\", \"Two\", \"Three\", \"Four\", \"Five\"};\n\t\tString[] expectedBindings = {null, \"http://redirect\", \"http://post\", null, \"urn:binding\"};\n\t\t\n\t\tList<DbLoadedSamlClientConfigurationDto> configurati...
{ "fields": [ { "declarator": "SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\"", "modifier": "private static final", "original_string": "private static final String SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\";", "type": ...
{ "body": "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<DbLoadedSamlClientConfigurationDto> loadAllClients() {\n\t\tfinal List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectAllClientsSqlText, selectAllClientsParameters, selectAllClientsParameterTypes, fullRowMapper);\n\t\tretu...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_10
{ "fields": [ { "declarator": "CLIENT_NAMES = {\"SAML_0\"}", "modifier": "private static final", "original_string": "private static final String[] CLIENT_NAMES = {\"SAML_0\"};", "type": "String[]", "var_name": "CLIENT_NAMES" }, { "declarator": "ENVIRONMENT = \"Unit_Test...
{ "body": "@Test\n\tpublic void keystoreResourceIsOk() throws IOException {\n\t\tResource r = configurationUnderTest.getKeystoreResource();\n\t\tassertNotNull(r);\n\n\t\tassertTrue(r.exists());\n\t\tassertNull(r.getFilename());\n\t\tInputStream is = r.getInputStream();\n\t\tassertNotNull(is);\n\t\tis.close();\n\t}", ...
{ "fields": [ { "declarator": "dao", "modifier": "private final", "original_string": "private final SamlClientDao dao;", "type": "SamlClientDao", "var_name": "dao" }, { "declarator": "keystoreBinaryData", "modifier": "private", "original_string": "private by...
{ "body": "@Override\n\tpublic Resource getKeystoreResource() {\n\t\treturn keyStoreResourceFromDatabase;\n\t}", "class_method_signature": "DatabaseLoadedSAML2ClientConfiguration.getKeystoreResource()", "constructor": false, "full_signature": "@Override public Resource getKeystoreResource()", "identifier": "g...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_2
{ "fields": [ { "declarator": "TABLE_NAME = \"PAC4J_CFG\"", "modifier": "private static final", "original_string": "private static final String TABLE_NAME = \"PAC4J_CFG\";", "type": "String", "var_name": "TABLE_NAME" }, { "declarator": "ENVIRONMENT = \"UnitTest\"", ...
{ "body": "@Test\n\tpublic void singleClientConfigurationMustBeLoaded() {\n\t\tDbLoadedSamlClientConfigurationDto cfg = templateUnderTest.loadClient(\"Five\");\n\t\tassertNotNull(cfg);\n\n\t\t// Client name\n\t\tassertEquals(\"Five\", cfg.getClientName());\n\t\t\n\t\t// Keystore data\n\t\tbyte[] keystoreData = cfg.ge...
{ "fields": [ { "declarator": "SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\"", "modifier": "private static final", "original_string": "private static final String SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\";", "type": ...
{ "body": "@Override\n\t@Transactional(readOnly=true)\n\tpublic DbLoadedSamlClientConfigurationDto loadClient(final String clientName) {\n\t\tif (StringUtils.isBlank(clientName)) {\n\t\t\tthrow new IllegalArgumentException(\"Client name must not be null or empty.\");\n\t\t}\n\t\t\n\t\tfinal Object[] selectSingleClien...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_3
{ "fields": [ { "declarator": "TABLE_NAME = \"PAC4J_CFG\"", "modifier": "private static final", "original_string": "private static final String TABLE_NAME = \"PAC4J_CFG\";", "type": "String", "var_name": "TABLE_NAME" }, { "declarator": "ENVIRONMENT = \"UnitTest\"", ...
{ "body": "@Test\n\tpublic void singleClientConfigurationThatDoesNotExist() {\n\t\tDbLoadedSamlClientConfigurationDto cfg = templateUnderTest.loadClient(\"DoesNotExist\");\n\t\tassertNull(cfg);\n\t}", "class_method_signature": "SpringJdbcTemplateSamlClientDaoImplTest.singleClientConfigurationThatDoesNotExist()", ...
{ "fields": [ { "declarator": "SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\"", "modifier": "private static final", "original_string": "private static final String SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\";", "type": ...
{ "body": "@Override\n\t@Transactional(readOnly=true)\n\tpublic DbLoadedSamlClientConfigurationDto loadClient(final String clientName) {\n\t\tif (StringUtils.isBlank(clientName)) {\n\t\t\tthrow new IllegalArgumentException(\"Client name must not be null or empty.\");\n\t\t}\n\t\t\n\t\tfinal Object[] selectSingleClien...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_11
{ "fields": [ { "declarator": "CLIENT_NAMES = {\"SAML_0\"}", "modifier": "private static final", "original_string": "private static final String[] CLIENT_NAMES = {\"SAML_0\"};", "type": "String[]", "var_name": "CLIENT_NAMES" }, { "declarator": "ENVIRONMENT = \"Unit_Test...
{ "body": "@Test\n\tpublic void idpMetadataProvidederResourceIsOk() throws IOException {\n\t\tResource r = configurationUnderTest.getIdentityProviderMetadataResource();\n\t\tassertNotNull(r);\n\n\t\tassertTrue(r.exists());\n\t\tassertNull(r.getFilename());\n\t\tInputStream is = r.getInputStream();\n\t\tassertNotNull(...
{ "fields": [ { "declarator": "dao", "modifier": "private final", "original_string": "private final SamlClientDao dao;", "type": "SamlClientDao", "var_name": "dao" }, { "declarator": "keystoreBinaryData", "modifier": "private", "original_string": "private by...
{ "body": "@Override\n\tpublic Resource getIdentityProviderMetadataResource() {\n\t\treturn identityProviderMetadataResourceFromDatabase;\n\t}", "class_method_signature": "DatabaseLoadedSAML2ClientConfiguration.getIdentityProviderMetadataResource()", "constructor": false, "full_signature": "@Override public Res...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_4
{ "fields": [ { "declarator": "TABLE_NAME = \"PAC4J_CFG\"", "modifier": "private static final", "original_string": "private static final String TABLE_NAME = \"PAC4J_CFG\";", "type": "String", "var_name": "TABLE_NAME" }, { "declarator": "ENVIRONMENT = \"UnitTest\"", ...
{ "body": "@Test(expected=IllegalArgumentException.class)\n\tpublic void singleClientConfigurationForNoName1() {\n\t\ttemplateUnderTest.loadClient(null);\n\t}", "class_method_signature": "SpringJdbcTemplateSamlClientDaoImplTest.singleClientConfigurationForNoName1()", "constructor": false, "full_signature": "@Te...
{ "fields": [ { "declarator": "SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\"", "modifier": "private static final", "original_string": "private static final String SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\";", "type": ...
{ "body": "@Override\n\t@Transactional(readOnly=true)\n\tpublic DbLoadedSamlClientConfigurationDto loadClient(final String clientName) {\n\t\tif (StringUtils.isBlank(clientName)) {\n\t\t\tthrow new IllegalArgumentException(\"Client name must not be null or empty.\");\n\t\t}\n\t\t\n\t\tfinal Object[] selectSingleClien...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_8
{ "fields": [ { "declarator": "CALLBACK_URL = \"http://myappli/callback\"", "modifier": "private static final", "original_string": "private static final String CALLBACK_URL = \"http://myappli/callback\";", "type": "String", "var_name": "CALLBACK_URL" }, { "declarator": ...
{ "body": "@Test\n public void testMissingClient() {\n \tDatabaseLoadedSAML2Clients clients = new DatabaseLoadedSAML2Clients(createSamlClientDaoMockWithNoClientsDefined());\n \tclients.setCallbackUrl(CALLBACK_URL);\n \tclients.init();\n List<Client> clientList = clients.getClients();\n asser...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(DatabaseLoadedSAML2Clients.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(DatabaseLoadedSAML2Clients.class);", "type": "Logger", "var_name": "logger" }...
{ "body": "@Override\n\tpublic List<Client> getClients() {\n\t\tinit(); // We must assure the clients are loaded from DB first.\n\t\treturn this.dynamicallyLoadedClients; // Never null, can be an empty list\n\t}", "class_method_signature": "DatabaseLoadedSAML2Clients.getClients()", "constructor": false, "full_s...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_9
{ "fields": [ { "declarator": "CLIENT_NAMES = {\"SAML_0\"}", "modifier": "private static final", "original_string": "private static final String[] CLIENT_NAMES = {\"SAML_0\"};", "type": "String[]", "var_name": "CLIENT_NAMES" }, { "declarator": "ENVIRONMENT = \"Unit_Test...
{ "body": "@Test\n\tpublic void keystoreIsOk()\n\t\t\tthrows KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException, CertificateException, IOException {\n\t\tResource keystoreRes = configurationUnderTest.getKeystoreResource();\n\t\tassertNotNull(keystoreRes);\n\n\t\tKeyStore ks = keystoreFromResource(...
{ "fields": [ { "declarator": "dao", "modifier": "private final", "original_string": "private final SamlClientDao dao;", "type": "SamlClientDao", "var_name": "dao" }, { "declarator": "keystoreBinaryData", "modifier": "private", "original_string": "private by...
{ "body": "@Override\n\tpublic Resource getKeystoreResource() {\n\t\treturn keyStoreResourceFromDatabase;\n\t}", "class_method_signature": "DatabaseLoadedSAML2ClientConfiguration.getKeystoreResource()", "constructor": false, "full_signature": "@Override public Resource getKeystoreResource()", "identifier": "g...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
73087334_5
{ "fields": [ { "declarator": "TABLE_NAME = \"PAC4J_CFG\"", "modifier": "private static final", "original_string": "private static final String TABLE_NAME = \"PAC4J_CFG\";", "type": "String", "var_name": "TABLE_NAME" }, { "declarator": "ENVIRONMENT = \"UnitTest\"", ...
{ "body": "@Test(expected=IllegalArgumentException.class)\n\tpublic void singleClientConfigurationForNoName2() {\n\t\ttemplateUnderTest.loadClient(\" \");\n\t}", "class_method_signature": "SpringJdbcTemplateSamlClientDaoImplTest.singleClientConfigurationForNoName2()", "constructor": false, "full_signature": "...
{ "fields": [ { "declarator": "SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\"", "modifier": "private static final", "original_string": "private static final String SELECT_ALL_NAMES_SQL_TEXT = \"select Client_Name from %s where Environment = ?\";", "type": ...
{ "body": "@Override\n\t@Transactional(readOnly=true)\n\tpublic DbLoadedSamlClientConfigurationDto loadClient(final String clientName) {\n\t\tif (StringUtils.isBlank(clientName)) {\n\t\t\tthrow new IllegalArgumentException(\"Client name must not be null or empty.\");\n\t\t}\n\t\t\n\t\tfinal Object[] selectSingleClien...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73087334, "size": 61, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/jkacer/pac4j-extensions" }
3728381_19
{ "fields": [ { "declarator": "emptyRecord = \"D00000\"", "modifier": "private", "original_string": "private String emptyRecord = \"D00000\";", "type": "String", "var_name": "emptyRecord" }, { "declarator": "twoEmptyRecords = \"900000500000\"", "modifier": "privat...
{ "body": "@Test\n\tpublic void testEmptyRecord() throws Exception {\n\t\tbyte[] data = NfcUtils.convertASCIIToBin(emptyRecord);\n\t\tNdefMessage ndefMessage = decoder.decode(data);\n\t\tassertTrue(ndefMessage.getNdefRecords().length == 1);\n\t}", "class_method_signature": "NdefMessageDecoderTest.testEmptyRecord()"...
{ "fields": [ { "declarator": "ndefRecordDecoder", "modifier": "private", "original_string": "private NdefRecordDecoder ndefRecordDecoder;", "type": "NdefRecordDecoder", "var_name": "ndefRecordDecoder" } ], "file": "nfctools-ndef/src/main/java/org/nfctools/ndef/NdefMessageDec...
{ "body": "public NdefMessage decode(byte[] ndefMessage) {\n\t\treturn decode(ndefMessage, 0, ndefMessage.length);\n\t}", "class_method_signature": "NdefMessageDecoder.decode(byte[] ndefMessage)", "constructor": false, "full_signature": "public NdefMessage decode(byte[] ndefMessage)", "identifier": "decode", ...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_23
{ "fields": [ { "declarator": "emptyRecord = \"D00000\"", "modifier": "private", "original_string": "private String emptyRecord = \"D00000\";", "type": "String", "var_name": "emptyRecord" }, { "declarator": "twoEmptyRecords = \"900000500000\"", "modifier": "privat...
{ "body": "@Test\n\tpublic void testMimeMediaRecordWithLongPayloadAndId() throws Exception {\n\t\tbyte[] data = NfcUtils.convertASCIIToBin(mimeMediaRecordWithLongPayloadAndId);\n\t\tNdefMessage ndefMessage = decoder.decode(data);\n\t\tassertTrue(ndefMessage.getNdefRecords().length == 1);\n\n\t\tNdefRecord ndefRecord ...
{ "fields": [ { "declarator": "ndefRecordDecoder", "modifier": "private", "original_string": "private NdefRecordDecoder ndefRecordDecoder;", "type": "NdefRecordDecoder", "var_name": "ndefRecordDecoder" } ], "file": "nfctools-ndef/src/main/java/org/nfctools/ndef/NdefMessageDec...
{ "body": "public NdefMessage decode(byte[] ndefMessage) {\n\t\treturn decode(ndefMessage, 0, ndefMessage.length);\n\t}", "class_method_signature": "NdefMessageDecoder.decode(byte[] ndefMessage)", "constructor": false, "full_signature": "public NdefMessage decode(byte[] ndefMessage)", "identifier": "decode", ...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_15
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/mf/mad/Mad1Test.java", "identifier": "Mad1Test", "interfaces": "", "superclass": "extends AbstractMadTests" }
{ "body": "@Test\n\tpublic void testMadCrc() throws Exception {\n\t\tMfClassicReaderWriter readerWriter = loadData(cardWithMad);\n\t\tMad1 applicationDirectory = (Mad1)readerWriter.getApplicationDirectory(MAD_KEY_CONFIG);\n\t\tapplicationDirectory.updateCrc();\n\t\tassertEquals((byte)0xf3, applicationDirectory.madDat...
{ "fields": [ { "declarator": "madData = new byte[32]", "modifier": "protected", "original_string": "protected byte[] madData = new byte[32];", "type": "byte[]", "var_name": "madData" }, { "declarator": "trailerBlock", "modifier": "private", "original_string...
{ "body": "protected void updateCrc() {\n\t\tif (isReadonly())\n\t\t\tthrow new IllegalStateException(\"cannot modify readonly mad\");\n\t\tmadData[0] = createCrc(madData);\n\t}", "class_method_signature": "Mad1.updateCrc()", "constructor": false, "full_signature": "protected void updateCrc()", "identifier": ...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_2
{ "fields": [ { "declarator": "tag", "modifier": "private", "original_string": "private InMemoryTag tag;", "type": "InMemoryTag", "var_name": "tag" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "private AcrMfUlReaderWriter read...
{ "body": "@Test\n\tpublic void testFormat() throws Exception {\n\t\tfor (Config config : FORMAT_TEST) {\n\t\t\tinit(config);\n\t\t\tndefOperations.format();\n\t\t\tassertArrayEquals(config.toString(), expectedTag.getMemoryMap().getMemory(), tag.getMemoryMap().getMemory());\n\t\t}\n\t}", "class_method_signature": "...
{ "fields": [ { "declarator": "memoryLayout", "modifier": "private", "original_string": "private MemoryLayout memoryLayout;", "type": "MemoryLayout", "var_name": "memoryLayout" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n\tpublic void format(Record... records) {\n\t\ttry {\n\t\t\tformatCapabilityBlock();\n\t\t\twriteNdefMessage(records);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tthrow new NfcException(e);\n\t\t}\n\t}", "class_method_signature": "Type2NdefOperations.format(Record... records)", "constructor":...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_3
{ "fields": [ { "declarator": "tag", "modifier": "private", "original_string": "private InMemoryTag tag;", "type": "InMemoryTag", "var_name": "tag" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "private AcrMfUlReaderWriter read...
{ "body": "@Test\n\tpublic void testMakeReadOnly() throws Exception {\n\t\tfor (Config config : MAKE_READ_ONLY_TEST) {\n\t\t\tinit(config);\n\t\t\tassertTrue(ndefOperations.isWritable());\n\t\t\tndefOperations.makeReadOnly();\n\t\t\tassertFalse(ndefOperations.isWritable());\n\t\t\tassertArrayEquals(expectedTag.getMem...
{ "fields": [ { "declarator": "memoryLayout", "modifier": "private", "original_string": "private MemoryLayout memoryLayout;", "type": "MemoryLayout", "var_name": "memoryLayout" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n\tpublic void makeReadOnly() {\n\t\tassertWritable();\n\t\tassertFormatted();\n\t\tsetLockBytes();\n\t\twritable = false;\n\t}", "class_method_signature": "Type2NdefOperations.makeReadOnly()", "constructor": false, "full_signature": "@Override public void makeReadOnly()", "identifier": "...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_14
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/mf/classic/ClassicHandlerTest.java", "identifier": "ClassicHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testIsFormattedWritable() throws Exception {\n\t\tApplicationDirectory applicationDirectory = ReaderWriterCreator.createReadWriter(\"mfstd1k_ndef.txt\",\n\t\t\t\tMemoryLayout.CLASSIC_1K).getApplicationDirectory();\n\t\tassertTrue(ClassicHandler.isFormattedWritable(applicationDirectory....
{ "fields": [], "file": "nfctools-core/src/main/java/org/nfctools/mf/classic/ClassicHandler.java", "identifier": "ClassicHandler", "interfaces": "", "methods": [ { "class_method_signature": "ClassicHandler.isBlank(MfClassicReaderWriter readerWriter)", "constructor": false, "full_signatur...
{ "body": "public static boolean isFormattedWritable(Application application, KeyValue keyValue) throws IOException {\n\t\ttry {\n\t\t\tTrailerBlock trailerBlock = application.readTrailer(keyValue);\n\t\t\tfor (int dataArea = 0; dataArea < 3; dataArea++) {\n\t\t\t\tif (!trailerBlock.canWriteDataBlock(keyValue.getKey(...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_34
{ "fields": [], "file": "nfctools-p2p/src/test/java/org/nfctools/ndefpush/LlcpTargetListenerTest.java", "identifier": "LlcpTargetListenerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testExtractLlcParameters() throws Exception {\n\n\t\tbyte[] generalBytes = { 0x1E, (byte)0xD4, 0x00, 0x01, (byte)0xFE, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t\t\t0x00, 0x00, 0x00, 0x00, 0x32, 0x46, 0x66, 0x6D, 0x01, 0x01, 0x10, 0x03, 0x02, 0x00, 0x01, 0x04, 0x01,\n\t\t\t\t(byte...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(getClass())", "modifier": "private", "original_string": "private Logger log = LoggerFactory.getLogger(getClass());", "type": "Logger", "var_name": "log" }, { "declarator": "llcHeader = { 0x46, 0x66, 0x6D }", ...
{ "body": "protected Object[] extractLlcParameters(byte[] incomingGeneralBytes) {\n\t\tbyte[] incomingLlcParameters = {};\n\t\tfor (int x = 0; x <= incomingGeneralBytes.length - llcHeader.length; x++) {\n\t\t\tboolean match = true;\n\t\t\tfor (int h = 0; h < llcHeader.length; h++) {\n\t\t\t\tif (incomingGeneralBytes[...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_22
{ "fields": [ { "declarator": "emptyRecord = \"D00000\"", "modifier": "private", "original_string": "private String emptyRecord = \"D00000\";", "type": "String", "var_name": "emptyRecord" }, { "declarator": "twoEmptyRecords = \"900000500000\"", "modifier": "privat...
{ "body": "@Test\n\tpublic void testTwoEmptyRecords() throws Exception {\n\t\tbyte[] data = NfcUtils.convertASCIIToBin(twoEmptyRecords);\n\t\tNdefMessage ndefMessage = decoder.decode(data);\n\t\tassertTrue(ndefMessage.getNdefRecords().length == 2);\n\t}", "class_method_signature": "NdefMessageDecoderTest.testTwoEmp...
{ "fields": [ { "declarator": "ndefRecordDecoder", "modifier": "private", "original_string": "private NdefRecordDecoder ndefRecordDecoder;", "type": "NdefRecordDecoder", "var_name": "ndefRecordDecoder" } ], "file": "nfctools-ndef/src/main/java/org/nfctools/ndef/NdefMessageDec...
{ "body": "public NdefMessage decode(byte[] ndefMessage) {\n\t\treturn decode(ndefMessage, 0, ndefMessage.length);\n\t}", "class_method_signature": "NdefMessageDecoder.decode(byte[] ndefMessage)", "constructor": false, "full_signature": "public NdefMessage decode(byte[] ndefMessage)", "identifier": "decode", ...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_18
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/spi/acs/AcsTagUtilsTest.java", "identifier": "AcsTagUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testIdentifyTagType() throws Exception {\n\t\tassertEquals(TagType.NFCIP,\n\t\t\t\tAcsTagUtils.identifyTagType(NfcUtils.convertASCIIToBin(\"804F0CA00000030603FF4000000000\")));\n\t}", "class_method_signature": "AcsTagUtilsTest.testIdentifyTagType()", "constructor": false, "full_s...
{ "fields": [], "file": "nfctools-core/src/main/java/org/nfctools/spi/acs/AcsTagUtils.java", "identifier": "AcsTagUtils", "interfaces": "", "methods": [ { "class_method_signature": "AcsTagUtils.identifyTagType(byte[] historicalBytes)", "constructor": false, "full_signature": "public stat...
{ "body": "public static TagType identifyTagType(byte[] historicalBytes) {\n\t\tTagType tagType = TagType.UNKNOWN;\n\t\tif (historicalBytes.length >= 11) {\n\t\t\tint tagId = (historicalBytes[9] & 0xff) << 8 | historicalBytes[10];\n\t\t\tswitch (tagId) {\n\t\t\t\tcase 0x0001:\n\t\t\t\t\treturn TagType.MIFARE_CLASSIC_...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_13
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/mf/classic/ClassicHandlerTest.java", "identifier": "ClassicHandlerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testIsBlank() throws Exception {\n\t\tassertTrue(ClassicHandler.isBlank(ReaderWriterCreator.createReadWriter(\"mfstd1k_blank.txt\",\n\t\t\t\tMemoryLayout.CLASSIC_1K)));\n\t\tassertTrue(ClassicHandler.isBlank(ReaderWriterCreator.createReadWriter(\"mfstd4k_blank.txt\",\n\t\t\t\tMemoryLay...
{ "fields": [], "file": "nfctools-core/src/main/java/org/nfctools/mf/classic/ClassicHandler.java", "identifier": "ClassicHandler", "interfaces": "", "methods": [ { "class_method_signature": "ClassicHandler.isBlank(MfClassicReaderWriter readerWriter)", "constructor": false, "full_signatur...
{ "body": "public static boolean isBlank(MfClassicReaderWriter readerWriter) throws IOException {\n\t\ttry {\n\t\t\tMemoryLayout memoryLayout = readerWriter.getMemoryLayout();\n\t\t\tfor (int sector = 0; sector < memoryLayout.getSectors(); sector++) {\n\t\t\t\tTrailerBlock trailerBlock = readTrailerBlock(readerWriter...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_4
{ "fields": [ { "declarator": "tag", "modifier": "private", "original_string": "private InMemoryTag tag;", "type": "InMemoryTag", "var_name": "tag" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "private AcrMfUlReaderWriter read...
{ "body": "@Test\n\tpublic void testWriteNdefMessages() throws Exception {\n\t\tfor (Config config : WRITE_TEST) {\n\t\t\tinit(config);\n\t\t\tndefOperations.writeNdefMessage(new UriRecord(\"http://example.com/some/more/more/1234/data.html\"));\n\t\t\tassertArrayEquals(expectedTag.getMemoryMap().getMemory(), tag.getM...
{ "fields": [ { "declarator": "memoryLayout", "modifier": "private", "original_string": "private MemoryLayout memoryLayout;", "type": "MemoryLayout", "var_name": "memoryLayout" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n\tpublic void writeNdefMessage(Record... records) {\n\t\tlastReadRecords = null;\n\t\tassertWritable();\n\t\tassertFormatted();\n\t\tbyte[] bytes = convertNdefMessage(records);\n\t\twriteBufferOnTag(bytes);\n\t}", "class_method_signature": "Type2NdefOperations.writeNdefMessage(Record... record...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_29
{ "fields": [ { "declarator": "COM_ANDROID_NPP = \"com.android.npp\"", "modifier": "private static final", "original_string": "private static final String COM_ANDROID_NPP = \"com.android.npp\";", "type": "String", "var_name": "COM_ANDROID_NPP" }, { "declarator": "connec...
{ "body": "@Test\n\tpublic void testSymmetryOnIdle() throws Exception {\n\t\tAbstractProtocolDataUnit protocolDataUnit = connectionManager.onLlcpActive();\n\t\tassertTrue(protocolDataUnit instanceof Symmetry);\n\t}", "class_method_signature": "LlcpConnectionManagerTest.testSymmetryOnIdle()", "constructor": false,...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(getClass())", "modifier": "private", "original_string": "private Logger log = LoggerFactory.getLogger(getClass());", "type": "Logger", "var_name": "log" }, { "declarator": "SERVICE_DISCOVERY_ADDRESS = 1", ...
{ "body": "public AbstractProtocolDataUnit onLlcpActive() {\n\t\t// TODO make messageToSend method local variable, implement Llcp interface similar to SnepAgent\n\t\tmessageToSend = new Symmetry();\n\t\thandlePendingConnectionTimeout();\n\t\tif (pendingConnections.isEmpty()) {\n\t\t\tserviceDiscovery.onLlcpActive(thi...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_8
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/mf/ul/MemoryMapTest.java", "identifier": "MemoryMapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testLoadFile() throws Exception {\n\t\tMemoryMap memoryMap = FileMfUlReader.loadCardFromFile(\"mfulc_formatted.txt\");\n\t\tassertArrayEquals(new byte[] { 0x04, (byte)0xCE, (byte)0x8F, (byte)0xCD }, memoryMap.getPage(0));\n\t\tassertArrayEquals(new byte[] { (byte)0xE1, 0x10, 0x12, 0x00...
{ "fields": [ { "declarator": "bytesPerPage", "modifier": "private", "original_string": "private int bytesPerPage;", "type": "int", "var_name": "bytesPerPage" }, { "declarator": "memory", "modifier": "private", "original_string": "private byte[][] memory;", ...
{ "body": "public byte[] getPage(int pageNo) {\n\t\treturn memory[pageNo];\n\t}", "class_method_signature": "MemoryMap.getPage(int pageNo)", "constructor": false, "full_signature": "public byte[] getPage(int pageNo)", "identifier": "getPage", "invocations": [], "modifiers": "public", "parameters": "(int...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_25
{ "fields": [ { "declarator": "encoder = NdefContext.getNdefMessageEncoder()", "modifier": "private", "original_string": "private NdefMessageEncoder encoder = NdefContext.getNdefMessageEncoder();", "type": "NdefMessageEncoder", "var_name": "encoder" } ], "file": "nfctools-nde...
{ "body": "@Test(expected = RuntimeException.class)\n\tpublic void testEncoderWithUnkownRecord() throws Exception {\n\n\t\tList<Record> records = new ArrayList<Record>();\n\t\trecords.add(new UnknownRecord());\n\t\tencoder.encode(records);\n\t}", "class_method_signature": "NdefMessageEncoderTest.testEncoderWithUnko...
{ "fields": [ { "declarator": "MAX_LENGTH_FOR_SHORT_RECORD = 255", "modifier": "private static final", "original_string": "private static final int MAX_LENGTH_FOR_SHORT_RECORD = 255;", "type": "int", "var_name": "MAX_LENGTH_FOR_SHORT_RECORD" }, { "declarator": "ndefReco...
{ "body": "public byte[] encode(Record... records) {\n\t\treturn encode(Arrays.asList(records));\n\t}", "class_method_signature": "NdefMessageEncoder.encode(Record... records)", "constructor": false, "full_signature": "public byte[] encode(Record... records)", "identifier": "encode", "invocations": [ "e...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_33
{ "fields": [], "file": "nfctools-p2p/src/test/java/org/nfctools/snep/FragmentIteratorTest.java", "identifier": "FragmentIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testNext() throws Exception {\n\n\t\tFragmentIterator iterator = new FragmentIterator(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, 4);\n\n\t\tassertTrue(iterator.hasNext());\n\n\t\tassertArrayEquals(new byte[] { 1, 2, 3, 4 }, iterator.next());\n\t\tassertTrue(iterator.hasNext());\n\t\...
{ "fields": [ { "declarator": "data", "modifier": "private", "original_string": "private byte[] data;", "type": "byte[]", "var_name": "data" }, { "declarator": "maxFragmentSize", "modifier": "private", "original_string": "private int maxFragmentSize;", ...
{ "body": "@Override\n\tpublic byte[] next() {\n\t\tbyte[] buffer = new byte[Math.min(data.length - offset, maxFragmentSize)];\n\t\tSystem.arraycopy(data, offset, buffer, 0, buffer.length);\n\t\toffset += buffer.length;\n\t\treturn buffer;\n\t}", "class_method_signature": "FragmentIterator.next()", "constructor":...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_32
{ "fields": [], "file": "nfctools-p2p/src/test/java/org/nfctools/snep/FragmentReaderTest.java", "identifier": "FragmentReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testIsComplete() throws Exception {\n\n\t\tbyte[] f1 = NfcUtils.convertASCIIToBin(\"100200000011\");\n\t\tbyte[] f2 = NfcUtils.convertASCIIToBin(\"D1010D55016E\");\n\t\tbyte[] f3 = NfcUtils.convertASCIIToBin(\"6663746F6F6C\");\n\t\tbyte[] f4 = NfcUtils.convertASCIIToBin(\"732E6F7267\")...
{ "fields": [ { "declarator": "fragmentCount = 0", "modifier": "private", "original_string": "private int fragmentCount = 0;", "type": "int", "var_name": "fragmentCount" }, { "declarator": "expectedLength", "modifier": "private", "original_string": "private ...
{ "body": "public boolean isComplete() {\n\t\treturn out.size() == expectedLength;\n\t}", "class_method_signature": "FragmentReader.isComplete()", "constructor": false, "full_signature": "public boolean isComplete()", "identifier": "isComplete", "invocations": [ "size" ], "modifiers": "public", "p...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_24
{ "fields": [ { "declarator": "emptyRecord = \"D00000\"", "modifier": "private", "original_string": "private String emptyRecord = \"D00000\";", "type": "String", "var_name": "emptyRecord" }, { "declarator": "twoEmptyRecords = \"900000500000\"", "modifier": "privat...
{ "body": "@Test\n\tpublic void testDecodeExternalType() throws Exception {\n\t\tbyte[] data = NfcUtils.convertASCIIToBin(\"D40F13616E64726F69642E636F6D3A706B67\"\n\t\t\t\t+ \"64652E6772756E6469642E7465737431323334\");\n\t\tNdefMessage ndefMessage = decoder.decode(data);\n\t\tassertTrue(ndefMessage.getNdefRecords().l...
{ "fields": [ { "declarator": "ndefRecordDecoder", "modifier": "private", "original_string": "private NdefRecordDecoder ndefRecordDecoder;", "type": "NdefRecordDecoder", "var_name": "ndefRecordDecoder" } ], "file": "nfctools-ndef/src/main/java/org/nfctools/ndef/NdefMessageDec...
{ "body": "public NdefMessage decode(byte[] ndefMessage) {\n\t\treturn decode(ndefMessage, 0, ndefMessage.length);\n\t}", "class_method_signature": "NdefMessageDecoder.decode(byte[] ndefMessage)", "constructor": false, "full_signature": "public NdefMessage decode(byte[] ndefMessage)", "identifier": "decode", ...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_9
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/mf/classic/MfClassicNfcTagListenerTest.java", "identifier": "MfClassicNfcTagListenerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testCreateNdefOperations() throws Exception {\n\t\tMemoryMap memoryMap = FileMfClassicReader.loadCardFromFile(\"mfstd1k_blank.txt\");\n\t\tInMemoryTag tag = new InMemoryTag(memoryMap);\n\n\t\tMfClassicNfcTagListener nfcTagListener = new MfClassicNfcTagListener();\n\n\t\tMfClassicNdefOp...
{ "fields": [ { "declarator": "ndefListener", "modifier": "private", "original_string": "private NdefOperationsListener ndefListener;", "type": "NdefOperationsListener", "var_name": "ndefListener" } ], "file": "nfctools-core/src/main/java/org/nfctools/mf/classic/MfClassicNfcT...
{ "body": "protected MfClassicNdefOperations createNdefOperations(ApduTag tag, MemoryLayout memoryLayout) {\n\t\tboolean formatted = false;\n\t\tboolean writable = false;\n\t\tMfClassicReaderWriter readerWriter = new AcrMfClassicReaderWriter(tag, memoryLayout);\n\t\tTagInfo tagInfo = null;\n\t\ttry {\n\t\t\ttagInfo =...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_28
{ "fields": [ { "declarator": "encoder = NdefContext.getNdefMessageEncoder()", "modifier": "private", "original_string": "private NdefMessageEncoder encoder = NdefContext.getNdefMessageEncoder();", "type": "NdefMessageEncoder", "var_name": "encoder" } ], "file": "nfctools-nde...
{ "body": "@Test\n\tpublic void testEncodeExternalType() throws Exception {\n\t\tbyte[] single = encoder.encodeSingle(new UnsupportedExternalTypeRecord(\"android.com:pkg\", \"de.grundid.test1234\"));\n\t\tassertEquals(\"D40F13616E64726F69642E636F6D3A706B6764652E6772756E6469642E7465737431323334\",\n\t\t\t\tNfcUtils.co...
{ "fields": [ { "declarator": "MAX_LENGTH_FOR_SHORT_RECORD = 255", "modifier": "private static final", "original_string": "private static final int MAX_LENGTH_FOR_SHORT_RECORD = 255;", "type": "int", "var_name": "MAX_LENGTH_FOR_SHORT_RECORD" }, { "declarator": "ndefReco...
{ "body": "public byte[] encodeSingle(Record record) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tencodeSingle(record, baos);\n\t\treturn baos.toByteArray();\n\t}", "class_method_signature": "NdefMessageEncoder.encodeSingle(Record record)", "constructor": false, "full_signature": "publi...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_5
{ "fields": [ { "declarator": "tag", "modifier": "private", "original_string": "private InMemoryTag tag;", "type": "InMemoryTag", "var_name": "tag" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "private AcrMfUlReaderWriter read...
{ "body": "@Test\n\tpublic void testWriteNdefMessagesTooLong() throws Exception {\n\t\tfor (Config config : WRITE_TEST) {\n\t\t\ttry {\n\t\t\t\tinit(config);\n\t\t\t\tndefOperations.writeNdefMessage(new UriRecord(\"http://example.com/some/more/data.html?\"\n\t\t\t\t\t\t+ \"someparameter=test&someparameter=test&somepa...
{ "fields": [ { "declarator": "memoryLayout", "modifier": "private", "original_string": "private MemoryLayout memoryLayout;", "type": "MemoryLayout", "var_name": "memoryLayout" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n\tpublic void writeNdefMessage(Record... records) {\n\t\tlastReadRecords = null;\n\t\tassertWritable();\n\t\tassertFormatted();\n\t\tbyte[] bytes = convertNdefMessage(records);\n\t\twriteBufferOnTag(bytes);\n\t}", "class_method_signature": "Type2NdefOperations.writeNdefMessage(Record... record...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_12
{ "fields": [ { "declarator": "ndefOperations", "modifier": "private", "original_string": "private MfClassicNdefOperations ndefOperations;", "type": "MfClassicNdefOperations", "var_name": "ndefOperations" }, { "declarator": "readerWriter", "modifier": "private", ...
{ "body": "@Test\n\tpublic void testMakeReadOnly() throws Exception {\n\t\tfor (Config config : MAKE_READ_ONLY_TEST) {\n\t\t\tinit(config);\n\t\t\tassertTrue(ndefOperations.isWritable());\n\t\t\tndefOperations.makeReadOnly();\n\t\t\tassertFalse(ndefOperations.isWritable());\n\t\t\tassertArrayEquals(expectedTag.getMem...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(getClass())", "modifier": "private", "original_string": "private Logger log = LoggerFactory.getLogger(getClass());", "type": "Logger", "var_name": "log" }, { "declarator": "readerWriter", "modifier": "pr...
{ "body": "@Override\n\tpublic void makeReadOnly() {\n\t\tassertFormatted();\n\t\tassertWritable();\n\t\ttry {\n\t\t\tApplication application = getApplication();\n\t\t\tapplication.getApplicationDirectory().makeReadOnly();\n\t\t\tapplication.makeReadOnly(new KeyValue(Key.B, writeKey));\n\t\t\twritable = false;\n\t\t}...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_6
{ "fields": [ { "declarator": "tag", "modifier": "private", "original_string": "private InMemoryTag tag;", "type": "InMemoryTag", "var_name": "tag" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "private AcrMfUlReaderWriter read...
{ "body": "@Test\n\tpublic void testReadNdefMessages() throws Exception {\n\t\tfor (Config config : READ_TEST) {\n\t\t\tinit(config);\n\t\t\tList<Record> ndefMessage = ndefOperations.readNdefMessage();\n\t\t\tassertEquals(1, ndefMessage.size());\n\t\t\tUriRecord record = (UriRecord)ndefMessage.get(0);\n\t\t\tassertEq...
{ "fields": [ { "declarator": "memoryLayout", "modifier": "private", "original_string": "private MemoryLayout memoryLayout;", "type": "MemoryLayout", "var_name": "memoryLayout" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n\tpublic List<Record> readNdefMessage() {\n\t\tassertFormatted();\n\t\tif (lastReadRecords != null) {\n\t\t\treturn lastReadRecords;\n\t\t}\n\t\telse {\n\t\t\tTypeLengthValueReader reader = new TypeLengthValueReader(new TagInputStream(memoryLayout, readerWriter));\n\t\t\tconvertRecords(reader);\...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_11
{ "fields": [ { "declarator": "ndefOperations", "modifier": "private", "original_string": "private MfClassicNdefOperations ndefOperations;", "type": "MfClassicNdefOperations", "var_name": "ndefOperations" }, { "declarator": "readerWriter", "modifier": "private", ...
{ "body": "@Test\n\tpublic void testFormat() throws Exception {\n\t\tfor (Config config : FORMAT_TEST) {\n\t\t\tinit(config);\n\t\t\tassertFalse(ndefOperations.isFormatted());\n\t\t\tndefOperations.format();\n\t\t\tassertTrue(ndefOperations.isFormatted());\n\t\t\tassertEquals(config.expectedSize, ndefOperations.getMa...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(getClass())", "modifier": "private", "original_string": "private Logger log = LoggerFactory.getLogger(getClass());", "type": "Logger", "var_name": "log" }, { "declarator": "readerWriter", "modifier": "pr...
{ "body": "@Override\n\tpublic void format(Record... records) {\n\t\tApplication application = createNewApplication();\n\t\twriteRecord(application, records);\n\t\tformatted = true;\n\t}", "class_method_signature": "MfClassicNdefOperations.format(Record... records)", "constructor": false, "full_signature": "@Ov...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_31
{ "fields": [ { "declarator": "COM_ANDROID_NPP = \"com.android.npp\"", "modifier": "private static final", "original_string": "private static final String COM_ANDROID_NPP = \"com.android.npp\";", "type": "String", "var_name": "COM_ANDROID_NPP" }, { "declarator": "connec...
{ "body": "@Test\n\tpublic void testConnectWellKnownService() throws Exception {\n\t\tconnectionManager.registerWellKnownServiceAccessPoint(COM_ANDROID_NPP, new DummyServiceAccessPoint());\n\t\tConnect connect = new Connect(0x01, 0x32, new ServiceName(COM_ANDROID_NPP));\n\t\tAbstractProtocolDataUnit processPdu = conn...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(getClass())", "modifier": "private", "original_string": "private Logger log = LoggerFactory.getLogger(getClass());", "type": "Logger", "var_name": "log" }, { "declarator": "SERVICE_DISCOVERY_ADDRESS = 1", ...
{ "body": "public void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint) {\n\t\tserviceDiscovery.registerSerivce(serviceName, serviceAccessPoint);\n\t}", "class_method_signature": "LlcpConnectionManager.registerWellKnownServiceAccessPoint(String serviceName, ServiceAcces...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_27
{ "fields": [ { "declarator": "encoder = NdefContext.getNdefMessageEncoder()", "modifier": "private", "original_string": "private NdefMessageEncoder encoder = NdefContext.getNdefMessageEncoder();", "type": "NdefMessageEncoder", "var_name": "encoder" } ], "file": "nfctools-nde...
{ "body": "@Test\n\tpublic void testEncodeSingle() throws Exception {\n\n\t\tbyte[] single = encoder.encodeSingle(new UriRecord(\n\t\t\t\t\"http://www.verylongurl.com/aljhsldfkjhasldfkhjaljhsldfkjhasldf\"\n\t\t\t\t\t\t+ \"khjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjal\"\n\t\t\t\t\t\...
{ "fields": [ { "declarator": "MAX_LENGTH_FOR_SHORT_RECORD = 255", "modifier": "private static final", "original_string": "private static final int MAX_LENGTH_FOR_SHORT_RECORD = 255;", "type": "int", "var_name": "MAX_LENGTH_FOR_SHORT_RECORD" }, { "declarator": "ndefReco...
{ "body": "public byte[] encodeSingle(Record record) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tencodeSingle(record, baos);\n\t\treturn baos.toByteArray();\n\t}", "class_method_signature": "NdefMessageEncoder.encodeSingle(Record record)", "constructor": false, "full_signature": "publi...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_26
{ "fields": [ { "declarator": "encoder = NdefContext.getNdefMessageEncoder()", "modifier": "private", "original_string": "private NdefMessageEncoder encoder = NdefContext.getNdefMessageEncoder();", "type": "NdefMessageEncoder", "var_name": "encoder" } ], "file": "nfctools-nde...
{ "body": "@Test\n\tpublic void testEncodeMultiple() throws Exception {\n\t\tbyte[] encode = encoder.encode(new TextRecord(\"R1\", Locale.GERMANY), new TextRecord(\"R2\", Locale.GERMANY));\n\t\tassertEquals(\"910108540564652D44455231510108540564652D44455232\", NfcUtils.convertBinToASCII(encode));\n\t}", "class_meth...
{ "fields": [ { "declarator": "MAX_LENGTH_FOR_SHORT_RECORD = 255", "modifier": "private static final", "original_string": "private static final int MAX_LENGTH_FOR_SHORT_RECORD = 255;", "type": "int", "var_name": "MAX_LENGTH_FOR_SHORT_RECORD" }, { "declarator": "ndefReco...
{ "body": "public byte[] encode(Record... records) {\n\t\treturn encode(Arrays.asList(records));\n\t}", "class_method_signature": "NdefMessageEncoder.encode(Record... records)", "constructor": false, "full_signature": "public byte[] encode(Record... records)", "identifier": "encode", "invocations": [ "e...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_30
{ "fields": [ { "declarator": "COM_ANDROID_NPP = \"com.android.npp\"", "modifier": "private static final", "original_string": "private static final String COM_ANDROID_NPP = \"com.android.npp\";", "type": "String", "var_name": "COM_ANDROID_NPP" }, { "declarator": "connec...
{ "body": "@Test\n\tpublic void testConnectWellKnownServiceWithServiceUnavailable() throws Exception {\n\t\tDummyServiceAccessPoint serviceAccessPoint = new DummyServiceAccessPoint(COM_ANDROID_NPP);\n\t\tserviceAccessPoint.setAcceptConnections(false);\n\t\tconnectionManager.registerWellKnownServiceAccessPoint(COM_AND...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(getClass())", "modifier": "private", "original_string": "private Logger log = LoggerFactory.getLogger(getClass());", "type": "Logger", "var_name": "log" }, { "declarator": "SERVICE_DISCOVERY_ADDRESS = 1", ...
{ "body": "public void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint) {\n\t\tserviceDiscovery.registerSerivce(serviceName, serviceAccessPoint);\n\t}", "class_method_signature": "LlcpConnectionManager.registerWellKnownServiceAccessPoint(String serviceName, ServiceAcces...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_10
{ "fields": [ { "declarator": "ndefOperations", "modifier": "private", "original_string": "private MfClassicNdefOperations ndefOperations;", "type": "MfClassicNdefOperations", "var_name": "ndefOperations" }, { "declarator": "readerWriter", "modifier": "private", ...
{ "body": "@Test\n\tpublic void testReadNewMessages() throws Exception {\n\t\tfor (Config config : READ_TEST) {\n\t\t\tinit(config);\n\t\t\tList<Record> ndefMessage = ndefOperations.readNdefMessage();\n\t\t\tassertEquals(1, ndefMessage.size());\n\t\t\t//\t\t\tSystem.out.println(ndefMessage.get(0));\n\t\t\t//\t\t\tSma...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(getClass())", "modifier": "private", "original_string": "private Logger log = LoggerFactory.getLogger(getClass());", "type": "Logger", "var_name": "log" }, { "declarator": "readerWriter", "modifier": "pr...
{ "body": "@Override\n\tpublic List<Record> readNdefMessage() {\n\t\tassertFormatted();\n\t\tif (lastReadRecords != null) {\n\t\t\treturn lastReadRecords;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tApplication application = getApplication();\n\t\t\t\t// TODO create TagInputStream for better performance\n\t\t\t\tbyte[] ...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_7
{ "fields": [ { "declarator": "tag", "modifier": "private", "original_string": "private InMemoryTag tag;", "type": "InMemoryTag", "var_name": "tag" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "private AcrMfUlReaderWriter read...
{ "body": "@Test\n\tpublic void testReadNdefMessagesEmpty() throws Exception {\n\t\tfor (Config config : READ_EMPTY_TEST) {\n\t\t\tinit(config);\n\t\t\tList<Record> ndefMessage = ndefOperations.readNdefMessage();\n\t\t\tassertEquals(0, ndefMessage.size());\n\t\t}\n\t}", "class_method_signature": "Type2NdefOperation...
{ "fields": [ { "declarator": "memoryLayout", "modifier": "private", "original_string": "private MemoryLayout memoryLayout;", "type": "MemoryLayout", "var_name": "memoryLayout" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n\tpublic List<Record> readNdefMessage() {\n\t\tassertFormatted();\n\t\tif (lastReadRecords != null) {\n\t\t\treturn lastReadRecords;\n\t\t}\n\t\telse {\n\t\t\tTypeLengthValueReader reader = new TypeLengthValueReader(new TagInputStream(memoryLayout, readerWriter));\n\t\t\tconvertRecords(reader);\...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_21
{ "fields": [ { "declarator": "emptyRecord = \"D00000\"", "modifier": "private", "original_string": "private String emptyRecord = \"D00000\";", "type": "String", "var_name": "emptyRecord" }, { "declarator": "twoEmptyRecords = \"900000500000\"", "modifier": "privat...
{ "body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void testEmptyRecordWithBeginingOnly() throws Exception {\n\t\tbyte[] data = NfcUtils.convertASCIIToBin(emptyRecordWithBeginingOnly);\n\t\tdecoder.decode(data);\n\t}", "class_method_signature": "NdefMessageDecoderTest.testEmptyRecordWithBeginingO...
{ "fields": [ { "declarator": "ndefRecordDecoder", "modifier": "private", "original_string": "private NdefRecordDecoder ndefRecordDecoder;", "type": "NdefRecordDecoder", "var_name": "ndefRecordDecoder" } ], "file": "nfctools-ndef/src/main/java/org/nfctools/ndef/NdefMessageDec...
{ "body": "public NdefMessage decode(byte[] ndefMessage) {\n\t\treturn decode(ndefMessage, 0, ndefMessage.length);\n\t}", "class_method_signature": "NdefMessageDecoder.decode(byte[] ndefMessage)", "constructor": false, "full_signature": "public NdefMessage decode(byte[] ndefMessage)", "identifier": "decode", ...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_0
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/tags/TagInputStreamTest.java", "identifier": "TagInputStreamTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testAvailable() throws Exception {\n\t\tInMemoryTag tag = new InMemoryTag(FileMfUlReader.loadCardFromFile(\"mful_formatted.txt\"));\n\t\tMfUlReaderWriter readerWriter = new AcrMfUlReaderWriter(tag);\n\n\t\tTagInputStream in = new TagInputStream(MemoryLayout.ULTRALIGHT, readerWriter);\n...
{ "fields": [ { "declarator": "memoryLayout", "modifier": "private", "original_string": "private MemoryLayout memoryLayout;", "type": "MemoryLayout", "var_name": "memoryLayout" }, { "declarator": "readerWriter", "modifier": "private", "original_string": "pri...
{ "body": "@Override\n\tpublic int available() throws IOException {\n\t\tif (currentBlock == null) {\n\t\t\treturn memoryLayout.getMaxSize();\n\t\t}\n\t\telse {\n\t\t\treturn (memoryLayout.getLastDataPage() - currentPage + 1) * memoryLayout.getBytesPerPage()\n\t\t\t\t\t+ (memoryLayout.getBytesPerPage() - currentByte)...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_17
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/spi/tama/TamaUtilsTest.java", "identifier": "TamaUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testUnpackPayload() throws Exception {\n\n\t\tbyte[] payload = TamaUtils.unpackPayload(NfcUtils.convertASCIIToBin(\"0000FF02FED5131800\"));\n\n\t\tassertArrayEquals(new byte[] { (byte)0xd5, 0x13 }, payload);\n\n\t}", "class_method_signature": "TamaUtilsTest.testUnpackPayload()", "c...
{ "fields": [], "file": "nfctools-core/src/main/java/org/nfctools/spi/tama/TamaUtils.java", "identifier": "TamaUtils", "interfaces": "", "methods": [ { "class_method_signature": "TamaUtils.handleStatusCode(int status)", "constructor": false, "full_signature": "public static void handleSt...
{ "body": "public static byte[] unpackPayload(byte[] message) {\n\t\tint length = message[3] & 0xff;\n\t\tbyte[] payload = new byte[length];\n\t\tSystem.arraycopy(message, 5, payload, 0, payload.length);\n\t\treturn payload;\n\t}", "class_method_signature": "TamaUtils.unpackPayload(byte[] message)", "constructor"...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_16
{ "fields": [], "file": "nfctools-core/src/test/java/org/nfctools/mf/mad/Mad2Test.java", "identifier": "Mad2Test", "interfaces": "", "superclass": "extends AbstractMadTests" }
{ "body": "@Test\n\tpublic void testMadAidSize() throws Exception {\n\t\tMfClassicReaderWriter readerWriter = loadData(blankCard);\n\t\tApplicationDirectory applicationDirectory = readerWriter.createApplicationDirectory(MAD_KEY_CONFIG);\n\n\t\tassertEquals(2, applicationDirectory.getVersion());\n\n\t\tassertTrue(appl...
{ "fields": [ { "declarator": "mad2Data = new byte[48]", "modifier": "protected", "original_string": "protected byte[] mad2Data = new byte[48];", "type": "byte[]", "var_name": "mad2Data" }, { "declarator": "trailerBlock", "modifier": "private", "original_str...
{ "body": "@Override\n\tpublic int getNumberOfSlots() {\n\t\treturn 38;\n\t}", "class_method_signature": "Mad2.getNumberOfSlots()", "constructor": false, "full_signature": "@Override public int getNumberOfSlots()", "identifier": "getNumberOfSlots", "invocations": [], "modifiers": "@Override public", "pa...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_1
{ "fields": [ { "declarator": "lockControlData = { (byte)0xA0, 0x10, 0x44 }", "modifier": "private", "original_string": "private byte[] lockControlData = { (byte)0xA0, 0x10, 0x44 };", "type": "byte[]", "var_name": "lockControlData" } ], "file": "nfctools-core/src/test/java/or...
{ "body": "@Test\n\tpublic void testLockControlTlv() throws Exception {\n\t\tLockControlTlv lockControlTlv = new LockControlTlv(lockControlData);\n\n\t\tassertEquals(0x0a, lockControlTlv.getPageAddress());\n\t\tassertEquals(0x00, lockControlTlv.getByteOffset());\n\t\tassertEquals(0x10, lockControlTlv.getSize());\n\t\...
{ "fields": [ { "declarator": "bytesLockedPerLockBit", "modifier": "private", "original_string": "private int bytesLockedPerLockBit;", "type": "int", "var_name": "bytesLockedPerLockBit" } ], "file": "nfctools-core/src/main/java/org/nfctools/mf/tlv/LockControlTlv.java", "ide...
{ "body": "public LockControlTlv() {\n\t}", "class_method_signature": "LockControlTlv.LockControlTlv()", "constructor": true, "full_signature": "public LockControlTlv()", "identifier": "LockControlTlv", "invocations": [], "modifiers": "public", "parameters": "()", "return": "", "signature": " LockC...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
3728381_20
{ "fields": [ { "declarator": "emptyRecord = \"D00000\"", "modifier": "private", "original_string": "private String emptyRecord = \"D00000\";", "type": "String", "var_name": "emptyRecord" }, { "declarator": "twoEmptyRecords = \"900000500000\"", "modifier": "privat...
{ "body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void testMixedUpRecords() throws Exception {\n\t\tbyte[] data = NfcUtils.convertASCIIToBin(twoEmptyRecordsMixedUp);\n\t\tdecoder.decode(data);\n\t}", "class_method_signature": "NdefMessageDecoderTest.testMixedUpRecords()", "constructor": false,...
{ "fields": [ { "declarator": "ndefRecordDecoder", "modifier": "private", "original_string": "private NdefRecordDecoder ndefRecordDecoder;", "type": "NdefRecordDecoder", "var_name": "ndefRecordDecoder" } ], "file": "nfctools-ndef/src/main/java/org/nfctools/ndef/NdefMessageDec...
{ "body": "public NdefMessage decode(byte[] ndefMessage) {\n\t\treturn decode(ndefMessage, 0, ndefMessage.length);\n\t}", "class_method_signature": "NdefMessageDecoder.decode(byte[] ndefMessage)", "constructor": false, "full_signature": "public NdefMessage decode(byte[] ndefMessage)", "identifier": "decode", ...
{ "created": null, "fork": null, "fork_count": 89, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 3728381, "size": 1751, "stargazer_count": 267, "stars": null, "updates": null, "url": "https://github.com/grundid/nfctools" }
134901201_13
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedPackageOverridesExcludedPackage() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_PACKAGES, \"com.example.pkgA\");\n properties.put(OASConfig.SCAN_EXCLUDE_PACKAGES, \"com.example\");\n OpenApiConfig...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_1
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAcceptsEmptyConfig() {\n Map<String, Object> properties = new HashMap<>();\n OpenApiConfig config = IndexScannerTestBase.dynamicConfig(properties);\n FilteredIndexView view = new FilteredIndexView(null, config);\n assertTrue(view.accepts(DotName.create...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_0
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/io/schema/SchemaFactoryTest.java", "identifier": "SchemaFactoryTest", "interfaces": "", "superclass": "extends IndexScannerTestBase" }
{ "body": "@Test\n public void testResolveAsyncType() {\n Index index = indexOf();\n Type STRING_TYPE = Type.create(DotName.createSimple(String.class.getName()), Type.Kind.CLASS);\n Type target = ParameterizedType.create(DotName.createSimple(CompletableFuture.class.getName()),\n ...
{ "fields": [], "file": "core/src/main/java/io/smallrye/openapi/runtime/io/schema/SchemaFactory.java", "identifier": "SchemaFactory", "interfaces": "", "methods": [ { "class_method_signature": "SchemaFactory.SchemaFactory()", "constructor": true, "full_signature": "private SchemaFactory...
{ "body": "static Type resolveAsyncType(final AnnotationScannerContext context, Type type,\n List<AnnotationScannerExtension> extensions) {\n if (type.kind() == Type.Kind.PARAMETERIZED_TYPE) {\n ParameterizedType pType = type.asParameterizedType();\n if (pType.arguments().size(...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_12
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedPackageDoesNotMatch() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_PACKAGES, \"example.pkgA$\");\n OpenApiConfig config = IndexScannerTestBase.dynamicConfig(properties);\n FilteredIndexView view ...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_15
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedClassesImpliesOtherClassesExcluded() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"^com.example.pkgA.My(Bean|Class)$\");\n OpenApiConfig config = IndexScannerTestBase.dynamicConfig(properties)...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_7
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_ExcludedSimpleClassPattern_IncludedClassLongerMatch() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"(?:example.pkgA.My.*)$\");\n properties.put(OASConfig.SCAN_EXCLUDE_CLASSES, \"pkgA.MyImpl$\");\n ...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_19
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/spi/OASFactoryResolverImplTest.java", "identifier": "OASFactoryResolverImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateObject_License() {\n License license = OASFactory.createObject(License.class).name(\"Test License\").url(\"urn:test-url\");\n Assert.assertNotNull(license);\n Assert.assertEquals(LicenseImpl.class, license.getClass());\n Assert.assertEquals(\"Tes...
{ "fields": [ { "declarator": "registry = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<Class<? extends Constructible>, Class<? extends Constructible>> registry = new HashMap<>();", "type": "Map<Class<? extends Constructible>, Class<? ex...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends Constructible> T createObject(Class<T> clazz) {\n if (clazz == null) {\n throw new NullPointerException();\n }\n\n Class<? extends Constructible> implClass = registry.get(clazz);\n\n if (implClass ...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_18
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/spi/OASFactoryResolverImplTest.java", "identifier": "OASFactoryResolverImplTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n @Test\n public void testCreateObject_All() {\n Class modelClasses[] = { APIResponse.class, APIResponses.class, Callback.class, Components.class,\n Contact.class, Content.class, Discriminator.class, Encoding.class, Example.clas...
{ "fields": [ { "declarator": "registry = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<Class<? extends Constructible>, Class<? extends Constructible>> registry = new HashMap<>();", "type": "Map<Class<? extends Constructible>, Class<? ex...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends Constructible> T createObject(Class<T> clazz) {\n if (clazz == null) {\n throw new NullPointerException();\n }\n\n Class<? extends Constructible> implClass = registry.get(clazz);\n\n if (implClass ...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_6
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_ExcludedSimpleClassPattern_IncludedClassShorterMatch() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"(?:pkgA.My.*)$\");\n properties.put(OASConfig.SCAN_EXCLUDE_CLASSES, \"example.pkgA.MyImpl$\");\n ...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_14
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedPackageExcludesOtherPackage() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_PACKAGES, \"com.example.pkgA\");\n OpenApiConfig config = IndexScannerTestBase.dynamicConfig(properties);\n FilteredInde...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_5
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_ExcludedSimpleClassPattern_NotIncludedClassMatch() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_EXCLUDE_CLASSES, \"example.pkgA.MyImpl$\");\n OpenApiConfig config = IndexScannerTestBase.dynamicConfig(properties...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_17
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/api/util/FilterUtilTest.java", "identifier": "FilterUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testApplyFilter() throws Exception {\n URL beforeUrl = FilterUtilTest.class.getResource(\"filter-before.json\");\n URL afterUrl = FilterUtilTest.class.getResource(\"filter-after.json\");\n\n OpenAPI model = OpenApiParser.parse(beforeUrl);\n OASFilter filte...
{ "fields": [], "file": "core/src/main/java/io/smallrye/openapi/api/util/FilterUtil.java", "identifier": "FilterUtil", "interfaces": "", "methods": [ { "class_method_signature": "FilterUtil.FilterUtil()", "constructor": true, "full_signature": "private FilterUtil()", "identifier":...
{ "body": "public static final OpenAPI applyFilter(OASFilter filter, OpenAPI model) {\n filterComponents(filter, model.getComponents());\n filterPaths(filter, model.getPaths());\n filterServers(filter, model.getServers());\n filterTags(filter, model.getTags());\n filter.filterOpenAP...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_9
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedSimpleClassPattern_ExcludedPackagePrefix() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"(?:pkgA.My(Bean|Class))$\");\n properties.put(OASConfig.SCAN_EXCLUDE_PACKAGES, \"com.example\");\n ...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_8
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedSimpleClassPattern_ExcludedPackage() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"(?:pkgA.My(Bean|Class))$\");\n properties.put(OASConfig.SCAN_EXCLUDE_PACKAGES, \"com.example.pkgA\");\n ...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_20
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/spi/OASFactoryResolverImplTest.java", "identifier": "OASFactoryResolverImplTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n @Test\n public void testCreateObject_RTE() {\n Class c = String.class;\n try {\n OASFactory.createObject(c);\n Assert.fail(\"Expected a runtime error.\");\n } catch (RuntimeException e) {\n Asse...
{ "fields": [ { "declarator": "registry = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<Class<? extends Constructible>, Class<? extends Constructible>> registry = new HashMap<>();", "type": "Map<Class<? extends Constructible>, Class<? ex...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends Constructible> T createObject(Class<T> clazz) {\n if (clazz == null) {\n throw new NullPointerException();\n }\n\n Class<? extends Constructible> implClass = registry.get(clazz);\n\n if (implClass ...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_16
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_EmptyPackage() {\n Map<String, Object> properties = new HashMap<>();\n OpenApiConfig config = IndexScannerTestBase.dynamicConfig(properties);\n FilteredIndexView view = new FilteredIndexView(null, config);\n assertTrue(view.accepts(DotName.crea...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_4
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedClassPattern_ExcludedPackage() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"^(?:com.example.pkgA.My.*)$\");\n properties.put(OASConfig.SCAN_EXCLUDE_PACKAGES, \"com.example.pkgA\");\n O...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_3
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_ExcludedClass_IncludedClassPattern() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"^(?:com.example.pkgA.My.*)$\");\n properties.put(OASConfig.SCAN_EXCLUDE_CLASSES, \"com.example.pkgA.MyImpl\");\n ...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_11
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_ExcludedPackageOverridesIncludedPackage() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_PACKAGES, \"com.example\");\n properties.put(OASConfig.SCAN_EXCLUDE_PACKAGES, \"com.example\");\n OpenApiConfig conf...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_10
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedSimpleClassPattern_ExcludedPackagePatternDoesNotMatch() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"(?:pkgA.MyBean)$\");\n properties.put(OASConfig.SCAN_EXCLUDE_PACKAGES, \"example.pkg[AB]$\...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
134901201_2
{ "fields": [], "file": "core/src/test/java/io/smallrye/openapi/runtime/scanner/FilteredIndexViewTest.java", "identifier": "FilteredIndexViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAccepts_IncludedClass_ExcludedPackage() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(OASConfig.SCAN_CLASSES, \"com.example.pkgA.MyBean,com.example.pkgA.MyClass\");\n properties.put(OASConfig.SCAN_EXCLUDE_PACKAGES, \"com.example.pkgA\...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final IndexView delegate;", "type": "IndexView", "var_name": "delegate" }, { "declarator": "scanClasses", "modifier": "private final", "original_string": "priv...
{ "body": "public boolean accepts(DotName className) {\n final boolean accept;\n final MatchHandler match = new MatchHandler(className);\n\n if (match.isQualifiedNameExcluded()) {\n /*\n * A FQCN or pattern that *fully* matched the FQCN was given in\n * `mp.open...
{ "created": "5/25/2018 8:20:58 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 134901201, "size": null, "stargazer_count": null, "stars": 16, "updates": "2020-01-24T00:41:00+00:00", "url": "https://github.com/smallrye/smallry...
1164965_92
{ "fields": [ { "declarator": "config = new PrettyConfig()", "modifier": "private static", "original_string": "private static PrettyConfig config = new PrettyConfig();", "type": "PrettyConfig", "var_name": "config" }, { "declarator": "mapping = new PrettyUrlMapping()", ...
{ "body": "@Test\n public void testGetMappingById()\n {\n PrettyUrlMapping mapping2 = config.getMappingById(\"testid\");\n assertEquals(mapping, mapping2);\n }", "class_method_signature": "PrettyConfigTest.testGetMappingById()", "constructor": false, "full_signature": "@Test public void testGetM...
{ "fields": [ { "declarator": "CONFIG_REQUEST_KEY = \"pretty_CONFIG_REQUEST_KEY\"", "modifier": "public static final", "original_string": "public static final String CONFIG_REQUEST_KEY = \"pretty_CONFIG_REQUEST_KEY\";", "type": "String", "var_name": "CONFIG_REQUEST_KEY" }, { ...
{ "body": "public PrettyUrlMapping getMappingById(String id)\n {\n if (id != null)\n {\n if (id.startsWith(PrettyContext.PRETTY_PREFIX))\n {\n id = id.substring(PrettyContext.PRETTY_PREFIX.length());\n }\n for (PrettyUrlMapping mapping : getMappings())\n ...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_84
{ "fields": [ { "declarator": "parser = new UrlPatternParser(\n \"/project/#{paramsBean.project}/#{paramsBean.project}/#{paramsBean.story}\")", "modifier": "", "original_string": "UrlPatternParser parser = new UrlPatternParser(\n \"/project/#{paramsBean.project}/#{paramsBea...
{ "body": "@Test\n public void testGetMappedParameters()\n {\n Map<String, String> params = parser.getMappedParameters(\"/project/starfish1/starfish2/story1\");\n assertEquals(2, params.size());\n }", "class_method_signature": "UrlPatternParserTest.testGetMappedParameters()", "constructor":...
{ "fields": [ { "declarator": "originalPattern", "modifier": "private", "original_string": "private String originalPattern;", "type": "String", "var_name": "originalPattern" }, { "declarator": "urlPattern", "modifier": "private", "original_string": "private ...
{ "body": "public Map<String, String> getMappedParameters(final String url)\n {\n Map<String, String> result = new HashMap<String, String>();\n Matcher matcher = Pattern.compile(urlPattern).matcher(url);\n if (matcher.matches())\n {\n for (int i = 0; i < expressions.size(); i++)\n ...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_47
{ "fields": [], "file": "core/src/test/java/com/ocpsoft/pretty/faces/config/annotation/PackageFilterTest.java", "identifier": "PackageFilterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSinglePackage()\n {\n\n // test simple filter\n PackageFilter filter = new PackageFilter(\"com.ocpsoft\");\n assertEquals(true, filter.isAllowedPackage(\"com.ocpsoft.pretty.faces\"));\n assertEquals(true, filter.isAllowedPackage(\"com.ocpsoft\"));\n asse...
{ "fields": [ { "declarator": "log = LogFactory.getLog(PackageFilter.class)", "modifier": "private final static", "original_string": "private final static Log log = LogFactory.getLog(PackageFilter.class);", "type": "Log", "var_name": "log" }, { "declarator": "packageSet...
{ "body": "public boolean isAllowedPackage(String packageName)\n {\n\n // No packages in set? Accept all packages.\n if (packageSet.isEmpty())\n {\n return true;\n }\n\n // check all valid packages\n for (String validPackage : packageSet)\n {\n // accept if package...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_10
{ "fields": [], "file": "core/src/test/java/com/ocpsoft/pretty/faces/url/URLPatternParserTest.java", "identifier": "URLPatternParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetMappedParameterList()\n {\n URLPatternParser parser = new URLPatternParser(\n \"/project/#{paramsBean.project}/#{paramsBean.iteration}/#{paramsBean.story}\");\n List<PathParameter> params = parser.parse(new URL(\"/project/starfish1/sprint1/story1\"));\...
{ "fields": [ { "declarator": "EL_REGEX_PATTERN = Pattern.compile(Expressions.EL_REGEX)", "modifier": "private static final", "original_string": "private static final Pattern EL_REGEX_PATTERN = Pattern.compile(Expressions.EL_REGEX);", "type": "Pattern", "var_name": "EL_REGEX_PATTERN"...
{ "body": "public List<PathParameter> parse(final URL url)\n {\n List<PathParameter> result = new ArrayList<PathParameter>();\n\n String inboundUrl = url.toURL();\n if (this.matches(url))\n {\n Iterator<Segment> iter = pathSegments.iterator();\n while (iter.hasNext())\n {...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_51
{ "fields": [], "file": "core/src/test/java/com/ocpsoft/pretty/faces/config/annotation/WebClassesFinderTest.java", "identifier": "WebClassesFinderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWebClassesFinderWithJettyRunGoal() throws Exception\n {\n\n // URLs do not contain '/WEB-INF/classes/' but the Maven '/target/classes/' folder\n URL classesUrl = new URL(\"file:/somewhere/myproject/target/classes/\");\n URL packageUrl = new URL(\"file:/somewhere/m...
{ "fields": [ { "declarator": "CLASSES_FOLDER = \"/WEB-INF/classes/\"", "modifier": "private final static", "original_string": "private final static String CLASSES_FOLDER = \"/WEB-INF/classes/\";", "type": "String", "var_name": "CLASSES_FOLDER" }, { "declarator": "proce...
{ "body": "public void findClasses(PrettyAnnotationHandler handler)\n {\n try\n {\n // we start the recursive scan in the classes folder\n URL classesFolderUrl = servletContext.getResource(CLASSES_FOLDER);\n\n // abort if classes folder is missing\n if (classesFolderUrl == ...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_26
{ "fields": [ { "declarator": "link = new Link()", "modifier": "static", "original_string": "static Link link = new Link();", "type": "Link", "var_name": "link" }, { "declarator": "mapping = new UrlMapping()", "modifier": "static", "original_string": "static...
{ "body": "@Test\n public void testExtractParameters()\n {\n List<UIParameter> parameters = builder.extractParameters(link);\n assertEquals(5, parameters.size());\n assertTrue(parameters.contains(param1));\n assertTrue(parameters.contains(param2));\n assertTrue(parameters.contains(param3)...
{ "fields": [], "file": "core/src/main/java/com/ocpsoft/pretty/faces/util/PrettyURLBuilder.java", "identifier": "PrettyURLBuilder", "interfaces": "", "methods": [ { "class_method_signature": "PrettyURLBuilder.extractParameters(final UIComponent component)", "constructor": false, "full_si...
{ "body": "public List<UIParameter> extractParameters(final UIComponent component)\n {\n List<UIParameter> results = new ArrayList<UIParameter>();\n for (UIComponent child : component.getChildren())\n {\n if (child instanceof UIParameter)\n {\n results.add((UIParameter) chi...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_101
{ "fields": [], "file": "impl-jsf11/src/test/java/com/ocpsoft/pretty/config/mapping/UrlActionTest.java", "identifier": "UrlActionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUrlActionStringSetsActionMethod()\n {\n String action = \"#{this.is.my.action}\";\n UrlAction urlAction = new UrlAction(action);\n assertEquals(action, urlAction.getAction());\n }", "class_method_signature": "UrlActionTest.testUrlActionStringSetsActio...
{ "fields": [ { "declarator": "action", "modifier": "private", "original_string": "private String action;", "type": "String", "var_name": "action" }, { "declarator": "phaseId = PhaseId.RESTORE_VIEW", "modifier": "private", "original_string": "private PhaseId...
{ "body": "public String getAction()\n {\n return action;\n }", "class_method_signature": "UrlAction.getAction()", "constructor": false, "full_signature": "public String getAction()", "identifier": "getAction", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Strin...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_6
{ "fields": [], "file": "core/src/test/java/com/ocpsoft/pretty/faces/url/URLPatternParserTest.java", "identifier": "URLPatternParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMatchesMultipleExpressionNamedSegment()\n {\n URLPatternParser parser = new URLPatternParser(\"/project/#{paramsBean.project}/story-#{story}-#{comment}\");\n assertTrue(parser.matches(new URL(\"/project/starfish/story-1-23\")));\n assertFalse(parser.matches(new UR...
{ "fields": [ { "declarator": "EL_REGEX_PATTERN = Pattern.compile(Expressions.EL_REGEX)", "modifier": "private static final", "original_string": "private static final Pattern EL_REGEX_PATTERN = Pattern.compile(Expressions.EL_REGEX);", "type": "Pattern", "var_name": "EL_REGEX_PATTERN"...
{ "body": "public boolean matches(final URL target)\n {\n if (elPattern) {\n return urlElPattern.matcher(target.toURL()).matches();\n } else {\n return urlPattern.toURL().equals(target.toURL());\n }\n }", "class_method_signature": "URLPatternParser.matches(final URL target)", "c...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_71
{ "fields": [ { "declarator": "url = \"/my/foo/is/COOL\"", "modifier": "", "original_string": "String url = \"/my/foo/is/COOL\";", "type": "String", "var_name": "url" }, { "declarator": "rewriteEngine = new RewriteEngine()", "modifier": "", "original_string"...
{ "body": "@Test\n public void testTrailingSlash() throws Exception\n {\n RewriteRule c = new RewriteRule();\n c.setTrailingSlash(TrailingSlash.APPEND);\n assertEquals(\"/my/foo/is/COOL/\", rewriteEngine.processInbound(null, null, c, url));\n }", "class_method_signature": "RewriteEngineTest.tes...
{ "fields": [ { "declarator": "processors", "modifier": "private static", "original_string": "private static List<Processor> processors;", "type": "List<Processor>", "var_name": "processors" } ], "file": "core/src/main/java/com/ocpsoft/pretty/faces/rewrite/RewriteEngine.java"...
{ "body": "public String processInbound(final HttpServletRequest request, final HttpServletResponse response,\n final RewriteRule rule, final String url)\n {\n String result = url;\n if ((rule != null) && rule.isInbound() && rule.matches(url))\n {\n for (Processor p : processors)\n...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_88
{ "fields": [ { "declarator": "decoder = new HTTPDecoder()", "modifier": "", "original_string": "HTTPDecoder decoder = new HTTPDecoder();", "type": "HTTPDecoder", "var_name": "decoder" } ], "file": "impl-jsf11/src/test/java/com/ocpsoft/pretty/util/HTTPDecoderTest.java", "id...
{ "body": "@Test\n public void testDecodeValidInputReturnsDecodedInput()\n {\n String value = \"foo+bar\";\n assertEquals(\"foo bar\", decoder.decode(value));\n }", "class_method_signature": "HTTPDecoderTest.testDecodeValidInputReturnsDecodedInput()", "constructor": false, "full_signature...
{ "fields": [], "file": "impl-jsf11/src/main/java/com/ocpsoft/pretty/util/HTTPDecoder.java", "identifier": "HTTPDecoder", "interfaces": "", "methods": [ { "class_method_signature": "HTTPDecoder.decode(final String value)", "constructor": false, "full_signature": "public String decode(fin...
{ "body": "public String decode(final String value)\n {\n String result = value;\n if (value != null)\n {\n try\n {\n result = URLDecoder.decode(value, \"UTF-8\");\n }\n catch (Exception e)\n {\n throw new Pre...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_67
{ "fields": [ { "declarator": "executor = new ActionExecutor()", "modifier": "", "original_string": "ActionExecutor executor = new ActionExecutor();", "type": "ActionExecutor", "var_name": "executor" } ], "file": "core/src/test/java/com/ocpsoft/pretty/faces/beans/ActionExecut...
{ "body": "@Test\n public void testShouldNotExecuteOnWrongPhasePostback()\n {\n UrlAction action = new UrlAction(\"action\", PhaseId.RESTORE_VIEW);\n action.setOnPostback(true);\n assertFalse(executor.shouldExecute(action, javax.faces.event.PhaseId.APPLY_REQUEST_VALUES, true));\n }", "class_met...
{ "fields": [ { "declarator": "log = LogFactory.getLog(ActionExecutor.class)", "modifier": "private static final", "original_string": "private static final Log log = LogFactory.getLog(ActionExecutor.class);", "type": "Log", "var_name": "log" }, { "declarator": "elUtils ...
{ "body": "boolean shouldExecute(final UrlAction action, final PhaseId currentPhaseId, final boolean isPostback)\n {\n boolean result = false;\n if (PhaseIdComparator.equals(action.getPhaseId(), currentPhaseId)\n || PhaseIdComparator.equals(action.getPhaseId(), PhaseId.ANY_PHASE))\n {\n...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_30
{ "fields": [ { "declarator": "link = new Link()", "modifier": "static", "original_string": "static Link link = new Link();", "type": "Link", "var_name": "link" }, { "declarator": "mapping = new UrlMapping()", "modifier": "static", "original_string": "static...
{ "body": "@Test\n public void testBuildUrlWithUnicodeCharacters()\n {\n List<UIParameter> params = Arrays.asList(\n createUIParameter(null, \"\\u20ac\"), // Euro sign\n createUIParameter(null, \"\\u0142\"), // L with stroke\n createUIParameter(\"key1\", \"\\u00a3\"), ...
{ "fields": [], "file": "core/src/main/java/com/ocpsoft/pretty/faces/util/PrettyURLBuilder.java", "identifier": "PrettyURLBuilder", "interfaces": "", "methods": [ { "class_method_signature": "PrettyURLBuilder.extractParameters(final UIComponent component)", "constructor": false, "full_si...
{ "body": "@Deprecated\n public String build(final UrlMapping mapping, final Map<String, String[]> parameters)\n {\n return build(mapping, false, parameters);\n }", "class_method_signature": "PrettyURLBuilder.build(final UrlMapping mapping, final Map<String, String[]> parameters)", "constructor": false...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_31
{ "fields": [], "file": "core/src/test/java/com/ocpsoft/pretty/faces/util/FacesNavigationURLCanonicalizerTest.java", "identifier": "FacesNavigationURLCanonicalizerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNormalizeRequestUriWithNullArguments()\n {\n assertEquals(null, FacesNavigationURLCanonicalizer.normalizeRequestURI(null, null, null));\n }", "class_method_signature": "FacesNavigationURLCanonicalizerTest.testNormalizeRequestUriWithNullArguments()", "constructor": fal...
{ "fields": [], "file": "core/src/main/java/com/ocpsoft/pretty/faces/util/FacesNavigationURLCanonicalizer.java", "identifier": "FacesNavigationURLCanonicalizer", "interfaces": "", "methods": [ { "class_method_signature": "FacesNavigationURLCanonicalizer.normalizeRequestURI(final FacesContext context...
{ "body": "public static String normalizeRequestURI(final FacesContext context, final String viewId)\n {\n ExternalContext externalContext = context.getExternalContext();\n return normalizeRequestURI(externalContext.getRequestServletPath(), externalContext.getRequestPathInfo(), viewId);\n }", "class_m...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_89
{ "fields": [ { "declarator": "decoder = new HTTPDecoder()", "modifier": "", "original_string": "HTTPDecoder decoder = new HTTPDecoder();", "type": "HTTPDecoder", "var_name": "decoder" } ], "file": "impl-jsf11/src/test/java/com/ocpsoft/pretty/util/HTTPDecoderTest.java", "id...
{ "body": "@Test(expected = PrettyException.class)\n public void testDecodeInvalidInputThrowsException()\n {\n String value = \"foo+bar%\";\n assertEquals(\"foo+bar%\", decoder.decode(value));\n }", "class_method_signature": "HTTPDecoderTest.testDecodeInvalidInputThrowsException()", "constr...
{ "fields": [], "file": "impl-jsf11/src/main/java/com/ocpsoft/pretty/util/HTTPDecoder.java", "identifier": "HTTPDecoder", "interfaces": "", "methods": [ { "class_method_signature": "HTTPDecoder.decode(final String value)", "constructor": false, "full_signature": "public String decode(fin...
{ "body": "public String decode(final String value)\n {\n String result = value;\n if (value != null)\n {\n try\n {\n result = URLDecoder.decode(value, \"UTF-8\");\n }\n catch (Exception e)\n {\n throw new Pre...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_66
{ "fields": [ { "declarator": "executor = new ActionExecutor()", "modifier": "", "original_string": "ActionExecutor executor = new ActionExecutor();", "type": "ActionExecutor", "var_name": "executor" } ], "file": "core/src/test/java/com/ocpsoft/pretty/faces/beans/ActionExecut...
{ "body": "@Test\n public void testShouldExecuteOnPhasePostback()\n {\n UrlAction action = new UrlAction(\"action\", PhaseId.RESTORE_VIEW);\n action.setOnPostback(true);\n assertTrue(executor.shouldExecute(action, javax.faces.event.PhaseId.RESTORE_VIEW, true));\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "log = LogFactory.getLog(ActionExecutor.class)", "modifier": "private static final", "original_string": "private static final Log log = LogFactory.getLog(ActionExecutor.class);", "type": "Log", "var_name": "log" }, { "declarator": "elUtils ...
{ "body": "boolean shouldExecute(final UrlAction action, final PhaseId currentPhaseId, final boolean isPostback)\n {\n boolean result = false;\n if (PhaseIdComparator.equals(action.getPhaseId(), currentPhaseId)\n || PhaseIdComparator.equals(action.getPhaseId(), PhaseId.ANY_PHASE))\n {\n...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_7
{ "fields": [], "file": "core/src/test/java/com/ocpsoft/pretty/faces/url/URLPatternParserTest.java", "identifier": "URLPatternParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMatchesPrefixedSegmentExpressionNamedInjected()\n {\n URLPatternParser parser = new URLPatternParser(\"/project/#{paramsBean.project}/story-#{story:paramsBean.story}/\");\n assertTrue(parser.matches(new URL(\"/project/starfish/story-1/\")));\n }", "class_method_sig...
{ "fields": [ { "declarator": "EL_REGEX_PATTERN = Pattern.compile(Expressions.EL_REGEX)", "modifier": "private static final", "original_string": "private static final Pattern EL_REGEX_PATTERN = Pattern.compile(Expressions.EL_REGEX);", "type": "Pattern", "var_name": "EL_REGEX_PATTERN"...
{ "body": "public boolean matches(final URL target)\n {\n if (elPattern) {\n return urlElPattern.matcher(target.toURL()).matches();\n } else {\n return urlPattern.toURL().equals(target.toURL());\n }\n }", "class_method_signature": "URLPatternParser.matches(final URL target)", "c...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }
1164965_70
{ "fields": [ { "declarator": "url = \"/my/foo/is/COOL\"", "modifier": "", "original_string": "String url = \"/my/foo/is/COOL\";", "type": "String", "var_name": "url" }, { "declarator": "rewriteEngine = new RewriteEngine()", "modifier": "", "original_string"...
{ "body": "@Test\n public void testRegex() throws Exception\n {\n RewriteRule c = new RewriteRule();\n c.setMatch(\"foo\");\n c.setSubstitute(\"bar\");\n\n assertEquals(\"/my/bar/is/COOL\", rewriteEngine.processInbound(null, null, c, url));\n }", "class_method_signature": "RewriteEngineTes...
{ "fields": [ { "declarator": "processors", "modifier": "private static", "original_string": "private static List<Processor> processors;", "type": "List<Processor>", "var_name": "processors" } ], "file": "core/src/main/java/com/ocpsoft/pretty/faces/rewrite/RewriteEngine.java"...
{ "body": "public String processInbound(final HttpServletRequest request, final HttpServletResponse response,\n final RewriteRule rule, final String url)\n {\n String result = url;\n if ((rule != null) && rule.isInbound() && rule.matches(url))\n {\n for (Processor p : processors)\n...
{ "created": null, "fork": null, "fork_count": 23, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1164965, "size": 2126, "stargazer_count": 53, "stars": null, "updates": null, "url": "https://github.com/ocpsoft/prettyfaces" }