id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
218396611_33
{ "fields": [], "file": "examples/src/test/java/ai/djl/examples/inference/ListModelsTest.java", "identifier": "ListModelsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testListModels() throws ModelException, IOException {\n Path path = Paths.get(\"../model-zoo/src/test/resources/mlrepo\");\n String repoUrl = path.toRealPath().toAbsolutePath().toUri().toURL().toExternalForm();\n System.setProperty(\"ai.djl.repository.zoo.locatio...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ListModels.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ListModels.class);", "type": "Logger", "var_name": "logger" } ], "file": "e...
{ "body": "private ListModels() {}", "class_method_signature": "ListModels.ListModels()", "constructor": true, "full_signature": "private ListModels()", "identifier": "ListModels", "invocations": [], "modifiers": "private", "parameters": "()", "return": "", "signature": " ListModels()", "testcase...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_64
{ "fields": [ { "declarator": "library", "modifier": "private", "original_string": "private MockMxnetLibrary library;", "type": "MockMxnetLibrary", "var_name": "library" } ], "file": "mxnet/mxnet-engine/src/test/java/ai/djl/mxnet/engine/MxNDArrayTest.java", "identifier": "M...
{ "body": "@Test\n public void testSet() {\n final float[][] fa = new float[][] {new float[1]};\n library.setFunction(\n \"MXNDArraySyncCopyFromCPU\",\n objects -> {\n int size = ((NativeSize) objects[2]).intValue();\n fa[0] = ((Poin...
{ "fields": [ { "declarator": "MAX_SIZE = 100", "modifier": "private static final", "original_string": "private static final int MAX_SIZE = 100;", "type": "int", "var_name": "MAX_SIZE" }, { "declarator": "MAX_DEPTH = 10", "modifier": "private static final", ...
{ "body": "@Override\n public void set(Buffer data) {\n int size = data.remaining();\n // int8, uint8, boolean use ByteBuffer, so need to explicitly input DataType\n DataType inputType = DataType.fromBuffer(data);\n validate(inputType, size);\n\n if (data.isDirect()) {\n ...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_25
{ "fields": [], "file": "api/src/test/java/ai/djl/DeviceTest.java", "identifier": "DeviceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDevice() {\n Assert.assertEquals(Device.cpu(), Device.of(\"cpu\", -1));\n if (Device.getGpuCount() > 0) {\n Assert.assertEquals(Device.gpu(), Device.defaultDevice());\n } else {\n Assert.assertEquals(Device.cpu(), Device.defaultDevice())...
{ "fields": [ { "declarator": "CACHE = new ConcurrentHashMap<>()", "modifier": "private static final", "original_string": "private static final Map<String, Device> CACHE = new ConcurrentHashMap<>();", "type": "Map<String, Device>", "var_name": "CACHE" }, { "declarator":...
{ "body": "private Device(String deviceType, int deviceId) {\n this.deviceType = deviceType;\n this.deviceId = deviceId;\n }", "class_method_signature": "Device.Device(String deviceType, int deviceId)", "constructor": true, "full_signature": "private Device(String deviceType, int deviceId)", ...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_52
{ "fields": [], "file": "extensions/sentencepiece/src/test/java/ai/djl/sentencepiece/SpTokenizerTest.java", "identifier": "SpTokenizerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTokenize() throws IOException {\n if (System.getProperty(\"os.name\").startsWith(\"Win\")) {\n throw new SkipException(\"Skip windows test.\");\n }\n Path modelPath = Paths.get(\"build/test/models\");\n String prefix = \"sententpiece_test_mo...
{ "fields": [ { "declarator": "modelDir", "modifier": "private", "original_string": "private Path modelDir;", "type": "Path", "var_name": "modelDir" }, { "declarator": "processor", "modifier": "private", "original_string": "private SpProcessor processor;", ...
{ "body": "@Override\n public List<String> tokenize(String sentence) {\n return Arrays.asList(processor.tokenize(sentence));\n }", "class_method_signature": "SpTokenizer.tokenize(String sentence)", "constructor": false, "full_signature": "@Override public List<String> tokenize(String sentence)", ...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_6
{ "fields": [], "file": "basicdataset/src/test/java/ai/djl/basicdataset/ImageNetTest.java", "identifier": "ImageNetTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(enabled = false)\n public void testImageNetLocal() throws IOException, TranslateException {\n Repository repository =\n Repository.newInstance(\n \"test\", System.getProperty(\"user.home\") + \"/Desktop/testImagenet\");\n ImageNet imagenet =\n ...
{ "fields": [ { "declarator": "wordNetIds", "modifier": "private", "original_string": "private String[] wordNetIds;", "type": "String[]", "var_name": "wordNetIds" }, { "declarator": "classNames", "modifier": "private", "original_string": "private String[] cl...
{ "body": "public static Builder builder() {\n return new Builder();\n }", "class_method_signature": "ImageNet.builder()", "constructor": false, "full_signature": "public static Builder builder()", "identifier": "builder", "invocations": [], "modifiers": "public static", "parameters": "()", ...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_13
{ "fields": [], "file": "api/src/test/java/ai/djl/ndarray/types/ShapeTest.java", "identifier": "ShapeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHasLayout() {\n Shape withLayout =\n new Shape(\n new long[] {2, 2}, new LayoutType[] {LayoutType.BATCH, LayoutType.CHANNEL});\n Shape withoutLayout = new Shape(2, 2);\n\n Assert.assertTrue(withLayout.isLayoutKnown());\n ...
{ "fields": [ { "declarator": "shape", "modifier": "private", "original_string": "private long[] shape;", "type": "long[]", "var_name": "shape" }, { "declarator": "layout", "modifier": "private", "original_string": "private LayoutType[] layout;", "type...
{ "body": "public boolean isLayoutKnown() {\n return !Arrays.stream(layout).allMatch(l -> l == LayoutType.UNKNOWN);\n }", "class_method_signature": "Shape.isLayoutKnown()", "constructor": false, "full_signature": "public boolean isLayoutKnown()", "identifier": "isLayoutKnown", "invocations": [ ...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_44
{ "fields": [], "file": "examples/src/test/java/ai/djl/examples/training/TrainTicTacToeTest.java", "identifier": "TrainTicTacToeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTrainTicTacToe() {\n if (Boolean.getBoolean(\"nightly\")) {\n String[] args = new String[] {\"-g\", \"1\"};\n\n Engine.getInstance().setRandomSeed(1234);\n\n TrainingResult result = TrainTicTacToe.runExample(args);\n Assert.asser...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(TrainTicTacToe.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(TrainTicTacToe.class);", "type": "Logger", "var_name": "logger" } ], "f...
{ "body": "private TrainTicTacToe() {}", "class_method_signature": "TrainTicTacToe.TrainTicTacToe()", "constructor": true, "full_signature": "private TrainTicTacToe()", "identifier": "TrainTicTacToe", "invocations": [], "modifiers": "private", "parameters": "()", "return": "", "signature": " TrainT...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_68
{ "fields": [ { "declarator": "ERROR_NOT_FOUND =\n \"Requested resource is not found, please refer to API document.\"", "modifier": "private static final", "original_string": "private static final String ERROR_NOT_FOUND =\n \"Requested resource is not found, please refer to...
{ "body": "@Test\n public void test()\n throws InterruptedException, HttpPostRequestEncoder.ErrorDataEncoderException,\n IOException {\n Assert.assertTrue(server.isRunning());\n\n Channel channel = null;\n for (int i = 0; i < 5; ++i) {\n try {\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ModelServer.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ModelServer.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "public boolean isRunning() {\n return !stopped.get();\n }", "class_method_signature": "ModelServer.isRunning()", "constructor": false, "full_signature": "public boolean isRunning()", "identifier": "isRunning", "invocations": [ "get" ], "modifiers": "public", "parameters": "()"...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_29
{ "fields": [], "file": "api/src/test/java/ai/djl/modality/nlp/preprocess/PunctuationSeparatorTest.java", "identifier": "PunctuationSeparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testPreprocess() {\n String sentence = \"Hello.. How are you?! @my_alias\";\n String expected = \"Hello . . How are you ? ! @ my _ alias\";\n SimpleTokenizer tokenizer = new SimpleTokenizer();\n PunctuationSeparator punctuationSeparator = new PunctuationS...
{ "fields": [ { "declarator": "PATTERN =\n Pattern.compile(\n \"\\\\s+|(?<=[\\\\p{Punct}\\\\p{IsPunctuation}])|(?=[\\\\p{Punct}\\\\p{IsPunctuation}])\")", "modifier": "private static final", "original_string": "private static final Pattern PATTERN =\n Pat...
{ "body": "@Override\n public List<String> preprocess(List<String> tokens) {\n return tokens.stream()\n .map(PATTERN::split)\n .flatMap(Arrays::stream)\n .filter(s -> !s.isEmpty())\n .collect(Collectors.toList());\n }", "class_method_signature...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_28
{ "fields": [], "file": "api/src/test/java/ai/djl/modality/nlp/preprocess/UnicodeNormalizerTest.java", "identifier": "UnicodeNormalizerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaultNormalization() {\n // the following tests are contained in the test string below:\n // - Umlaut Ä (with separate diaresis, two chars for one German letter,\n // causes German dictionary lookups to fail)\n // - \"normal\" A, should stay as is\n ...
{ "fields": [ { "declarator": "DEFAULT_FORM = Normalizer.Form.NFKC", "modifier": "public static final", "original_string": "public static final Normalizer.Form DEFAULT_FORM = Normalizer.Form.NFKC;", "type": "Normalizer.Form", "var_name": "DEFAULT_FORM" }, { "declarator"...
{ "body": "@Override\n public List<String> preprocess(final List<String> tokens) {\n return tokens.stream()\n .map((s) -> Normalizer.normalize(s, normalForm))\n .collect(Collectors.toList());\n }", "class_method_signature": "UnicodeNormalizer.preprocess(final List<String> ...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_45
{ "fields": [], "file": "extensions/aws-ai/src/test/java/ai/djl/aws/s3/S3RepositoryFactoryTest.java", "identifier": "S3RepositoryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testUnsupportedProtocol() {\n S3RepositoryFactory factory = new S3RepositoryFactory();\n factory.newInstance(\"s3\", \"https://djl-not-exists/\");\n }", "class_method_signature": "S3RepositoryFactoryTest.testUnsu...
{ "fields": [ { "declarator": "NAME_PATTERN = Pattern.compile(\"model_name=([^&]*)\")", "modifier": "private static final", "original_string": "private static final Pattern NAME_PATTERN = Pattern.compile(\"model_name=([^&]*)\");", "type": "Pattern", "var_name": "NAME_PATTERN" }, ...
{ "body": "@Override\n public Repository newInstance(String name, String url) {\n URI uri = URI.create(url);\n String scheme = uri.getScheme();\n if (!\"s3\".equalsIgnoreCase(scheme)) {\n throw new IllegalArgumentException(\"Invalid s3 url: \" + url);\n }\n\n String bu...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_12
{ "fields": [], "file": "api/src/test/java/ai/djl/ndarray/types/ShapeTest.java", "identifier": "ShapeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shapeTest() {\n Shape shape = new Shape(1, 3, 224, 224);\n Assert.assertEquals(shape.getShape(), new long[] {1, 3, 224, 224});\n Assert.assertThrows(IllegalArgumentException.class, () -> shape.size(-1));\n Assert.assertEquals(shape.size(0, 1), 3);\n ...
{ "fields": [ { "declarator": "shape", "modifier": "private", "original_string": "private long[] shape;", "type": "long[]", "var_name": "shape" }, { "declarator": "layout", "modifier": "private", "original_string": "private LayoutType[] layout;", "type...
{ "body": "public Shape(long... shape) {\n this(\n shape,\n Arrays.stream(shape).mapToObj(x -> LayoutType.UNKNOWN).toArray(LayoutType[]::new));\n }", "class_method_signature": "Shape.Shape(long... shape)", "constructor": true, "full_signature": "public Shape(long... shap...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_7
{ "fields": [ { "declarator": "LF = System.getProperty(\"line.separator\")", "modifier": "private static final", "original_string": "private static final String LF = System.getProperty(\"line.separator\");", "type": "String", "var_name": "LF" } ], "file": "api/src/test/java/a...
{ "body": "@Test\n public void testUint8Format() {\n try (NDManager manager = NDManager.newBaseManager(Device.cpu())) {\n byte[] data = {Byte.MAX_VALUE, Byte.MIN_VALUE, 1};\n NDArray array = manager.create(new Shape(3), DataType.UINT8);\n array.set(data);\n\n Stri...
{ "fields": [ { "declarator": "PRECISION = 8", "modifier": "private static final", "original_string": "private static final int PRECISION = 8;", "type": "int", "var_name": "PRECISION" }, { "declarator": "LF = System.getProperty(\"line.separator\")", "modifier": "p...
{ "body": "public static String format(\n NDArray array, int maxSize, int maxDepth, int maxRows, int maxColumns) {\n NDFormat format;\n DataType dataType = array.getDataType();\n\n if (dataType == DataType.UINT8) {\n format = new HexFormat();\n } else if (dataType == ...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_53
{ "fields": [], "file": "extensions/sentencepiece/src/test/java/ai/djl/sentencepiece/SpTokenizerTest.java", "identifier": "SpTokenizerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEncodeDecode() throws IOException {\n if (System.getProperty(\"os.name\").startsWith(\"Win\")) {\n throw new SkipException(\"Skip windows test.\");\n }\n Path modelPath = Paths.get(\"build/test/models\");\n String prefix = \"sententpiece_tes...
{ "fields": [ { "declarator": "modelDir", "modifier": "private", "original_string": "private Path modelDir;", "type": "Path", "var_name": "modelDir" }, { "declarator": "processor", "modifier": "private", "original_string": "private SpProcessor processor;", ...
{ "body": "SpProcessor getProcessor() {\n return processor;\n }", "class_method_signature": "SpTokenizer.getProcessor()", "constructor": false, "full_signature": " SpProcessor getProcessor()", "identifier": "getProcessor", "invocations": [], "modifiers": "", "parameters": "()", "return": "Sp...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_24
{ "fields": [], "file": "api/src/test/java/ai/djl/metric/MetricsTest.java", "identifier": "MetricsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testPercentileException() {\n Metrics metrics = new Metrics();\n metrics.percentile(\"not_found\", 1);\n }", "class_method_signature": "MetricsTest.testPercentileException()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "VALUE_COMPARATOR = new MetricValueComparator()", "modifier": "private static final", "original_string": "private static final MetricValueComparator VALUE_COMPARATOR = new MetricValueComparator();", "type": "MetricValueComparator", "var_name": "VALUE_COM...
{ "body": "public Metric percentile(String metricName, int percentile) {\n List<Metric> metric = metrics.get(metricName);\n if (metric == null || metrics.isEmpty()) {\n throw new IllegalArgumentException(\"Metric name not found: \" + metricName);\n }\n\n List<Metric> list = new ...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_65
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(CachedOpTest.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(CachedOpTest.class);", "type": "Logger", "var_name": "logger" } ], "file"...
{ "body": "@Test(expectedExceptions = NullPointerException.class)\n public void testForward() {\n try (MxNDManager manager = MxNDManager.getSystemManager().newSubManager()) {\n List<Parameter> params = new ArrayList<>();\n Parameter parameter =\n new Parameter(\"data...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(CachedOp.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(CachedOp.class);", "type": "Logger", "var_name": "logger" }, { "declara...
{ "body": "public NDList forward(ParameterStore parameterStore, NDList data, boolean training) {\n // reset the input data index at the beginning\n MxNDArray[] allInputsNDArray = new MxNDArray[parameters.size()];\n // for unit test purpose, we export the current one to global\n this.debugI...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_32
{ "fields": [], "file": "examples/src/test/java/ai/djl/examples/inference/ObjectDetectionWithTensorflowSavedModelTest.java", "identifier": "ObjectDetectionWithTensorflowSavedModelTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testObjectDetection() throws ModelException, TranslateException, IOException {\n // Only run nightly, this example download the synset file from github, this can cause\n // throttling and will fail the test.\n if (Boolean.getBoolean(\"nightly\")) {\n D...
{ "fields": [ { "declarator": "logger =\n LoggerFactory.getLogger(ObjectDetectionWithTensorflowSavedModel.class)", "modifier": "private static final", "original_string": "private static final Logger logger =\n LoggerFactory.getLogger(ObjectDetectionWithTensorflowSavedModel....
{ "body": "public static DetectedObjects predict() throws IOException, ModelException, TranslateException {\n if (!\"TensorFlow\".equals(Engine.getInstance().getEngineName())) {\n return null;\n }\n\n Path imageFile = Paths.get(\"src/test/resources/dog_bike_car.jpg\");\n Image i...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
218396611_49
{ "fields": [], "file": "extensions/aws-ai/src/test/java/ai/djl/aws/s3/S3RepositoryTest.java", "identifier": "S3RepositoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testS3Repository() throws IOException {\n S3Client client =\n S3Client.builder()\n .credentialsProvider(AnonymousCredentialsProvider.create())\n .region(Region.US_EAST_1)\n .build();\n\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(S3Repository.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(S3Repository.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "S3Repository(\n S3Client client,\n String name,\n String bucket,\n String prefix,\n String artifactId,\n String modelName) {\n this.client = client;\n this.name = name;\n this.bucket = bucket;\n this.prefix = pref...
{ "created": "10/29/2019 10:38:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 218396611, "size": null, "stargazer_count": null, "stars": 641, "updates": "2020-01-26T18:04:21+00:00", "url": "https://github.com/awslabs/djl" ...
35827335_1
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void speedTest() throws Exception {\n Komoran komoran = new Komoran(DEFAULT_MODEL.STABLE);\n int totalTestCount = 10;\n int totalElapsedTime = 0;\n int step = 0;\n while (true) {\n InputStreamReader inputStreamReader = new InputStreamReader(Ob...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public List<KomoranResult> analyze(List<String> sentences, int thread) {\n\n List<KomoranResult> komoranResultList = new ArrayList<>();\n\n try {\n List<Future<KomoranResult>> komoranResultFutureList = new ArrayList<>();\n ThreadPoolExecutor executor = (ThreadPoolExecuto...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_0
{ "fields": [], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/util/HangulJamoUtilTest.java", "identifier": "HangulJamoUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void toHangulCompatibilityJamo() {\n String source = \"나쁨에\\t나쁘/VA ᄆ/ETN 에/JKB:3\\n\" +\n \"뿌연\\t뿌옇/VA ᆫ/ETM:40\\n\" +\n \"쓰임이나\\t쓰이/VV ᄆ/ETN 이나/JC:1\\n\" +\n \"얽혀져\\t얽히/VV 어/EC 지/VX 어/EC:1\\n\" +\n \"뿌여\\t뿌옇/VA:1\\n\" +\n...
{ "fields": [], "file": "core/src/main/java/kr/co/shineware/nlp/komoran/util/HangulJamoUtil.java", "identifier": "HangulJamoUtil", "interfaces": "", "methods": [ { "class_method_signature": "HangulJamoUtil.ToHangulCompatibilityJamo(String source)", "constructor": false, "full_signature":...
{ "body": "public static String ToHangulCompatibilityJamo(String source) {\n StringBuilder dest = new StringBuilder();\n\n for (int i = 0; i < source.length(); i++) {\n char ch = source.charAt(i);\n ch = convertChosungToCompatibilityJamo(ch);\n ch = convertJungsungToComp...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_7
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void setUserDic() {\n this.komoran.setUserDic(\"user_data/dic.user\");\n System.out.println(this.komoran.analyze(\"2010년 아시안 게임 사격 남자 10m 공기 권총\").getPlainText());\n System.out.println(this.komoran.analyze(\"눈이 자꾸 흘렀다.\").getPlainText());\n System.out.println(t...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public void setUserDic(String userDic) {\n try {\n\n this.userDic = new Observation();\n BufferedReader br = new BufferedReader(new FileReader(userDic));\n String line;\n while ((line = br.readLine()) != null) {\n line = line.trim();\n ...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_6
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void setFWDic() {\n KomoranResult komoranResult = this.komoran.analyze(\"감기는\");\n System.out.println(komoranResult.getTokenList());\n this.komoran.setFWDic(\"user_data/fwd.user\");\n this.komoran.analyze(\"감사합니다! 바람과 함께 사라지다는 진짜 재밌었어요! nice good!\");\n ...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public void setFWDic(String filename) {\n try {\n CorpusParser corpusParser = new CorpusParser();\n BufferedReader br = new BufferedReader(\n new InputStreamReader(new FileInputStream(filename), StandardCharsets.UTF_8));\n// BufferedReader br = new...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_5
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void analyze() {\n// KomoranResult komoranResult = this.komoran.analyze(\"네가 없는 거리에는 내가 할 일이 많아서 마냥 걷다보면 추억을 가끔 마주치지.\");\n KomoranResult komoranResult = this.komoran.analyze(\"거리에는\");\n List<Pair<String, String>> pairList = komoranResult.getList();\n for (Pai...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public List<KomoranResult> analyze(List<String> sentences, int thread) {\n\n List<KomoranResult> komoranResultList = new ArrayList<>();\n\n try {\n List<Future<KomoranResult>> komoranResultFutureList = new ArrayList<>();\n ThreadPoolExecutor executor = (ThreadPoolExecuto...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_9
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void debugScore() {\n List<String> analyzeMorphList = Arrays.asList(\"거리\", \"에\", \"는\");\n List<String> analyzePosList = Arrays.asList(\"NNG\", \"JKB\", \"JX\");\n System.out.println(this.komoran.scoreDebug(analyzeMorphList, analyzePosList));\n\n analyzeMorph...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public double scoreDebug(List<String> analyzeResultList, List<String> analyzePosList){\n\n String prevPos = SYMBOL.BOE;\n double score = 0.0;\n\n for(int i=0;i<analyzePosList.size();i++){\n String currentMorph = analyzeResultList.get(i);\n String currentPos = anal...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_8
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void bulkAnalyzeSpeedTest2() {\n List<String> lines = FileUtil.load2List(\"user_data/wiki.titles\");\n System.out.println(\"Load done\");\n System.out.println(lines.size());\n long avgElapsedTime = 0;\n\n for (int i = 0; i < 12; i++) {\n long ...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public List<KomoranResult> analyze(List<String> sentences, int thread) {\n\n List<KomoranResult> komoranResultList = new ArrayList<>();\n\n try {\n List<Future<KomoranResult>> komoranResultFutureList = new ArrayList<>();\n ThreadPoolExecutor executor = (ThreadPoolExecuto...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_4
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void textFileAnalyzeTest() {\n\n long begin = System.currentTimeMillis();\n this.komoran.analyzeTextFile(\"user_data/wiki.titles\", \"analyze_result.txt\", 4);\n long end = System.currentTimeMillis();\n\n System.out.println(\"Elapsed time : \" + (end - begin));...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public void analyzeTextFile(String inputFilename, String outputFilename, int thread) {\n\n try {\n List<String> lines = FileUtil.load2List(inputFilename);\n\n BufferedWriter bw = new BufferedWriter(\n (new OutputStreamWriter(new FileOutputStream(outputFilenam...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_3
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void bulkAnalyzeSpeedTest() {\n List<String> lines = FileUtil.load2List(\"user_data/wiki.titles\");\n System.out.println(\"Load done\");\n System.out.println(lines.size());\n long avgElapsedTime = 0;\n\n for (int i = 0; i < 5; i++) {\n long be...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public List<KomoranResult> analyze(List<String> sentences, int thread) {\n\n List<KomoranResult> komoranResultList = new ArrayList<>();\n\n try {\n List<Future<KomoranResult>> komoranResultFutureList = new ArrayList<>();\n ThreadPoolExecutor executor = (ThreadPoolExecuto...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
35827335_2
{ "fields": [ { "declarator": "komoran", "modifier": "private", "original_string": "private Komoran komoran;", "type": "Komoran", "var_name": "komoran" } ], "file": "core/src/test/java/kr/co/shineware/nlp/komoran/core/KomoranTest.java", "identifier": "KomoranTest", "inter...
{ "body": "@Test\n public void singleThreadSpeedTest() throws IOException {\n BufferedWriter bw = new BufferedWriter(new FileWriter(\"analyze_result.txt\"));\n\n List<String> lines = FileUtil.load2List(\"user_data/wiki.titles\");\n List<KomoranResult> komoranList = new ArrayList<>();\n\n ...
{ "fields": [ { "declarator": "combinationRuleChecker", "modifier": "private", "original_string": "private CombinationRuleChecker combinationRuleChecker;", "type": "CombinationRuleChecker", "var_name": "combinationRuleChecker" }, { "declarator": "resources", "modi...
{ "body": "public List<KomoranResult> analyze(List<String> sentences, int thread) {\n\n List<KomoranResult> komoranResultList = new ArrayList<>();\n\n try {\n List<Future<KomoranResult>> komoranResultFutureList = new ArrayList<>();\n ThreadPoolExecutor executor = (ThreadPoolExecuto...
{ "created": null, "fork": null, "fork_count": 41, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35827335, "size": 107895, "stargazer_count": 161, "stars": null, "updates": null, "url": "https://github.com/shineware/KOMORAN" }
15104745_48
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testDecorate_Start() {\n\t\tString decorated = StringHelper.decorate(\n\t\t\t\t\"SeLEcT * FRoM CqLDEmO.MYBOoKS WhERe ID=1122 AND SOME VALUE IS not .... FROM\", TD, \"select\", \"112\",\n\t\t\t\t\"demo\", \"not\");\n\n\t\tassertEquals(\n\t\t\t\t\"+++++SeLEcT-- * FRoM CqL+++++DEmO--.MYBO...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static String decorate(String toDecorate, StringDecorator decorator, String... keywordsLc) {\n\tString prefix = decorator.prefix();\n\tString postfix = decorator.postfix();\n\n\tint prefixLength = prefix.length();\n\tStringBuilder buf = new StringBuilder(toDecorate);\n\tfor (String keyword : sortByS...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_25
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_Boolean() {\n\t\tassertEquals(\"false\", converter.convert(Boolean.FALSE));\n\t}", "class_method_signature": "TestDataConverter.testConvert_Boolean()", "constructor": false, "full_signature": "@Test public void testConvert_Boolean()", "identifier": "testConvert_Bool...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_33
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToImmutableSet_Parallel() {\n\t\tList<Integer> vals = Arrays.asList(5, 1, 22, 4, 8, 9, 3, 3, 989);\n\t\tImmutableSet<Integer> res = vals.parallelStream().collect(toImmutableSet());\n\t\tassertEquals(\"[5, 1, 22, 4, 8, 9, 3, 989]\", res.toString());\n\t}", "class_method_signature"...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T> Collector<T, ?, ImmutableSet<T>> toImmutableSet() {\n\t\tSupplier<ImmutableSet.Builder<T>> supplier = ImmutableSet.Builder::new;\n\t\tBiConsumer<ImmutableSet.Builder<T>, T> accumulator = (b, v) -> b.add(v);\n\t\tBinaryOperator<ImmutableSet.Builder<T>> combiner = (l, r) -> l.addAll(r.build...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_13
{ "fields": [ { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate CookieStorage storage;", "type": "CookieStorage", "var_name": "storage" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/common/TestCookieStorage.java...
{ "body": "@Test(expected = BeanValidationException.class)\n\tpublic void testStoreCookieAsJson_Validation() {\n\t\tstorage.storeCookieAsJson(CookieName.cyclop_prefs, null);\n\t}", "class_method_signature": "TestCookieStorage.testStoreCookieAsJson_Validation()", "constructor": false, "full_signature": "@Test(ex...
{ "fields": [ { "declarator": "marshaller", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate JsonMarshaller marshaller;", "type": "JsonMarshaller", "var_name": "marshaller" }, { "declarator": "appConfig", "modifier": "@Inject\n\tprivate", ...
{ "body": "public void storeCookieAsJson(@NotNull CookieName cookieName, @NotNull Object obj) {\n\t\tString objStr = marshaller.marshal(obj);\n\t\tstoreCookie(cookieName, objStr);\n\t}", "class_method_signature": "CookieStorage.storeCookieAsJson(@NotNull CookieName cookieName, @NotNull Object obj)", "constructor"...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_1
{ "fields": [ { "declarator": "service", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DummyValService service;", "type": "DummyValService", "var_name": "service" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/validation/TestAopValidator.java"...
{ "body": "@Test\n\tpublic void testMultpileParamsWithViolations() {\n\t\ttry {\n\t\t\tservice.mixedParams(new CqlKeySpace(\" \"), new CqlTable(\" \"), null);\n\t\t\tfail();\n\t\t} catch (BeanValidationException ve) {\n\t\t\tString msg = ve.getMessage();\n\t\t\tassertTrue(msg, msg.contains(\"METHOD_PARAM_INDEX_0=[Con...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AopValidator.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(AopValidator.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "private boolean contains(Annotation[] annotations, Class<?> annotation) {\n\t\tOptional<Annotation> res = Arrays.asList(annotations).stream()\n\t\t\t\t.filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst();\n\t\treturn res.isPresent();\n\t}", "class_method_signature": "AopValidator.con...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_44
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testDecorate_ContainitgWords_FewLonger() {\n\t\tString decorated = StringHelper\n\t\t\t\t.decorate(\n\t\t\t\t\t\t\"select fromstore,demo45,demo123,demo1,demo342,demos231,demos12 from cqldemo.mybooks where id=1122 and some value is not .... fromstone\",\n\t\t\t\t\t\tTD, \"fromsto\", \"f...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static String decorate(String toDecorate, StringDecorator decorator, String... keywordsLc) {\n\tString prefix = decorator.prefix();\n\tString postfix = decorator.postfix();\n\n\tint prefixLength = prefix.length();\n\tStringBuilder buf = new StringBuilder(toDecorate);\n\tfor (String keyword : sortByS...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_52
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/web/common/TestJsUtils.java", "identifier": "TestJsUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void testEscapeStrArray_Null() {\n\t\tassertNull(JsUtils.escapeStrArray(null));\n\t}", "class_method_signature": "TestJsUtils.testEscapeStrArray_Null()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/web/common/JsUtils.java", "identifier": "JsUtils", "interfaces": "", "methods": [ { "class_method_signature": "JsUtils.escape(String param)", "constructor": false, "full_signature": "public static String escape(String param)...
{ "body": "public static String escapeStrArray(Collection<String> col) {\n\t\treturn escapeArray(col, s -> s.toString());\n\t}", "class_method_signature": "JsUtils.escapeStrArray(Collection<String> col)", "constructor": false, "full_signature": "public static String escapeStrArray(Collection<String> col)", "i...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_29
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToNaturalImmutableSortedSet_Sort() {\n\t\tList<String> vals = Arrays.asList(\"charlie\", \"bravo\", \"delta\", \"india\", \"echo\", \"alpha\");\n\t\tImmutableSet<String> res = vals.stream().collect(toNaturalImmutableSortedSet());\n\t\tassertEquals(\"[alpha, bravo, charlie, delta, e...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T extends Comparable<?>> Collector<T, ?, ImmutableSortedSet<T>> toNaturalImmutableSortedSet() {\n\t\tSupplier<ImmutableSortedSet.Builder<T>> supplier = ImmutableSortedSet::naturalOrder;\n\t\tBiConsumer<ImmutableSortedSet.Builder<T>, T> accumulator = (b, v) -> b.add(v);\n\t\tBinaryOperator<Im...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_28
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_Float() {\n\t\tassertEquals(\"1.2123457E23\", converter.convert(Float.valueOf(121234567898765412234232F)));\n\t}", "class_method_signature": "TestDataConverter.testConvert_Float()", "constructor": false, "full_signature": "@Test public void testConvert_Float()", "id...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_53
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/web/common/TestJsUtils.java", "identifier": "TestJsUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testEscapeArray() {\n\t\tassertEquals(\"[\\\"col 1\\\",\\\"col 1231\\\",\\\"2col 41\\\"]\", JsUtils.escapeArray(ImmutableSet.of(new CqlColumnName(\n\t\t\t\t\"col 1\"), new CqlColumnName(\"col 1\"), new CqlColumnName(\"col 1231\"), new CqlColumnName(\"2col 41\"))));\n\t}", "class_meth...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/web/common/JsUtils.java", "identifier": "JsUtils", "interfaces": "", "methods": [ { "class_method_signature": "JsUtils.escape(String param)", "constructor": false, "full_signature": "public static String escape(String param)...
{ "body": "public static <T extends DisplaySupport> String escapeArray(Collection<T> col) {\n\t\tif (col == null) {\n\t\t\tthrow new IllegalArgumentException(\"Null param\");\n\t\t}\n\t\treturn escapeArray(col, o -> o.toDisplayString());\n\t}", "class_method_signature": "JsUtils.escapeArray(Collection<T> col)", "...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_0
{ "fields": [ { "declarator": "service", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DummyValService service;", "type": "DummyValService", "var_name": "service" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/validation/TestAopValidator.java"...
{ "body": "@Test\n\tpublic void testSingleNullParamViolation() {\n\t\ttry {\n\t\t\tassertEquals(\"abc\", service.singleStringParam(null));\n\t\t\tfail();\n\t\t} catch (BeanValidationException ve) {\n\t\t\tString msg = ve.getMessage();\n\t\t\tassertTrue(msg, msg.contains(\"METHOD_PARAM_INDEX_0=[NULL_ROOT_OBJECT]\"));\...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AopValidator.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(AopValidator.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "private boolean contains(Annotation[] annotations, Class<?> annotation) {\n\t\tOptional<Annotation> res = Arrays.asList(annotations).stream()\n\t\t\t\t.filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst();\n\t\treturn res.isPresent();\n\t}", "class_method_signature": "AopValidator.con...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_45
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testDecorate_LowerCase() {\n\t\tString decorated = StringHelper.decorate(\n\t\t\t\t\"select * from cqldemo.mybooks where id=1122 and some value is not .... from\", TD, \"from\", \"112\",\n\t\t\t\t\"demo\", \"not\");\n\n\t\tassertEquals(\n\t\t\t\t\"select * +++++from-- cql+++++demo--.my...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static String decorate(String toDecorate, StringDecorator decorator, String... keywordsLc) {\n\tString prefix = decorator.prefix();\n\tString postfix = decorator.postfix();\n\n\tint prefixLength = prefix.length();\n\tStringBuilder buf = new StringBuilder(toDecorate);\n\tfor (String keyword : sortByS...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_12
{ "fields": [ { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate CookieStorage storage;", "type": "CookieStorage", "var_name": "storage" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/common/TestCookieStorage.java...
{ "body": "@Test(expected = BeanValidationException.class)\n\tpublic void testStoreCookie_Validation() {\n\t\tstorage.storeCookie(null, null);\n\t}", "class_method_signature": "TestCookieStorage.testStoreCookie_Validation()", "constructor": false, "full_signature": "@Test(expected = BeanValidationException.clas...
{ "fields": [ { "declarator": "marshaller", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate JsonMarshaller marshaller;", "type": "JsonMarshaller", "var_name": "marshaller" }, { "declarator": "appConfig", "modifier": "@Inject\n\tprivate", ...
{ "body": "protected void storeCookie(@NotNull CookieName name, @NotNull String value) {\n\t\tRequestCycle requestCycle = RequestCycle.get();\n\t\tif (requestCycle == null) {\n\t\t\tLOG.warn(\"RequestCycle is null - cannot read cookies\");\n\t\t\treturn;\n\t\t}\n\t\tWebResponse response = (WebResponse) requestCycle.g...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_32
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToImmutableSet_Sort() {\n\t\tList<Integer> vals = Arrays.asList(5, 1, 22, 4, 8, 9, 3, 3, 989);\n\t\tImmutableSet<Integer> res = vals.stream().collect(toImmutableSet());\n\t\tassertEquals(\"[5, 1, 22, 4, 8, 9, 3, 989]\", res.toString());\n\t}", "class_method_signature": "TestGulle...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T> Collector<T, ?, ImmutableSet<T>> toImmutableSet() {\n\t\tSupplier<ImmutableSet.Builder<T>> supplier = ImmutableSet.Builder::new;\n\t\tBiConsumer<ImmutableSet.Builder<T>, T> accumulator = (b, v) -> b.add(v);\n\t\tBinaryOperator<ImmutableSet.Builder<T>> combiner = (l, r) -> l.addAll(r.build...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_24
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_BigDecimal() {\n\t\tassertEquals(\"123.32444\", converter.convert(BigDecimal.valueOf(123.32444)));\n\t}", "class_method_signature": "TestDataConverter.testConvert_BigDecimal()", "constructor": false, "full_signature": "@Test public void testConvert_BigDecimal()", "i...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_49
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/web/common/TestJsUtils.java", "identifier": "TestJsUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void testEscape_Null() {\n\t\tassertNull(JsUtils.escape(null));\n\t}", "class_method_signature": "TestJsUtils.testEscape_Null()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void testEscape...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/web/common/JsUtils.java", "identifier": "JsUtils", "interfaces": "", "methods": [ { "class_method_signature": "JsUtils.escape(String param)", "constructor": false, "full_signature": "public static String escape(String param)...
{ "body": "public static String escape(String param) {\n\t\tif (param == null) {\n\t\t\tthrow new IllegalArgumentException(\"Null param\");\n\t\t}\n\t\treturn \"\\\"\" + param + \"\\\"\";\n\t}", "class_method_signature": "JsUtils.escape(String param)", "constructor": false, "full_signature": "public static Stri...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_15
{ "fields": [ { "declarator": "marshaller", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate JsonMarshaller marshaller;", "type": "JsonMarshaller", "var_name": "marshaller" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestJson...
{ "body": "@Test\n\tpublic void testUnmarshal() {\n\t\tUserPreferences res = marshaller.unmarshal(UserPreferences.class, \"{\\\"e_hi\\\":\\\"0\\\",\\\"e_he\\\":\\\"1\\\"}\");\n\n\t\tUserPreferences up = new UserPreferences();\n\t\tup.setShowCqlCompletionHint(false);\n\t\tassertEquals(up, res);\n\t}", "class_method_...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(JsonMarshaller.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(JsonMarshaller.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "public @NotNull <T> T unmarshal(@NotNull Class<T> clazz, @NotNull @NotEmpty String input) {\n\n\t\tT unmarshalObj;\n\t\ttry {\n\t\t\tunmarshalObj = objectMapper.get().readValue(input, clazz);\n\t\t} catch (IOException e) {\n\t\t\tthrow new ServiceException(\"Got IOException during json unmarshalling: \" + ...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_7
{ "fields": [ { "declarator": "config", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate AppConfig config;", "type": "AppConfig", "var_name": "config" }, { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": ...
{ "body": "@Test(expected = BeanValidationException.class)\n\tpublic void testStore_Validation() {\n\t\tstorage.store(new UserIdentifier(), null);\n\t}", "class_method_signature": "TestFileStorage.testStore_Validation()", "constructor": false, "full_signature": "@Test(expected = BeanValidationException.class) p...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FileStorage.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(FileStorage.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public void store(@NotNull UserIdentifier userId, @NotNull Object entity) throws ServiceException {\n\t\tLOG.debug(\"Storing file for {}\", userId);\n\t\tPath histPath = getPath(userId, entity.getClass());\n\t\ttry (FileChannel channel = openForWrite(histPath)) {\n\t\t\tString jsonText = jsonMarshaller.mar...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_42
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testDecorate_ContainitgWords_ShorterFirst() {\n\t\tString decorated = StringHelper.decorate(\n\t\t\t\t\"select * from cqldemo.mybooks where id=1122 and some value is not .... fromstone\", TD, \"from\",\n\t\t\t\t\"fromsto\", \"112\", \"demo\", \"not\");\n\n\t\tassertEquals(\n\t\t\t\t\"s...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static String decorate(String toDecorate, StringDecorator decorator, String... keywordsLc) {\n\tString prefix = decorator.prefix();\n\tString postfix = decorator.postfix();\n\n\tint prefixLength = prefix.length();\n\tStringBuilder buf = new StringBuilder(toDecorate);\n\tfor (String keyword : sortByS...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_54
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/web/common/TestJsUtils.java", "identifier": "TestJsUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testEscapeStrArray() {\n\t\tassertEquals(\"[\\\"123123\\\",\\\"param two\\\"]\", JsUtils.escapeStrArray(ImmutableSet.of(\"123123\", \"param two\")));\n\t}", "class_method_signature": "TestJsUtils.testEscapeStrArray()", "constructor": false, "full_signature": "@Test public void te...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/web/common/JsUtils.java", "identifier": "JsUtils", "interfaces": "", "methods": [ { "class_method_signature": "JsUtils.escape(String param)", "constructor": false, "full_signature": "public static String escape(String param)...
{ "body": "public static String escapeStrArray(Collection<String> col) {\n\t\treturn escapeArray(col, s -> s.toString());\n\t}", "class_method_signature": "JsUtils.escapeStrArray(Collection<String> col)", "constructor": false, "full_signature": "public static String escapeStrArray(Collection<String> col)", "i...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_39
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testToInetAddress_OK() throws Exception {\n\t\tassertEquals(InetAddress.getByName(\"192.168.0.1\"), StringHelper.toInetAddress(\"192.168.0.1\").get());\n\t\tassertEquals(InetAddress.getByName(\"0.0.0.0\"), StringHelper.toInetAddress(\"0.0.0.0\").get());\n\t}", "class_method_signature...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static Optional<InetAddress> toInetAddress(String ip) {\n\tip = StringUtils.trimToNull(ip);\n\tif (ip == null) {\n\t return Optional.empty();\n\t}\n\tInetAddress addr = null;\n\ttry {\n\t addr = InetAddress.getByName(ip);\n\t}\n\tcatch (UnknownHostException | SecurityException e) {\n\t LOG....
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_19
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_InetAddress() {\n\t\tassertEquals(\"localhost/127.0.0.1\", converter.convert(InetAddress.getLoopbackAddress()));\n\t}", "class_method_signature": "TestDataConverter.testConvert_InetAddress()", "constructor": false, "full_signature": "@Test public void testConvert_Inet...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_23
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_Double() {\n\t\tassertEquals(\"123.32444\", converter.convert(Double.valueOf(123.32444)));\n\t}", "class_method_signature": "TestDataConverter.testConvert_Double()", "constructor": false, "full_signature": "@Test public void testConvert_Double()", "identifier": "tes...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_35
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToImmutableList_Sort() {\n\t\tList<Integer> vals = Arrays.asList(1, 3, 4, 5, 8, 9, 3, 989);\n\t\tImmutableList<Integer> res = vals.stream().collect(toImmutableList());\n\t\tassertEquals(\"[1, 3, 4, 5, 8, 9, 3, 989]\", res.toString());\n\t}", "class_method_signature": "TestGullect...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T> Collector<T, ?, ImmutableList<T>> toImmutableList() {\n\t\tSupplier<ImmutableList.Builder<T>> supplier = ImmutableList.Builder::new;\n\t\tBiConsumer<ImmutableList.Builder<T>, T> accumulator = (b, v) -> b.add(v);\n\t\tBinaryOperator<ImmutableList.Builder<T>> combiner = (l, r) -> l.addAll(r...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_34
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToImmutableSet_Empty() {\n\t\tList<String> vals = Arrays.asList();\n\t\tImmutableSet<String> res = vals.stream().collect(toImmutableSet());\n\t\tassertTrue(res.isEmpty());\n\t}", "class_method_signature": "TestGullectors.testToImmutableSet_Empty()", "constructor": false, "ful...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T> Collector<T, ?, ImmutableSet<T>> toImmutableSet() {\n\t\tSupplier<ImmutableSet.Builder<T>> supplier = ImmutableSet.Builder::new;\n\t\tBiConsumer<ImmutableSet.Builder<T>, T> accumulator = (b, v) -> b.add(v);\n\t\tBinaryOperator<ImmutableSet.Builder<T>> combiner = (l, r) -> l.addAll(r.build...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_22
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_BigInteger() {\n\t\tassertEquals(\"1393832026821\", converter.convert(BigInteger.valueOf(1393832026821L)));\n\t}", "class_method_signature": "TestDataConverter.testConvert_BigInteger()", "constructor": false, "full_signature": "@Test public void testConvert_BigInteger...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_18
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_String() {\n\t\tassertEquals(\"abc cde \", converter.convert(\"abc cde \"));\n\t}", "class_method_signature": "TestDataConverter.testConvert_String()", "constructor": false, "full_signature": "@Test public void testConvert_String()", "identifier": "testConvert_Strin...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_38
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToImmutableMap_Empty() {\n\t\tList<Data> vals = Arrays.asList();\n\t\tImmutableMap<Integer, String> res = vals.stream().collect(toImmutableMap(d -> d.ii, d -> d.ss));\n\t\tassertTrue(res.isEmpty());\n\t}", "class_method_signature": "TestGullectors.testToImmutableMap_Empty()", "...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T, K, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(\n\t\t\tFunction<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) {\n\n\t\tSupplier<ImmutableMap.Builder<K, V>> supplier = ImmutableMap.Builder::new;\n\t\tBiConsumer<ImmutableMap.Builder<K, V>, T> acc...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_6
{ "fields": [ { "declarator": "config", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate AppConfig config;", "type": "AppConfig", "var_name": "config" }, { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": ...
{ "body": "@Test(expected = BeanValidationException.class)\n\tpublic void testRead_Validation_IncorrectUserIdentifier() {\n\t\tstorage.read(new UserIdentifier(null), String.class);\n\t}", "class_method_signature": "TestFileStorage.testRead_Validation_IncorrectUserIdentifier()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FileStorage.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(FileStorage.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public @Valid <T> Optional<T> read(@NotNull UserIdentifier userId, @NotNull Class<T> clazz) throws ServiceException {\n\t\tPath filePath = getPath(userId, clazz);\n\t\tLOG.debug(\"Reading file {} for {}\", filePath, userId);\n\t\ttry (FileChannel channel = openForRead(filePath)) {\n\t\t\tif (channel == nul...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_43
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testDecorate_ContainitgWords_LongerFirst() {\n\t\tString decorated = StringHelper.decorate(\n\t\t\t\t\"select * from cqldemo.mybooks where id=1122 and some value is not .... fromstone\", TD, \"fromsto\",\n\t\t\t\t\"from\", \"112\", \"demo\", \"not\");\n\n\t\tassertEquals(\n\t\t\t\t\"se...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static String decorate(String toDecorate, StringDecorator decorator, String... keywordsLc) {\n\tString prefix = decorator.prefix();\n\tString postfix = decorator.postfix();\n\n\tint prefixLength = prefix.length();\n\tStringBuilder buf = new StringBuilder(toDecorate);\n\tfor (String keyword : sortByS...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_14
{ "fields": [ { "declarator": "marshaller", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate JsonMarshaller marshaller;", "type": "JsonMarshaller", "var_name": "marshaller" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestJson...
{ "body": "@Test\n\tpublic void testMarshal() {\n\t\tUserPreferences up = new UserPreferences();\n\t\tup.setShowCqlCompletionHint(false);\n\t\tString res = marshaller.marshal(up);\n\t\tassertEquals(\n\t\t\t\t\"{\\\"e_hi\\\":\\\"0\\\",\\\"e_he\\\":\\\"1\\\",\\\"e_ro\\\":0,\\\"i_hi\\\":\\\"1\\\",\\\"i_ce\\\":\\\"0\\\",...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(JsonMarshaller.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(JsonMarshaller.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "public @NotNull String marshal(@NotNull Object obj) {\n\t\tbyte[] marshalBytes;\n\t\ttry {\n\t\t\tmarshalBytes = objectMapper.get().writeValueAsBytes(obj);\n\t\t} catch (IOException e) {\n\t\t\tthrow new ServiceException(\"Gout IOException during json marshalling: \" + e.getMessage() + \" - input:'\"\n\t\t...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_40
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testToInetAddress_Incorrect() throws Exception {\n\n\t\t{\n\t\t\tOptional<InetAddress> addr = StringHelper.toInetAddress(\"192.1328.01\");\n\t\t\tassertFalse(addr.toString(), addr.isPresent());\n\t\t}\n\n\t\t{\n\t\t\tOptional<InetAddress> addr = StringHelper.toInetAddress(null);\n\t\t\...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static Optional<InetAddress> toInetAddress(String ip) {\n\tip = StringUtils.trimToNull(ip);\n\tif (ip == null) {\n\t return Optional.empty();\n\t}\n\tInetAddress addr = null;\n\ttry {\n\t addr = InetAddress.getByName(ip);\n\t}\n\tcatch (UnknownHostException | SecurityException e) {\n\t LOG....
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_5
{ "fields": [ { "declarator": "config", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate AppConfig config;", "type": "AppConfig", "var_name": "config" }, { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": ...
{ "body": "@Test(expected = BeanValidationException.class)\n\tpublic void testRead_Validation() {\n\t\tstorage.read(new UserIdentifier(), null);\n\t}", "class_method_signature": "TestFileStorage.testRead_Validation()", "constructor": false, "full_signature": "@Test(expected = BeanValidationException.class) publ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FileStorage.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(FileStorage.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public @Valid <T> Optional<T> read(@NotNull UserIdentifier userId, @NotNull Class<T> clazz) throws ServiceException {\n\t\tPath filePath = getPath(userId, clazz);\n\t\tLOG.debug(\"Reading file {} for {}\", filePath, userId);\n\t\ttry (FileChannel channel = openForRead(filePath)) {\n\t\t\tif (channel == nul...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_17
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_Null() {\n\t\tassertNull(converter.convert(null));\n\t}", "class_method_signature": "TestDataConverter.testConvert_Null()", "constructor": false, "full_signature": "@Test public void testConvert_Null()", "identifier": "testConvert_Null", "invocations": [ "asse...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_37
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToImmutableMap_Sort() {\n\t\tList<Data> vals = Arrays.asList(new Data(22, \"a\"), new Data(11, \"bb\"), new Data(231, \"cc\"),\n\t\t\t\tnew Data(1231, \"cc\"));\n\t\tImmutableMap<Integer, String> res = vals.stream().collect(toImmutableMap(d -> d.ii, d -> d.ss));\n\t\tassertEquals(\...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T, K, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(\n\t\t\tFunction<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) {\n\n\t\tSupplier<ImmutableMap.Builder<K, V>> supplier = ImmutableMap.Builder::new;\n\t\tBiConsumer<ImmutableMap.Builder<K, V>, T> acc...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_21
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_Date() {\n\t\tfinal String actual = converter.convert(LocalDateTime.parse(\"2014-03-03T08:33:46.821\"));\n\t\tassertEquals(\"2014-03-03 08:33:46.821\", actual);\n\t}", "class_method_signature": "TestDataConverter.testConvert_Date()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_9
{ "fields": [ { "declarator": "config", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate AppConfig config;", "type": "AppConfig", "var_name": "config" }, { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": ...
{ "body": "@Test\n\tpublic void testRead_FileNotFound() {\n\t\tassertFalse(storage.read(new UserIdentifier(UUID.randomUUID()), QueryHistory.class).isPresent());\n\t}", "class_method_signature": "TestFileStorage.testRead_FileNotFound()", "constructor": false, "full_signature": "@Test public void testRead_FileNot...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FileStorage.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(FileStorage.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public @Valid <T> Optional<T> read(@NotNull UserIdentifier userId, @NotNull Class<T> clazz) throws ServiceException {\n\t\tPath filePath = getPath(userId, clazz);\n\t\tLOG.debug(\"Reading file {} for {}\", filePath, userId);\n\t\ttry (FileChannel channel = openForRead(filePath)) {\n\t\t\tif (channel == nul...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_8
{ "fields": [ { "declarator": "config", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate AppConfig config;", "type": "AppConfig", "var_name": "config" }, { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": ...
{ "body": "@Test(expected = BeanValidationException.class)\n\tpublic void testStore_Validation_IncorrectUserIdentifier() {\n\t\tstorage.store(new UserIdentifier(null), String.class);\n\t}", "class_method_signature": "TestFileStorage.testStore_Validation_IncorrectUserIdentifier()", "constructor": false, "full_si...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FileStorage.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(FileStorage.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public void store(@NotNull UserIdentifier userId, @NotNull Object entity) throws ServiceException {\n\t\tLOG.debug(\"Storing file for {}\", userId);\n\t\tPath histPath = getPath(userId, entity.getClass());\n\t\ttry (FileChannel channel = openForWrite(histPath)) {\n\t\t\tString jsonText = jsonMarshaller.mar...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_20
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_UUID() {\n\t\tfinal UUID id = UUID.randomUUID();\n\t\tassertEquals(id.toString(), converter.convert(id));\n\t}", "class_method_signature": "TestDataConverter.testConvert_UUID()", "constructor": false, "full_signature": "@Test public void testConvert_UUID()", "identi...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_36
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToImmutableList_Parallel() {\n\t\tList<Integer> vals = Arrays.asList(1, 3, 4, 5, 8, 9, 3, 989);\n\t\tImmutableList<Integer> res = vals.parallelStream().collect(toImmutableList());\n\t\tassertEquals(\"[1, 3, 4, 5, 8, 9, 3, 989]\", res.toString());\n\t}", "class_method_signature": ...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T> Collector<T, ?, ImmutableList<T>> toImmutableList() {\n\t\tSupplier<ImmutableList.Builder<T>> supplier = ImmutableList.Builder::new;\n\t\tBiConsumer<ImmutableList.Builder<T>, T> accumulator = (b, v) -> b.add(v);\n\t\tBinaryOperator<ImmutableList.Builder<T>> combiner = (l, r) -> l.addAll(r...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_16
{ "fields": [ { "declarator": "marshaller", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate JsonMarshaller marshaller;", "type": "JsonMarshaller", "var_name": "marshaller" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestJson...
{ "body": "@Test\n\tpublic void testUnmarshalDefaults() {\n\t\tUserPreferences res = marshaller.unmarshal(UserPreferences.class, \"{\\\"e_hi\\\":\\\"0\\\"}\");\n\n\t\tUserPreferences up = new UserPreferences();\n\t\tup.setShowCqlCompletionHint(false);\n\t\tassertEquals(up, res);\n\t}", "class_method_signature": "Te...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(JsonMarshaller.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(JsonMarshaller.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "public @NotNull <T> T unmarshal(@NotNull Class<T> clazz, @NotNull @NotEmpty String input) {\n\n\t\tT unmarshalObj;\n\t\ttry {\n\t\t\tunmarshalObj = objectMapper.get().readValue(input, clazz);\n\t\t} catch (IOException e) {\n\t\t\tthrow new ServiceException(\"Got IOException during json unmarshalling: \" + ...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_41
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testDecorate_ContainsDecoratedText() {\n\t\tString decorated = StringHelper.decorate(\n\t\t\t\t\"select +++ from +++cqldemo----.mybooks where id=1122 and some value is not ++++++++ fromstone\", TD,\n\t\t\t\t\"from\", \"fromsto\", \"112\", \"demo\", \"not\", \"+++\");\n\n\t\tassertEqual...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static String decorate(String toDecorate, StringDecorator decorator, String... keywordsLc) {\n\tString prefix = decorator.prefix();\n\tString postfix = decorator.postfix();\n\n\tint prefixLength = prefix.length();\n\tStringBuilder buf = new StringBuilder(toDecorate);\n\tfor (String keyword : sortByS...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_4
{ "fields": [ { "declarator": "service", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DummyValService service;", "type": "DummyValService", "var_name": "service" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/validation/TestAopValidator.java"...
{ "body": "@Test\n\tpublic void testReturnNotEmptyViolation() {\n\t\ttry {\n\t\t\tservice.returnOptional(new CqlKeySpace(\" \"));\n\t\t\tfail();\n\t\t} catch (BeanValidationException ve) {\n\t\t\tString msg = ve.getMessage();\n\t\t\tassertTrue(msg, msg.contains(\"METHOD_RETURN_VALUE\"));\n\t\t\tassertTrue(msg, msg.co...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AopValidator.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(AopValidator.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "private boolean contains(Annotation[] annotations, Class<?> annotation) {\n\t\tOptional<Annotation> res = Arrays.asList(annotations).stream()\n\t\t\t\t.filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst();\n\t\treturn res.isPresent();\n\t}", "class_method_signature": "AopValidator.con...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_31
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToNaturalImmutableSortedSet_Empty() {\n\t\tList<String> vals = Arrays.asList();\n\t\tImmutableSortedSet<String> res = vals.stream().collect(toNaturalImmutableSortedSet());\n\t\tassertTrue(res.isEmpty());\n\t}", "class_method_signature": "TestGullectors.testToNaturalImmutableSorte...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T extends Comparable<?>> Collector<T, ?, ImmutableSortedSet<T>> toNaturalImmutableSortedSet() {\n\t\tSupplier<ImmutableSortedSet.Builder<T>> supplier = ImmutableSortedSet::naturalOrder;\n\t\tBiConsumer<ImmutableSortedSet.Builder<T>, T> accumulator = (b, v) -> b.add(v);\n\t\tBinaryOperator<Im...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_27
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_Long() {\n\t\tassertEquals(\"1212122\", converter.convert(Long.valueOf(1212122L)));\n\t}", "class_method_signature": "TestDataConverter.testConvert_Long()", "constructor": false, "full_signature": "@Test public void testConvert_Long()", "identifier": "testConvert_Lo...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_50
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/web/common/TestJsUtils.java", "identifier": "TestJsUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testEscape() {\n\t\tassertEquals(\"\\\"test value to escape .... ;)'\\\"\", JsUtils.escape(\"test value to escape .... ;)'\"));\n\t}", "class_method_signature": "TestJsUtils.testEscape()", "constructor": false, "full_signature": "@Test public void testEscape()", "identifier": "...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/web/common/JsUtils.java", "identifier": "JsUtils", "interfaces": "", "methods": [ { "class_method_signature": "JsUtils.escape(String param)", "constructor": false, "full_signature": "public static String escape(String param)...
{ "body": "public static String escape(String param) {\n\t\tif (param == null) {\n\t\t\tthrow new IllegalArgumentException(\"Null param\");\n\t\t}\n\t\treturn \"\\\"\" + param + \"\\\"\";\n\t}", "class_method_signature": "JsUtils.escape(String param)", "constructor": false, "full_signature": "public static Stri...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_46
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testDecorate_UpperCase() {\n\t\tString decorated = StringHelper.decorate(\n\t\t\t\t\"SELECT * FROM CQLDEMO.MYBOOKS WHERE ID=1122 AND SOME VALUE IS NOT .... FROM\", TD, \"from\", \"112\",\n\t\t\t\t\"demo\", \"not\");\n\n\t\tassertEquals(\n\t\t\t\t\"SELECT * +++++FROM-- CQL+++++DEMO--.MY...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static String decorate(String toDecorate, StringDecorator decorator, String... keywordsLc) {\n\tString prefix = decorator.prefix();\n\tString postfix = decorator.postfix();\n\n\tint prefixLength = prefix.length();\n\tStringBuilder buf = new StringBuilder(toDecorate);\n\tfor (String keyword : sortByS...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_3
{ "fields": [ { "declarator": "service", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DummyValService service;", "type": "DummyValService", "var_name": "service" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/validation/TestAopValidator.java"...
{ "body": "@Test\n\tpublic void testFirstParamViolation() {\n\n\t\ttry {\n\t\t\tservice.mixedParams(null, new CqlTable(\" \"), \"123\");\n\t\t\tfail();\n\t\t} catch (BeanValidationException ve) {\n\t\t\tString msg = ve.getMessage();\n\t\t\tassertTrue(msg, msg.contains(\"METHOD_PARAM_INDEX_1=\"));\n\n\t\t\tassertTrue(...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AopValidator.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(AopValidator.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "private boolean contains(Annotation[] annotations, Class<?> annotation) {\n\t\tOptional<Annotation> res = Arrays.asList(annotations).stream()\n\t\t\t\t.filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst();\n\t\treturn res.isPresent();\n\t}", "class_method_signature": "AopValidator.con...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_11
{ "fields": [ { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate CookieStorage storage;", "type": "CookieStorage", "var_name": "storage" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/common/TestCookieStorage.java...
{ "body": "@Test(expected = BeanValidationException.class)\n\tpublic void testReadCookieAsJson_Validation() {\n\t\tstorage.readCookieAsJson(null, null);\n\t}", "class_method_signature": "TestCookieStorage.testReadCookieAsJson_Validation()", "constructor": false, "full_signature": "@Test(expected = BeanValidatio...
{ "fields": [ { "declarator": "marshaller", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate JsonMarshaller marshaller;", "type": "JsonMarshaller", "var_name": "marshaller" }, { "declarator": "appConfig", "modifier": "@Inject\n\tprivate", ...
{ "body": "public @Valid <T> Optional<T> readCookieAsJson(@NotNull CookieName cookieName, @NotNull Class<T> clazz) {\n\t\ttry {\n\t\t\tOptional<Cookie> cookie = readCookie(cookieName);\n\t\t\tOptional<String> cookieValue = cookie.map(c -> StringUtils.trimToNull(c.getValue()));\n\t\t\tif (!cookieValue.isPresent()) {\n...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_10
{ "fields": [ { "declarator": "storage", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate CookieStorage storage;", "type": "CookieStorage", "var_name": "storage" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/common/TestCookieStorage.java...
{ "body": "@Test(expected = BeanValidationException.class)\n\tpublic void testReadCookie_Validation() {\n\t\tstorage.readCookie(null);\n\t}", "class_method_signature": "TestCookieStorage.testReadCookie_Validation()", "constructor": false, "full_signature": "@Test(expected = BeanValidationException.class) public...
{ "fields": [ { "declarator": "marshaller", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate JsonMarshaller marshaller;", "type": "JsonMarshaller", "var_name": "marshaller" }, { "declarator": "appConfig", "modifier": "@Inject\n\tprivate", ...
{ "body": "protected @NotNull Optional<Cookie> readCookie(@NotNull CookieName name) {\n\t\ttry {\n\t\t\tRequestCycle requestCycle = RequestCycle.get();\n\t\t\tif (requestCycle == null) {\n\t\t\t\tLOG.warn(\"RequestCycle is null - cannot read cookies\");\n\t\t\t\treturn Optional.empty();\n\t\t\t}\n\t\t\tWebRequest req...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_47
{ "fields": [ { "declarator": "TD = new TestDecorator()", "modifier": "private final static", "original_string": "private final static TestDecorator TD = new TestDecorator();", "type": "TestDecorator", "var_name": "TD" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/comm...
{ "body": "@Test\n\tpublic void testDecorate_Mixed() {\n\t\tString decorated = StringHelper.decorate(\n\t\t\t\t\"SeLEcT * FRoM CqLDEmO.MYBOoKS WhERe ID=1122 AND SOME VALUE IS not .... FROM\", TD, \"from\", \"112\",\n\t\t\t\t\"demo\", \"not\");\n\n\t\tassertEquals(\n\t\t\t\t\"SeLEcT * +++++FRoM-- CqL+++++DEmO--.MYBOoK...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(StringHelper.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(StringHelper.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "public static String decorate(String toDecorate, StringDecorator decorator, String... keywordsLc) {\n\tString prefix = decorator.prefix();\n\tString postfix = decorator.postfix();\n\n\tint prefixLength = prefix.length();\n\tStringBuilder buf = new StringBuilder(toDecorate);\n\tfor (String keyword : sortByS...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_2
{ "fields": [ { "declarator": "service", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DummyValService service;", "type": "DummyValService", "var_name": "service" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/validation/TestAopValidator.java"...
{ "body": "@Test\n\tpublic void testReturnNullObjectViolation() {\n\n\t\ttry {\n\t\t\tservice.mixedParams(null, new CqlTable(\"table\"), \"123\");\n\t\t\tfail();\n\t\t} catch (BeanValidationException ve) {\n\t\t\tString msg = ve.getMessage();\n\t\t\tassertTrue(msg, msg.contains(\"METHOD_RETURN_VALUE=[NULL_ROOT_OBJECT...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AopValidator.class)", "modifier": "private final static", "original_string": "private final static Logger LOG = LoggerFactory.getLogger(AopValidator.class);", "type": "Logger", "var_name": "LOG" } ], "file": "cyclop...
{ "body": "private boolean contains(Annotation[] annotations, Class<?> annotation) {\n\t\tOptional<Annotation> res = Arrays.asList(annotations).stream()\n\t\t\t\t.filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst();\n\t\treturn res.isPresent();\n\t}", "class_method_signature": "AopValidator.con...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_51
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/web/common/TestJsUtils.java", "identifier": "TestJsUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void testEscapeArray_Null() {\n\t\tassertNull(JsUtils.escapeArray(null));\n\t}", "class_method_signature": "TestJsUtils.testEscapeArray_Null()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public ...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/web/common/JsUtils.java", "identifier": "JsUtils", "interfaces": "", "methods": [ { "class_method_signature": "JsUtils.escape(String param)", "constructor": false, "full_signature": "public static String escape(String param)...
{ "body": "public static <T extends DisplaySupport> String escapeArray(Collection<T> col) {\n\t\tif (col == null) {\n\t\t\tthrow new IllegalArgumentException(\"Null param\");\n\t\t}\n\t\treturn escapeArray(col, o -> o.toDisplayString());\n\t}", "class_method_signature": "JsUtils.escapeArray(Collection<T> col)", "...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_26
{ "fields": [ { "declarator": "converter", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate DataConverter converter;", "type": "DataConverter", "var_name": "converter" } ], "file": "cyclop-webapp/src/test/java/org/cyclop/service/converter/TestDataConve...
{ "body": "@Test\n\tpublic void testConvert_Integer() {\n\t\tassertEquals(\"1212122\", converter.convert(Integer.valueOf(1212122)));\n\t}", "class_method_signature": "TestDataConverter.testConvert_Integer()", "constructor": false, "full_signature": "@Test public void testConvert_Integer()", "identifier": "tes...
{ "fields": [ { "declarator": "dateFomrat", "modifier": "private final", "original_string": "private final ThreadLocal<SimpleDateFormat> dateFomrat;", "type": "ThreadLocal<SimpleDateFormat>", "var_name": "dateFomrat" }, { "declarator": "timeFormatter", "modifier":...
{ "body": "public String convert(Object val) {\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString converted;\n\t\tif (val instanceof String) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof InetAddress) {\n\t\t\tconverted = val.toString();\n\n\t\t} else if (val instanceof UUID) {\n\t\...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
15104745_30
{ "fields": [], "file": "cyclop-webapp/src/test/java/org/cyclop/common/TestGullectors.java", "identifier": "TestGullectors", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testToNaturalImmutableSortedSet_Parallel() {\n\t\tList<String> vals = Arrays.asList(\"charlie\", \"bravo\", \"delta\", \"india\", \"echo\", \"alpha\");\n\t\tImmutableSet<String> res = vals.parallelStream().collect(toNaturalImmutableSortedSet());\n\t\tassertEquals(\"[alpha, bravo, charl...
{ "fields": [], "file": "cyclop-webapp/src/main/java/org/cyclop/common/Gullectors.java", "identifier": "Gullectors", "interfaces": "", "methods": [ { "class_method_signature": "Gullectors.toImmutableList()", "constructor": false, "full_signature": "public static Collector<T, ?, Immutable...
{ "body": "public static <T extends Comparable<?>> Collector<T, ?, ImmutableSortedSet<T>> toNaturalImmutableSortedSet() {\n\t\tSupplier<ImmutableSortedSet.Builder<T>> supplier = ImmutableSortedSet::naturalOrder;\n\t\tBiConsumer<ImmutableSortedSet.Builder<T>, T> accumulator = (b, v) -> b.add(v);\n\t\tBinaryOperator<Im...
{ "created": null, "fork": null, "fork_count": 14, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15104745, "size": 13861, "stargazer_count": 59, "stars": null, "updates": null, "url": "https://github.com/maciejmiklas/cyclop" }
110526820_2
{ "fields": [ { "declarator": "projectService", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private ProjectServiceImpl projectService;", "type": "ProjectServiceImpl", "var_name": "projectService" }, { "declarator": "modelService", ...
{ "body": "@Test\n public void should_returnEmptyLists_when_thereAreNotAssigneeAndCandidateUsersAndGroups() {\n List<UserTask> userTasks = asList(taskOne, taskTwo);\n\n when(taskOne.getCandidateGroups()).thenReturn(null);\n when(taskOne.getCandidateUsers()).thenReturn(null);\n when(task...
{ "fields": [ { "declarator": "EXPRESSION_REGEX = Pattern.compile(\"^\\\\$\\\\{[\\\\p{Graph}]+\\\\}+$\")", "modifier": "private final static", "original_string": "private final static Pattern EXPRESSION_REGEX = Pattern.compile(\"^\\\\$\\\\{[\\\\p{Graph}]+\\\\}+$\");", "type": "Pattern", ...
{ "body": "@Override\n public ProjectAccessControl getProjectAccessControl(Project project){\n List<UserTask> userTasks = modelService.getTasksBy(project, new ProcessModelType(), UserTask.class);\n\n Set<String> users = extractFromTasks(this::selectUsers, userTasks);\n Set<String> groups = ext...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_3
{ "fields": [ { "declarator": "projectService", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private ProjectServiceImpl projectService;", "type": "ProjectServiceImpl", "var_name": "projectService" }, { "declarator": "modelService", ...
{ "body": "@Test\n public void should_returnEmptyLists_when_thereAreNotUserTasks() {\n List<UserTask> userTasks = new LinkedList<>();\n when(modelService.getTasksBy(eq(project), any(ProcessModelType.class), eq(UserTask.class)))\n .thenReturn(userTasks);\n\n ProjectAccessControl ...
{ "fields": [ { "declarator": "EXPRESSION_REGEX = Pattern.compile(\"^\\\\$\\\\{[\\\\p{Graph}]+\\\\}+$\")", "modifier": "private final static", "original_string": "private final static Pattern EXPRESSION_REGEX = Pattern.compile(\"^\\\\$\\\\{[\\\\p{Graph}]+\\\\}+$\");", "type": "Pattern", ...
{ "body": "@Override\n public ProjectAccessControl getProjectAccessControl(Project project){\n List<UserTask> userTasks = modelService.getTasksBy(project, new ProcessModelType(), UserTask.class);\n\n Set<String> users = extractFromTasks(this::selectUsers, userTasks);\n Set<String> groups = ext...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_4
{ "fields": [ { "declarator": "modelService", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private ModelServiceImpl modelService;", "type": "ModelServiceImpl", "var_name": "modelService" }, { "declarator": "jsonConverter", "modifi...
{ "body": "@Test\n public void should_returnException_when_classTypeIsNotSpecified() {\n ProcessModelType modelType = new ProcessModelType();\n\n assertThatThrownBy(() -> modelService.getTasksBy(projectOne, modelType, null))\n .isInstanceOf(IllegalArgumentException.class)\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ModelServiceImpl.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ModelServiceImpl.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "@Override\n public <T extends Task> List<T> getTasksBy(Project project, ModelType processModelType, @NonNull Class<T> clazz) {\n Assert.notNull(clazz, \"Class task type it must not be null\");\n return getProcessesBy(project, processModelType)\n .stream()\n .m...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_12
{ "fields": [ { "declarator": "referenceIdOverrider", "modifier": "private", "original_string": "private ReferenceIdOverrider referenceIdOverrider;", "type": "ReferenceIdOverrider", "var_name": "referenceIdOverrider" } ], "file": "activiti-cloud-services-modeling/activiti-clo...
{ "body": "@Test\n public void should_notOverrideStartEvent_when_sameFormKey() {\n StartEvent startEvent = new StartEvent();\n startEvent.setFormKey(\"sameFormKey\");\n\n referenceIdOverrider.override(startEvent);\n\n assertThat(startEvent.getFormKey()).isEqualTo(\"sameFormKey\");\n ...
{ "fields": [ { "declarator": "modelIdentifiers = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, String> modelIdentifiers = new HashMap<>();", "type": "Map<String, String>", "var_name": "modelIdentifiers" } ], "file": "activiti-cloud-services...
{ "body": "@Override\n public void override(UserTask userTask) {\n String oldFormKey = userTask.getFormKey();\n String newFormKey = modelIdentifiers.get(oldFormKey);\n if (newFormKey != null) {\n userTask.setFormKey(newFormKey);\n }\n }", "class_method_signature": "Refer...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_8
{ "fields": [ { "declarator": "referenceIdOverrider", "modifier": "private", "original_string": "private ReferenceIdOverrider referenceIdOverrider;", "type": "ReferenceIdOverrider", "var_name": "referenceIdOverrider" } ], "file": "activiti-cloud-services-modeling/activiti-clo...
{ "body": "@Test\n public void should_overrideUserTask_when_hasNewFormKey() {\n UserTask userTask = new UserTask();\n userTask.setFormKey(\"oldFormKey\");\n\n referenceIdOverrider.override(userTask);\n\n assertThat(userTask.getFormKey()).isEqualTo(\"newFormKey\");\n }", "class_meth...
{ "fields": [ { "declarator": "modelIdentifiers = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, String> modelIdentifiers = new HashMap<>();", "type": "Map<String, String>", "var_name": "modelIdentifiers" } ], "file": "activiti-cloud-services...
{ "body": "@Override\n public void override(UserTask userTask) {\n String oldFormKey = userTask.getFormKey();\n String newFormKey = modelIdentifiers.get(oldFormKey);\n if (newFormKey != null) {\n userTask.setFormKey(newFormKey);\n }\n }", "class_method_signature": "Refer...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_9
{ "fields": [ { "declarator": "referenceIdOverrider", "modifier": "private", "original_string": "private ReferenceIdOverrider referenceIdOverrider;", "type": "ReferenceIdOverrider", "var_name": "referenceIdOverrider" } ], "file": "activiti-cloud-services-modeling/activiti-clo...
{ "body": "@Test\n public void should_notOverrideUserTask_when_sameFormKey() {\n UserTask userTask = new UserTask();\n userTask.setFormKey(\"sameFormKey\");\n\n referenceIdOverrider.override(userTask);\n\n assertThat(userTask.getFormKey()).isEqualTo(\"sameFormKey\");\n }", "class_m...
{ "fields": [ { "declarator": "modelIdentifiers = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, String> modelIdentifiers = new HashMap<>();", "type": "Map<String, String>", "var_name": "modelIdentifiers" } ], "file": "activiti-cloud-services...
{ "body": "@Override\n public void override(UserTask userTask) {\n String oldFormKey = userTask.getFormKey();\n String newFormKey = modelIdentifiers.get(oldFormKey);\n if (newFormKey != null) {\n userTask.setFormKey(newFormKey);\n }\n }", "class_method_signature": "Refer...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_13
{ "fields": [ { "declarator": "referenceIdOverrider", "modifier": "private", "original_string": "private ReferenceIdOverrider referenceIdOverrider;", "type": "ReferenceIdOverrider", "var_name": "referenceIdOverrider" } ], "file": "activiti-cloud-services-modeling/activiti-clo...
{ "body": "@Test\n public void should_overrideStartEvent_when_notNewFormKey() {\n StartEvent startEvent = new StartEvent();\n startEvent.setFormKey(\"notNewFormKey\");\n\n referenceIdOverrider.override(startEvent);\n\n assertThat(startEvent.getFormKey()).isEqualTo(\"notNewFormKey\");\n ...
{ "fields": [ { "declarator": "modelIdentifiers = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, String> modelIdentifiers = new HashMap<>();", "type": "Map<String, String>", "var_name": "modelIdentifiers" } ], "file": "activiti-cloud-services...
{ "body": "@Override\n public void override(UserTask userTask) {\n String oldFormKey = userTask.getFormKey();\n String newFormKey = modelIdentifiers.get(oldFormKey);\n if (newFormKey != null) {\n userTask.setFormKey(newFormKey);\n }\n }", "class_method_signature": "Refer...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_5
{ "fields": [ { "declarator": "modelService", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private ModelServiceImpl modelService;", "type": "ModelServiceImpl", "var_name": "modelService" }, { "declarator": "jsonConverter", "modifi...
{ "body": "@Test\n public void should_returnProcessExtensionsFileForTheModelGiven() throws IOException, XMLStreamException {\n ProcessModelType modelType = new ProcessModelType();\n ModelImpl extensionModelImpl = this.createModelImpl();\n when(modelRepository.getModelType()).thenReturn(ModelIm...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ModelServiceImpl.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ModelServiceImpl.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "@Override\n public Optional<FileContent> getModelExtensionsFileContent(Model model) {\n if (model.getExtensions() == null && isJsonContentType(model.getContentType())) {\n return Optional.empty();\n }\n\n Model fullModel = findModelById(model.getId()).orElse(model);\n ...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_10
{ "fields": [ { "declarator": "referenceIdOverrider", "modifier": "private", "original_string": "private ReferenceIdOverrider referenceIdOverrider;", "type": "ReferenceIdOverrider", "var_name": "referenceIdOverrider" } ], "file": "activiti-cloud-services-modeling/activiti-clo...
{ "body": "@Test\n public void should_overrideUserTask_when_notNewFormKey() {\n UserTask userTask = new UserTask();\n userTask.setFormKey(\"notNewFormKey\");\n\n referenceIdOverrider.override(userTask);\n\n assertThat(userTask.getFormKey()).isEqualTo(\"notNewFormKey\");\n }", "clas...
{ "fields": [ { "declarator": "modelIdentifiers = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, String> modelIdentifiers = new HashMap<>();", "type": "Map<String, String>", "var_name": "modelIdentifiers" } ], "file": "activiti-cloud-services...
{ "body": "@Override\n public void override(UserTask userTask) {\n String oldFormKey = userTask.getFormKey();\n String newFormKey = modelIdentifiers.get(oldFormKey);\n if (newFormKey != null) {\n userTask.setFormKey(newFormKey);\n }\n }", "class_method_signature": "Refer...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_6
{ "fields": [ { "declarator": "processModelContentConverter", "modifier": "private", "original_string": "private ProcessModelContentConverter processModelContentConverter;", "type": "ProcessModelContentConverter", "var_name": "processModelContentConverter" }, { "declara...
{ "body": "@Test\n public void should_notOverrideModelId_whenModelContentEmpty() {\n FileContent fileContent = mock(FileContent.class);\n byte[] emptyByteArray = new byte[0];\n given(fileContent.getFileContent()).willReturn(emptyByteArray);\n\n Map<String, String> modelIds = new HashMap...
{ "fields": [ { "declarator": "processModelType", "modifier": "private final", "original_string": "private final ProcessModelType processModelType;", "type": "ProcessModelType", "var_name": "processModelType" }, { "declarator": "bpmnConverter", "modifier": "privat...
{ "body": "@Override\n public FileContent overrideModelId(FileContent fileContent,\n Map<String, String> modelIdentifiers) {\n FileContent newFileContent;\n Optional<BpmnProcessModelContent> processModelContent = this.convertToModelContent(fileContent.getFileCont...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_7
{ "fields": [ { "declarator": "processModelContentConverter", "modifier": "private", "original_string": "private ProcessModelContentConverter processModelContentConverter;", "type": "ProcessModelContentConverter", "var_name": "processModelContentConverter" }, { "declara...
{ "body": "@Test\n public void should_overrideAllProcessDefinition_when_newProcessId() {\n Process process = new Process();\n process.addFlowElement(flowElement);\n\n BpmnModel bpmnModel = new BpmnModel();\n bpmnModel.addProcess(process);\n BpmnProcessModelContent processModelCon...
{ "fields": [ { "declarator": "processModelType", "modifier": "private final", "original_string": "private final ProcessModelType processModelType;", "type": "ProcessModelType", "var_name": "processModelType" }, { "declarator": "bpmnConverter", "modifier": "privat...
{ "body": "public void overrideAllProcessDefinition(BpmnProcessModelContent processModelContent,\n ReferenceIdOverrider referenceIdOverrider) {\n processModelContent.getBpmnModel().getProcesses().forEach(process -> {\n overrideAllIdReferences(process, refe...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_11
{ "fields": [ { "declarator": "referenceIdOverrider", "modifier": "private", "original_string": "private ReferenceIdOverrider referenceIdOverrider;", "type": "ReferenceIdOverrider", "var_name": "referenceIdOverrider" } ], "file": "activiti-cloud-services-modeling/activiti-clo...
{ "body": "@Test\n public void should_overrideStartEvent_when_hasNewFormKey() {\n StartEvent startEvent = new StartEvent();\n startEvent.setFormKey(\"oldFormKey\");\n\n referenceIdOverrider.override(startEvent);\n\n assertThat(startEvent.getFormKey()).isEqualTo(\"newFormKey\");\n }",...
{ "fields": [ { "declarator": "modelIdentifiers = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, String> modelIdentifiers = new HashMap<>();", "type": "Map<String, String>", "var_name": "modelIdentifiers" } ], "file": "activiti-cloud-services...
{ "body": "@Override\n public void override(UserTask userTask) {\n String oldFormKey = userTask.getFormKey();\n String newFormKey = modelIdentifiers.get(oldFormKey);\n if (newFormKey != null) {\n userTask.setFormKey(newFormKey);\n }\n }", "class_method_signature": "Refer...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_0
{ "fields": [ { "declarator": "projectService", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private ProjectServiceImpl projectService;", "type": "ProjectServiceImpl", "var_name": "projectService" }, { "declarator": "modelService", ...
{ "body": "@Test\n public void should_getUsersAndGroupsBelongingToAProject_when_getProcessAccessControl() {\n List<UserTask> userTasks = asList(taskOne, taskTwo);\n\n when(taskOne.getCandidateGroups()).thenReturn(asList(\"groupOne\", \"groupTwo\"));\n when(taskOne.getCandidateUsers()).thenRetu...
{ "fields": [ { "declarator": "EXPRESSION_REGEX = Pattern.compile(\"^\\\\$\\\\{[\\\\p{Graph}]+\\\\}+$\")", "modifier": "private final static", "original_string": "private final static Pattern EXPRESSION_REGEX = Pattern.compile(\"^\\\\$\\\\{[\\\\p{Graph}]+\\\\}+$\");", "type": "Pattern", ...
{ "body": "@Override\n public ProjectAccessControl getProjectAccessControl(Project project){\n List<UserTask> userTasks = modelService.getTasksBy(project, new ProcessModelType(), UserTask.class);\n\n Set<String> users = extractFromTasks(this::selectUsers, userTasks);\n Set<String> groups = ext...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
110526820_1
{ "fields": [ { "declarator": "projectService", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private ProjectServiceImpl projectService;", "type": "ProjectServiceImpl", "var_name": "projectService" }, { "declarator": "modelService", ...
{ "body": "@Test\n public void should_getUsersAndGroupsBelongingToAProjectExludingExpressions_when_getProcessAccessControl() {\n List<UserTask> userTasks = asList(taskOne, taskTwo);\n\n when(taskOne.getCandidateGroups()).thenReturn(asList(\"groupOne\", \"${processsVariable.groupName}\", \"groupTwo\")...
{ "fields": [ { "declarator": "EXPRESSION_REGEX = Pattern.compile(\"^\\\\$\\\\{[\\\\p{Graph}]+\\\\}+$\")", "modifier": "private final static", "original_string": "private final static Pattern EXPRESSION_REGEX = Pattern.compile(\"^\\\\$\\\\{[\\\\p{Graph}]+\\\\}+$\");", "type": "Pattern", ...
{ "body": "@Override\n public ProjectAccessControl getProjectAccessControl(Project project){\n List<UserTask> userTasks = modelService.getTasksBy(project, new ProcessModelType(), UserTask.class);\n\n Set<String> users = extractFromTasks(this::selectUsers, userTasks);\n Set<String> groups = ext...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 110526820, "size": 3034, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/Activiti/activiti-cloud-modeling-service" }
43502922_17
{ "fields": [ { "declarator": "mBytes = new byte[] { 17, 16, 0, 55, 23, 66, 127, -128, -23, 66 }", "modifier": "private final", "original_string": "private final byte[] mBytes = new byte[] { 17, 16, 0, 55, 23, 66, 127, -128, -23, 66 };", "type": "byte[]", "var_name": "mBytes" } ...
{ "body": "@Test public void copiesStream() throws Exception {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n copy(new ByteArrayInputStream(mBytes), outputStream);\n assertArrayEquals(mBytes, outputStream.toByteArray());\n }", "class_method_signature": "StreamsTest.cop...
{ "fields": [ { "declarator": "BUFFER_SIZE = 16 * 1024", "modifier": "private static final", "original_string": "private static final int BUFFER_SIZE = 16 * 1024;", "type": "int", "var_name": "BUFFER_SIZE" } ], "file": "app/src/main/java/pl/rbolanowski/tw4a/Streams.java", "...
{ "body": "public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException {\n byte buffer[] = new byte[BUFFER_SIZE];\n int bytesRead = -1, totalBytesRead = 0;\n while ((bytesRead = inputStream.read(buffer)) >= 0) {\n totalBytesRead += bytesRead;\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 43502922, "size": 3765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/robin92/tw4a" }
43502922_3
{ "fields": [ { "declarator": "mParser = mock(Parser.class)", "modifier": "private", "original_string": "private Parser mParser = mock(Parser.class);", "type": "Parser", "var_name": "mParser" }, { "declarator": "mTaskwarrior = mock(Taskwarrior.class)", "modifier":...
{ "body": "@Test(expected = Database.AlreadyStoredException.class)\n public void insertingElementWithUuidCausesException() throws Exception {\n mTask.uuid = \"some uuid\";\n mDatabase.insert(mTask);\n }", "class_method_signature": "TaskwarriorDatabaseTest.insertingElementWithUuidCausesException(...
{ "fields": [ { "declarator": "LOG_TAG = TaskwarriorDatabase.class.getSimpleName()", "modifier": "private static final", "original_string": "private static final String LOG_TAG = TaskwarriorDatabase.class.getSimpleName();", "type": "String", "var_name": "LOG_TAG" }, { "...
{ "body": "@Override\n public void insert(Task task) throws AlreadyStoredException, IncompleteArgumentException {\n if (task.uuid != null) throw new AlreadyStoredException();\n require(task.description, Field.description);\n mTaskwarrior.put(task.description);\n }", "class_method_signatur...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 43502922, "size": 3765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/robin92/tw4a" }
43502922_2
{ "fields": [ { "declarator": "LAYOUT = 12", "modifier": "private static final", "original_string": "private static final int LAYOUT = 12;", "type": "int", "var_name": "LAYOUT" }, { "declarator": "mContext = mock(MockContext.class)", "modifier": "private", "...
{ "body": "@Test public void getItemIdReturnsPosition() {\n TaskAdapter adapter = new TaskAdapter(mContext, LAYOUT, mTasks);\n assertEquals(0, adapter.getItemId(0));\n assertEquals(1, adapter.getItemId(1));\n assertEquals(666, adapter.getItemId(666));\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "mResource", "modifier": "private", "original_string": "private int mResource;", ...
{ "body": "@Override\n public long getItemId(int position) {\n return position;\n }", "class_method_signature": "TaskAdapter.getItemId(int position)", "constructor": false, "full_signature": "@Override public long getItemId(int position)", "identifier": "getItemId", "invocations": [], "modifi...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 43502922, "size": 3765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/robin92/tw4a" }