id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
170883666_36
{ "fields": [ { "declarator": "metadata = new SourceMetadata(\n \"test\",\n \"/tmp/path\",\n 0L,\n 123L,\n 456L,\n 789L\n )", "modifier": "private static final", "original_string": "private static final SourceMetadata metadata ...
{ "body": "@Test\n public void should_get_offset_based_on_name() {\n Map<String, Object> result = new ComposeOffsetStrategy(\"NAME\").toPartitionMap(metadata);\n Assert.assertEquals(1, result.size());\n Assert.assertEquals(\"test\", result.get(\"name\"));\n\n }", "class_method_signature":...
{ "fields": [ { "declarator": "FILEPATH_FIELD = \"path\"", "modifier": "private static final", "original_string": "private static final String FILEPATH_FIELD = \"path\";", "type": "String", "var_name": "FILEPATH_FIELD" }, { "declarator": "FILENAME_FIELD = \"name\"", ...
{ "body": "@Override\n public Map<String, Object> toPartitionMap(final SourceMetadata metadata) {\n Map<String, Object> offset = new LinkedHashMap<>();\n for (GenericOffsetStrategy strategy : strategies) {\n strategy.addAttributeToPartitionMap(metadata, offset);\n }\n return ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_20
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_function_expression_given_nested_function_with_single_arg() {\n Expression expression = new Antlr4ExpressionParser().parseExpression(\"{{ replace_all(lowercase($.field),'\\\\\\\\s', '-') }}\");\n\n assertFunctionException(\n expression,\n ...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_77
{ "fields": [], "file": "connect-file-pulse-api/src/test/java/io/streamthoughts/kafka/connect/filepulse/source/internal/ConnectSchemaMapperTest.java", "identifier": "ConnectSchemaMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressWarnings(\"unchecked\")\n public void shouldMapGivenTypeStructWithArrayOfStruct() {\n TypedStruct struct = TypedStruct.create()\n .put(\"field1\", Collections.singletonList(TypedStruct.create().put(\"field2\", \"value\")));\n\n SchemaAndValue schemaAndVal...
{ "fields": [ { "declarator": "DEFAULT_NULL_VALUE = null", "modifier": "private static final", "original_string": "private static final Object DEFAULT_NULL_VALUE = null;", "type": "Object", "var_name": "DEFAULT_NULL_VALUE" }, { "declarator": "INSTANCE = new ConnectSchem...
{ "body": "@Override\n public Schema map(final MapSchema schema) {\n final Schema keySchema = schema.keySchema().map(this);\n final Schema valueSchema = schema.valueSchema().map(this);\n return asNullableAndOptional(SchemaBuilder.map(keySchema, valueSchema)).build();\n }", "class_method_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_1
{ "fields": [ { "declarator": "context = new StandardEvaluationContext(new Object())", "modifier": "private", "original_string": "private StandardEvaluationContext context = new StandardEvaluationContext(new Object());", "type": "StandardEvaluationContext", "var_name": "context" ...
{ "body": "@Test(expected = AccessException.class)\n public void should_thrown_when_reading_invalid_property_using_getter_method_given_pojo() {\n ReflectivePropertyAccessor accessor = new ReflectivePropertyAccessor();\n accessor.read(context, new DummyObject(\"foo\"), \"unknown\");\n }", "class_...
{ "fields": [ { "declarator": "GETTER_PREFIX = \"get\"", "modifier": "private static final", "original_string": "private static final String GETTER_PREFIX = \"get\";", "type": "String", "var_name": "GETTER_PREFIX" }, { "declarator": "SETTER_PREFIX = \"set\"", "mod...
{ "body": "@Override\n public Object read(final EvaluationContext context,\n final Object target,\n final String name) throws AccessException {\n Objects.requireNonNull(target, \"target cannot be null\");\n Objects.requireNonNull(name, \"name cannot be null...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_57
{ "fields": [ { "declarator": "JSON = \" {\\\"firstName\\\" : \\\"foo\\\", \\\"lastName\\\" : \\\"bar\\\"}\"", "modifier": "private static final", "original_string": "private static final String JSON = \" {\\\"firstName\\\" : \\\"foo\\\", \\\"lastName\\\" : \\\"bar\\\"}\";", "type": ...
{ "body": "@Test\n public void should_parse_input_given_value_of_type_bytes() {\n List<TypedStruct> expected = Collections.singletonList(create()\n .put(\"message\", create().put(\"firstName\", \"foo\").put(\"lastName\", \"bar\"))\n );\n assertOutput(filter.apply(null, BYTES_REC...
{ "fields": [ { "declarator": "converter = new DefaultJSONStructConverter()", "modifier": "private final", "original_string": "private final DefaultJSONStructConverter converter = new DefaultJSONStructConverter();", "type": "DefaultJSONStructConverter", "var_name": "converter" },...
{ "body": "@Override\n protected RecordsIterable<TypedStruct> apply(final FilterContext context, final TypedStruct record) {\n final String value = extractJsonField(checkIsNotNull(record.get(configs.source())));\n final TypedValue typedValue;\n\n try {\n typedValue = converter.readJ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_41
{ "fields": [ { "declarator": "OFFSET_MANAGER = new SimpleOffsetManager(new ComposeOffsetStrategy(\"name\"))", "modifier": "private static final", "original_string": "private static final SimpleOffsetManager OFFSET_MANAGER = new SimpleOffsetManager(new ComposeOffsetStrategy(\"name\"));", "...
{ "body": "@Test\n public void shouldCleanUpFilesAfterReceivingCompletedState() {\n\n final StateSnapshot<SourceFile> state = new StateSnapshot<>(0, Collections.emptyMap());\n final InMemoryStateBackingStore<SourceFile> store = new InMemoryStateBackingStore<>(state);\n final MockFileCleaner cl...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LocalFileSystemScanner.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(LocalFileSystemScanner.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n public void scan(final ConnectorContext context) {\n cleanUpCompletedFiles();\n if (updateFiles()) {\n LOG.info(\"Requesting task reconfiguration\");\n context.requestTaskReconfiguration();\n }\n }", "class_method_signature": "LocalFileSystemSc...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_16
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_property_expression_given_property_with_scope_and_attr() {\n final String strExpression = \"$scope.field.two\";\n\n Expression expression = new Antlr4ExpressionParser().parseExpression(strExpression);\n assertPropertyException(\n expressio...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_2
{ "fields": [ { "declarator": "context = new StandardEvaluationContext(new Object())", "modifier": "private", "original_string": "private StandardEvaluationContext context = new StandardEvaluationContext(new Object());", "type": "StandardEvaluationContext", "var_name": "context" ...
{ "body": "@Test\n public void should_write_property_using_setter_method_given_pojo_and_expected_parameter() {\n ReflectivePropertyAccessor accessor = new ReflectivePropertyAccessor();\n DummyObject object = new DummyObject(null);\n accessor.write(context, object, \"field\", \"foo\");\n ...
{ "fields": [ { "declarator": "GETTER_PREFIX = \"get\"", "modifier": "private static final", "original_string": "private static final String GETTER_PREFIX = \"get\";", "type": "String", "var_name": "GETTER_PREFIX" }, { "declarator": "SETTER_PREFIX = \"set\"", "mod...
{ "body": "@Override\n public void write(final EvaluationContext context,\n final Object target,\n final String name,\n final Object newValue) throws AccessException {\n Objects.requireNonNull(target, \"target cannot be null\");\n Objects...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_54
{ "fields": [ { "declarator": "PRIMITIVE_VALUES", "modifier": "private static final", "original_string": "private static final List<String> PRIMITIVE_VALUES;", "type": "List<String>", "var_name": "PRIMITIVE_VALUES" }, { "declarator": "COMPLEXES_VALUES", "modifier"...
{ "body": "@Test\n public void should_explode_input_given_array_of_complex() {\n RecordsIterable<TypedStruct> result = filter.apply(null, create().put(\"message\", COMPLEXES_VALUES), false);\n Assert.assertEquals(COMPLEXES_VALUES.size(), result.size());\n Assert.assertEquals(COMPLEXES_VALUES, ...
{ "fields": [ { "declarator": "config", "modifier": "private", "original_string": "private ExplodeFilterConfig config;", "type": "ExplodeFilterConfig", "var_name": "config" } ], "file": "connect-file-pulse-filters/src/main/java/io/streamthoughts/kafka/connect/filepulse/filter...
{ "body": "@Override\n protected RecordsIterable<TypedStruct> apply(final FilterContext context,\n final TypedStruct record) throws FilterException {\n final TypedValue value = checkIsNotNull(record.find(config.source()));\n\n if (value.type() != Type.A...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_42
{ "fields": [ { "declarator": "TEST_VALUE = \"test values\\ntest values\\ntest values\"", "modifier": "private static final", "original_string": "private static final String TEST_VALUE = \"test values\\ntest values\\ntest values\";", "type": "String", "var_name": "TEST_VALUE" }, ...
{ "body": "@Test\n public void shouldReaddAllBytes() {\n FileInputIterator<FileRecord<TypedStruct>> iterator = reader.newIterator(context);\n Assert.assertTrue(iterator.hasNext());\n\n FileRecord<TypedStruct> record = iterator.next().last();\n TypedStruct typed = record.value();\n\n ...
{ "fields": [], "file": "connect-file-pulse-plugin/src/main/java/io/streamthoughts/kafka/connect/filepulse/reader/BytesArrayInputReader.java", "identifier": "BytesArrayInputReader", "interfaces": "", "methods": [ { "class_method_signature": "BytesArrayInputReader.BytesArrayInputReader()", "con...
{ "body": "@Override\n protected FileInputIterator<FileRecord<TypedStruct>> newIterator(final FileContext context,\n final IteratorManager iteratorManager) {\n return new BytesArrayInputIterator(\n context,\n i...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_15
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_property_expression_given_property_with_scope() {\n Expression expression = new Antlr4ExpressionParser().parseExpression(\"$scope\");\n assertPropertyException(\n expression,\n \"$scope\",\n \"scope\",\n \"null\"\...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_39
{ "fields": [ { "declarator": "OFFSET_MANAGER = new SimpleOffsetManager(new ComposeOffsetStrategy(\"name\"))", "modifier": "private static final", "original_string": "private static final SimpleOffsetManager OFFSET_MANAGER = new SimpleOffsetManager(new ComposeOffsetStrategy(\"name\"));", "...
{ "body": "@Test\n public void shouldCleanRemainingCompletedFilesWhileStarting() {\n Map<String, SourceFile> states = new HashMap<String, SourceFile>() {\n {\n put(\"???\", INPUT_FILES.stateFor(0, SourceStatus.COMPLETED));\n }\n };\n StateSnapshot<SourceFil...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LocalFileSystemScanner.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(LocalFileSystemScanner.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n public void scan(final ConnectorContext context) {\n cleanUpCompletedFiles();\n if (updateFiles()) {\n LOG.info(\"Requesting task reconfiguration\");\n context.requestTaskReconfiguration();\n }\n }", "class_method_signature": "LocalFileSystemSc...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_78
{ "fields": [], "file": "connect-file-pulse-api/src/test/java/io/streamthoughts/kafka/connect/filepulse/source/internal/ConnectSchemaMapperTest.java", "identifier": "ConnectSchemaMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressWarnings(\"unchecked\")\n public void shouldMapGivenTypeStructWithMapField() {\n TypedStruct struct = TypedStruct.create()\n .put(\"field1\", Collections.singletonMap(\"field2\", \"value\"));\n\n SchemaAndValue schemaAndValue = struct.schema().map(Connect...
{ "fields": [ { "declarator": "DEFAULT_NULL_VALUE = null", "modifier": "private static final", "original_string": "private static final Object DEFAULT_NULL_VALUE = null;", "type": "Object", "var_name": "DEFAULT_NULL_VALUE" }, { "declarator": "INSTANCE = new ConnectSchem...
{ "body": "@Override\n public Schema map(final MapSchema schema) {\n final Schema keySchema = schema.keySchema().map(this);\n final Schema valueSchema = schema.valueSchema().map(this);\n return asNullableAndOptional(SchemaBuilder.map(keySchema, valueSchema)).build();\n }", "class_method_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_58
{ "fields": [ { "declarator": "compiler", "modifier": "private", "original_string": "private GrokPatternCompiler compiler;", "type": "GrokPatternCompiler", "var_name": "compiler" } ], "file": "connect-file-pulse-filters/src/test/java/io/streamthoughts/kafka/connect/filepulse/...
{ "body": "@Test\n public void shouldCompileMatcherGivenSingleGrokPattern() {\n final GrokMatcher matcher = compiler.compile(\"%{ISO8601_TIMEZONE}\");\n Assert.assertNotNull(matcher);\n Assert.assertEquals(\"ISO8601_TIMEZONE\", matcher.getGrokPattern(0).syntax());\n }", "class_method_sign...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GrokPatternCompiler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GrokPatternCompiler.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "public GrokMatcher compile(final String expression) {\n Objects.requireNonNull(expression, \"expression can't be null\");\n\n LOG.info(\"Starting to compile grok matcher expression : {}\", expression);\n ArrayList<GrokPattern> patterns = new ArrayList<>();\n final String regex =...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_19
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_function_expression_given_property_and_args() {\n Expression expression = new Antlr4ExpressionParser().parseExpression(\"{{ starts_with($scope.attr, 'foo') }}\");\n\n assertFunctionException(\n expression,\n \"starts_with($scope.attr,'...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_62
{ "fields": [ { "declarator": "GROK_PATTERN = \"(?<timestamp>%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TIME}) %{LOGLEVEL:level} %{GREEDYDATA:message}\"", "modifier": "private static final", "original_string": "private static final String GROK_PATTERN = \"(?<timestamp>%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TI...
{ "body": "@Test\n public void test() {\n final GrokPatternCompiler compiler = new GrokPatternCompiler(new GrokPatternResolver(), true);\n final GrokMatcher matcher = compiler.compile(GROK_PATTERN);\n Schema schema = buildSchemaForGrok(Collections.singletonList(matcher));\n List<Field> ...
{ "fields": [], "file": "connect-file-pulse-filters/src/main/java/io/streamthoughts/kafka/connect/filepulse/pattern/GrokSchemaBuilder.java", "identifier": "GrokSchemaBuilder", "interfaces": "", "methods": [ { "class_method_signature": "GrokSchemaBuilder.buildSchemaForGrok(final List<GrokMatcher> pat...
{ "body": "public static Schema buildSchemaForGrok(final List<GrokMatcher> patterns) {\n SchemaBuilder schema = SchemaBuilder.struct();\n patterns.forEach(grok -> buildSchemaForGrok(schema, grok));\n return schema.build();\n }", "class_method_signature": "GrokSchemaBuilder.buildSchemaForGrok...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_35
{ "fields": [ { "declarator": "metadata = new SourceMetadata(\n \"test\",\n \"/tmp/path\",\n 0L,\n 123L,\n 456L,\n 789L\n )", "modifier": "private static final", "original_string": "private static final SourceMetadata metadata ...
{ "body": "@Test\n public void should_get_offset_based_on_modified() {\n Map<String, Object> result = new ComposeOffsetStrategy(\"LASTMODIFIED\").toPartitionMap(metadata);\n Assert.assertEquals(1, result.size());\n Assert.assertEquals(123L, result.get(\"lastmodified\"));\n\n }", "class_me...
{ "fields": [ { "declarator": "FILEPATH_FIELD = \"path\"", "modifier": "private static final", "original_string": "private static final String FILEPATH_FIELD = \"path\";", "type": "String", "var_name": "FILEPATH_FIELD" }, { "declarator": "FILENAME_FIELD = \"name\"", ...
{ "body": "@Override\n public Map<String, Object> toPartitionMap(final SourceMetadata metadata) {\n Map<String, Object> offset = new LinkedHashMap<>();\n for (GenericOffsetStrategy strategy : strategies) {\n strategy.addAttributeToPartitionMap(metadata, offset);\n }\n return ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_23
{ "fields": [ { "declarator": "DEFAULT_EXPRESSION_STRING = \"{{ value }}\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_EXPRESSION_STRING = \"{{ value }}\";", "type": "String", "var_name": "DEFAULT_EXPRESSION_STRING" }, { ...
{ "body": "@Test\n public void testGivenPrefixedExpressionWithReplacement() {\n final int startIndex = PREFIX.length();\n SubstitutionExpression expression = new SubstitutionExpression(PREFIX + DEFAULT_EXPRESSION_STRING,\n startIndex,\n startIndex + DEFAULT_EXPRESSION_ST...
{ "fields": [ { "declarator": "replacements", "modifier": "private final", "original_string": "private final TreeSet<ReplacementExpression> replacements;", "type": "TreeSet<ReplacementExpression>", "var_name": "replacements" } ], "file": "connect-file-pulse-expression/src/mai...
{ "body": "@Override\n public Object readValue(final EvaluationContext context) {\n return readValue(context, TypedValue.class).value();\n }", "class_method_signature": "SubstitutionExpression.readValue(final EvaluationContext context)", "constructor": false, "full_signature": "@Override public Obj...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_74
{ "fields": [], "file": "connect-file-pulse-api/src/test/java/io/streamthoughts/kafka/connect/filepulse/source/internal/ConnectSchemaMapperTest.java", "identifier": "ConnectSchemaMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldMapGivenSimpleTypedStruct() {\n\n TypedStruct struct = TypedStruct.create()\n .put(\"field1\", \"value1\")\n .put(\"field2\", \"value2\");\n\n SchemaAndValue schemaAndValue = struct.schema().map(ConnectSchemaMapper.INSTANCE, struct);\...
{ "fields": [ { "declarator": "DEFAULT_NULL_VALUE = null", "modifier": "private static final", "original_string": "private static final Object DEFAULT_NULL_VALUE = null;", "type": "Object", "var_name": "DEFAULT_NULL_VALUE" }, { "declarator": "INSTANCE = new ConnectSchem...
{ "body": "@Override\n public Schema map(final MapSchema schema) {\n final Schema keySchema = schema.keySchema().map(this);\n final Schema valueSchema = schema.valueSchema().map(this);\n return asNullableAndOptional(SchemaBuilder.map(keySchema, valueSchema)).build();\n }", "class_method_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_75
{ "fields": [], "file": "connect-file-pulse-api/src/test/java/io/streamthoughts/kafka/connect/filepulse/source/internal/ConnectSchemaMapperTest.java", "identifier": "ConnectSchemaMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldMapGivenNestedTypedStruct() {\n TypedStruct struct = TypedStruct.create()\n .put(\"field1\", TypedStruct.create().put(\"field2\", \"value2\"));\n\n SchemaAndValue schemaAndValue = struct.schema().map(ConnectSchemaMapper.INSTANCE, struct);\n A...
{ "fields": [ { "declarator": "DEFAULT_NULL_VALUE = null", "modifier": "private static final", "original_string": "private static final Object DEFAULT_NULL_VALUE = null;", "type": "Object", "var_name": "DEFAULT_NULL_VALUE" }, { "declarator": "INSTANCE = new ConnectSchem...
{ "body": "@Override\n public Schema map(final MapSchema schema) {\n final Schema keySchema = schema.keySchema().map(this);\n final Schema valueSchema = schema.valueSchema().map(this);\n return asNullableAndOptional(SchemaBuilder.map(keySchema, valueSchema)).build();\n }", "class_method_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_22
{ "fields": [ { "declarator": "DEFAULT_EXPRESSION_STRING = \"{{ value }}\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_EXPRESSION_STRING = \"{{ value }}\";", "type": "String", "var_name": "DEFAULT_EXPRESSION_STRING" }, { ...
{ "body": "@Test\n public void testGivenSingleExpressionReplacement() {\n SubstitutionExpression expression = new SubstitutionExpression(\n DEFAULT_EXPRESSION_STRING,\n 0,\n DEFAULT_EXPRESSION_STRING.length(),\n DEFAULT_EXPRESSION);\n\n TypedValue evaluated...
{ "fields": [ { "declarator": "replacements", "modifier": "private final", "original_string": "private final TreeSet<ReplacementExpression> replacements;", "type": "TreeSet<ReplacementExpression>", "var_name": "replacements" } ], "file": "connect-file-pulse-expression/src/mai...
{ "body": "@Override\n public Object readValue(final EvaluationContext context) {\n return readValue(context, TypedValue.class).value();\n }", "class_method_signature": "SubstitutionExpression.readValue(final EvaluationContext context)", "constructor": false, "full_signature": "@Override public Obj...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_34
{ "fields": [ { "declarator": "metadata = new SourceMetadata(\n \"test\",\n \"/tmp/path\",\n 0L,\n 123L,\n 456L,\n 789L\n )", "modifier": "private static final", "original_string": "private static final SourceMetadata metadata ...
{ "body": "@Test\n public void should_get_offset_based_on_hash() {\n Map<String, Object> result = new ComposeOffsetStrategy(\"HASH\").toPartitionMap(metadata);\n Assert.assertEquals(1, result.size());\n Assert.assertEquals(789L, result.get(\"hash\"));\n }", "class_method_signature": "Comp...
{ "fields": [ { "declarator": "FILEPATH_FIELD = \"path\"", "modifier": "private static final", "original_string": "private static final String FILEPATH_FIELD = \"path\";", "type": "String", "var_name": "FILEPATH_FIELD" }, { "declarator": "FILENAME_FIELD = \"name\"", ...
{ "body": "@Override\n public Map<String, Object> toPartitionMap(final SourceMetadata metadata) {\n Map<String, Object> offset = new LinkedHashMap<>();\n for (GenericOffsetStrategy strategy : strategies) {\n strategy.addAttributeToPartitionMap(metadata, offset);\n }\n return ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_63
{ "fields": [], "file": "connect-file-pulse-filters/src/test/java/io/streamthoughts/kafka/connect/filepulse/pattern/GrokPatternResolverTest.java", "identifier": "GrokPatternResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldStandardResolveGrokPattern() {\n GrokPatternResolver resolver = new GrokPatternResolver();\n\n String resolve = resolver.resolve(\"SYSLOGFACILITY\");\n System.out.println(resolve);\n }", "class_method_signature": "GrokPatternResolverTest.shouldStandard...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GrokPatternResolver.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GrokPatternResolver.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "public String resolve(final String syntax) {\n if (!definitions.containsKey(syntax)) {\n throw new GrokException(\"No pattern definition found for syntax : \" + syntax);\n }\n\n return definitions.get(syntax);\n }", "class_method_signature": "GrokPatternResolver.resolve...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_18
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_function_expression_given_property() {\n Expression expression = new Antlr4ExpressionParser().parseExpression(\"{{ lowercase($scope.attr) }}\");\n\n assertFunctionException(\n expression,\n \"lowercase($scope.attr)\",\n \"[n...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_59
{ "fields": [ { "declarator": "compiler", "modifier": "private", "original_string": "private GrokPatternCompiler compiler;", "type": "GrokPatternCompiler", "var_name": "compiler" } ], "file": "connect-file-pulse-filters/src/test/java/io/streamthoughts/kafka/connect/filepulse/...
{ "body": "@Test\n public void shouldCompileMatcherGivenMultipleGrokPatterns() {\n final GrokMatcher matcher = compiler.compile(\"%{ISO8601_TIMEZONE} %{LOGLEVEL} %{GREEDYDATA}\");\n Assert.assertNotNull(matcher);\n Assert.assertNotNull(matcher.getGrokPattern(\"ISO8601_TIMEZONE\"));\n As...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GrokPatternCompiler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GrokPatternCompiler.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "public GrokMatcher compile(final String expression) {\n Objects.requireNonNull(expression, \"expression can't be null\");\n\n LOG.info(\"Starting to compile grok matcher expression : {}\", expression);\n ArrayList<GrokPattern> patterns = new ArrayList<>();\n final String regex =...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_79
{ "fields": [], "file": "connect-file-pulse-api/src/test/java/io/streamthoughts/kafka/connect/filepulse/source/internal/ConnectSchemaMapperTest.java", "identifier": "ConnectSchemaMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressWarnings(\"unchecked\")\n public void shouldMapGivenTypeStructWithMapWithStructValue() {\n TypedStruct struct = TypedStruct.create()\n .put(\"field1\",\n Collections.singletonMap(\n \"field2\",\n TypedStruct.creat...
{ "fields": [ { "declarator": "DEFAULT_NULL_VALUE = null", "modifier": "private static final", "original_string": "private static final Object DEFAULT_NULL_VALUE = null;", "type": "Object", "var_name": "DEFAULT_NULL_VALUE" }, { "declarator": "INSTANCE = new ConnectSchem...
{ "body": "@Override\n public Schema map(final MapSchema schema) {\n final Schema keySchema = schema.keySchema().map(this);\n final Schema valueSchema = schema.valueSchema().map(this);\n return asNullableAndOptional(SchemaBuilder.map(keySchema, valueSchema)).build();\n }", "class_method_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_38
{ "fields": [ { "declarator": "metadata = new SourceMetadata(\n \"test\",\n \"/tmp/path\",\n 0L,\n 123L,\n 456L,\n 789L\n )", "modifier": "private static final", "original_string": "private static final SourceMetadata metadata ...
{ "body": "@Test\n public void should_support_strategies_in_any_order() {\n final String o1 = new ComposeOffsetStrategy(\"PATH+HASH\").toPartitionMap(metadata)\n .entrySet()\n .stream()\n .map(e -> e.getKey() + \"=\" + e.getValue())\n .collect(Coll...
{ "fields": [ { "declarator": "FILEPATH_FIELD = \"path\"", "modifier": "private static final", "original_string": "private static final String FILEPATH_FIELD = \"path\";", "type": "String", "var_name": "FILEPATH_FIELD" }, { "declarator": "FILENAME_FIELD = \"name\"", ...
{ "body": "@Override\n public Map<String, Object> toPartitionMap(final SourceMetadata metadata) {\n Map<String, Object> offset = new LinkedHashMap<>();\n for (GenericOffsetStrategy strategy : strategies) {\n strategy.addAttributeToPartitionMap(metadata, offset);\n }\n return ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_80
{ "fields": [], "file": "connect-file-pulse-api/src/test/java/io/streamthoughts/kafka/connect/filepulse/source/internal/ConnectSchemaMapperTest.java", "identifier": "ConnectSchemaMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldMapGivenTypeStructWithNullValue() {\n TypedStruct struct = TypedStruct.create()\n .put(\"field1\", \"value1\")\n .put(\"field2\", Schema.none(), null);\n\n SchemaAndValue schemaAndValue = struct.schema().map(ConnectSchemaMapper.INSTAN...
{ "fields": [ { "declarator": "DEFAULT_NULL_VALUE = null", "modifier": "private static final", "original_string": "private static final Object DEFAULT_NULL_VALUE = null;", "type": "Object", "var_name": "DEFAULT_NULL_VALUE" }, { "declarator": "INSTANCE = new ConnectSchem...
{ "body": "@Override\n public Schema map(final MapSchema schema) {\n final Schema keySchema = schema.keySchema().map(this);\n final Schema valueSchema = schema.valueSchema().map(this);\n return asNullableAndOptional(SchemaBuilder.map(keySchema, valueSchema)).build();\n }", "class_method_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_14
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_substitution_expression_given_multiple_functions_with_property_and_args() {\n final String strExpression = \"{{ extract_array($.values,0)}}-{{extract_array($.values,1) }}\";\n Expression expression = new Antlr4ExpressionParser().parseExpression(strExpressio...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_43
{ "fields": [ { "declarator": "LF = \"\\n\"", "modifier": "private static final", "original_string": "private static final String LF = \"\\n\";", "type": "String", "var_name": "LF" }, { "declarator": "CR = \"\\r\"", "modifier": "private static final", "origi...
{ "body": "@Test\n public void shouldAttemptToReadMoreLinesThanMinimumGivenStrictEqualsFalse() throws Exception {\n generateLines(writer, NLINES, CR + LF, false);\n try(NonBlockingBufferReader reader = createReaderWithCapacity(file, DEFAULT_INITIAL_CAPACITY)) {\n List<TextBlock> records = ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(NonBlockingBufferReader.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(NonBlockingBufferReader.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "public List<TextBlock> readLines(final int minRecords, final boolean strict) throws IOException {\n // Unfortunately we can't just use readLine() because it blocks in an uninterruptible way.\n // Instead we have to manage splitting lines ourselves, using simple backoff when no new value\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_55
{ "fields": [ { "declarator": "KEY_1 = \"key1\"", "modifier": "private static final", "original_string": "private static final String KEY_1 = \"key1\";", "type": "String", "var_name": "KEY_1" }, { "declarator": "KEY_2 = \"key2\"", "modifier": "private static final...
{ "body": "@Test\n public void shouldGenerateDifferentKeysGivenSymmetricFields() {\n\n TypedStruct struct1 = TypedStruct.create()\n .put(KEY_1, KEY_1)\n .put(KEY_2, KEY_2)\n .put(VALUE, \"value\");\n\n TypedStruct struct2 = TypedStruct.create()\n ...
{ "fields": [ { "declarator": "configs", "modifier": "private", "original_string": "private GroupRowFilterConfig configs;", "type": "GroupRowFilterConfig", "var_name": "configs" }, { "declarator": "fields", "modifier": "private", "original_string": "private ...
{ "body": "static int extractKey(final TypedStruct record, final List<String> fields) {\n Object[] keys = new Object[fields.size()];\n for (int i = 0; i < fields.size(); i++) {\n keys[i] = record.get(fields.get(i));\n }\n return Objects.hash(keys);\n }", "class_method_signa...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_3
{ "fields": [ { "declarator": "context = new StandardEvaluationContext(new Object())", "modifier": "private", "original_string": "private StandardEvaluationContext context = new StandardEvaluationContext(new Object());", "type": "StandardEvaluationContext", "var_name": "context" ...
{ "body": "@Test\n public void should_write_null_property_using_setter_method_given_pojo_and_expected_parameter() {\n ReflectivePropertyAccessor accessor = new ReflectivePropertyAccessor();\n DummyObject object = new DummyObject(\"foo\");\n accessor.write(context, object, \"field\", null);\n ...
{ "fields": [ { "declarator": "GETTER_PREFIX = \"get\"", "modifier": "private static final", "original_string": "private static final String GETTER_PREFIX = \"get\";", "type": "String", "var_name": "GETTER_PREFIX" }, { "declarator": "SETTER_PREFIX = \"set\"", "mod...
{ "body": "@Override\n public void write(final EvaluationContext context,\n final Object target,\n final String name,\n final Object newValue) throws AccessException {\n Objects.requireNonNull(target, \"target cannot be null\");\n Objects...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_8
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_value_expression_given_integer_literal() {\n Expression expression = new Antlr4ExpressionParser().parseExpression(\"0\");\n Assert.assertTrue(expression instanceof ValueExpression);\n Assert.assertEquals(\"0\", expression.originalExpression());\n ...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_48
{ "fields": [ { "declarator": "converter = new DefaultJSONStructConverter()", "modifier": "private", "original_string": "private JSONStructConverter converter = new DefaultJSONStructConverter();", "type": "JSONStructConverter", "var_name": "converter" } ], "file": "connect-fi...
{ "body": "@Test\n public void shouldConvertGivenFieldWithArrayOfComplexType() throws Exception {\n TypedValue value = converter.readJson(\"{\\\"field-one\\\" : [{\\\"firstName\\\": \\\"foo\\\"}, {\\\"firstName\\\": \\\"bar\\\"}]}\");\n\n Assert.assertNotNull(value);\n Assert.assertEquals(Type...
{ "fields": [ { "declarator": "ACCESSORS = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<ValueType, JsonFieldAccessor<?>> ACCESSORS = new HashMap<>();", "type": "Map<ValueType, JsonFieldAccessor<?>>", "var_name": "ACCESSORS" } ...
{ "body": "@Override\n public TypedValue readJson(final String data) {\n\n if (data == null) return null;\n\n try {\n JsonIterator it = JsonIterator.parse(data);\n return getAccessorForType(it.whatIsNext()).read(it);\n\n } catch (Exception e) {\n throw new Read...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_64
{ "fields": [ { "declarator": "DEFAULT_FIELD_ONE = \"a\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_FIELD_ONE = \"a\";", "type": "String", "var_name": "DEFAULT_FIELD_ONE" }, { "declarator": "DEFAULT_FIELD_TWO = \"b\"", ...
{ "body": "@Test\n public void shouldMergeSchemaGivenTwoFieldsWithDifferentName() {\n Schema schemaLeft = SchemaBuilder.struct()\n .field(DEFAULT_FIELD_ONE, Schema.STRING_SCHEMA)\n .build();\n Schema schemaRight = SchemaBuilder.struct()\n .field(DEFAULT_FI...
{ "fields": [], "file": "connect-file-pulse-api/src/main/java/io/streamthoughts/kafka/connect/filepulse/internal/SchemaUtils.java", "identifier": "SchemaUtils", "interfaces": "", "methods": [ { "class_method_signature": "SchemaUtils.getAllFieldNames(final Schema schema)", "constructor": false,...
{ "body": "public static void merge(final Schema leftSchema,\n final Schema rightSchema,\n final SchemaBuilder builder,\n final Set<String> overwrite) {\n final Map<String, Field> rightFields = groupFieldByName(rightSchema.fiel...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_33
{ "fields": [ { "declarator": "metadata = new SourceMetadata(\n \"test\",\n \"/tmp/path\",\n 0L,\n 123L,\n 456L,\n 789L\n )", "modifier": "private static final", "original_string": "private static final SourceMetadata metadata ...
{ "body": "@Test\n public void should_get_offset_based_on_path() {\n Map<String, Object> result = new ComposeOffsetStrategy(\"PATH\").toPartitionMap(metadata);\n Assert.assertEquals(1, result.size());\n Assert.assertEquals(\"/tmp/path\", result.get(\"path\"));\n }", "class_method_signatur...
{ "fields": [ { "declarator": "FILEPATH_FIELD = \"path\"", "modifier": "private static final", "original_string": "private static final String FILEPATH_FIELD = \"path\";", "type": "String", "var_name": "FILEPATH_FIELD" }, { "declarator": "FILENAME_FIELD = \"name\"", ...
{ "body": "@Override\n public Map<String, Object> toPartitionMap(final SourceMetadata metadata) {\n Map<String, Object> offset = new LinkedHashMap<>();\n for (GenericOffsetStrategy strategy : strategies) {\n strategy.addAttributeToPartitionMap(metadata, offset);\n }\n return ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_25
{ "fields": [ { "declarator": "DEFAULT_EXPRESSION_STRING = \"{{ value }}\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_EXPRESSION_STRING = \"{{ value }}\";", "type": "String", "var_name": "DEFAULT_EXPRESSION_STRING" }, { ...
{ "body": "@Test\n public void testGivenBetweenExpressionWithReplacement() {\n final String original = PREFIX + DEFAULT_EXPRESSION_STRING + SUFFIX;\n SubstitutionExpression expression = new SubstitutionExpression(original, PREFIX.length(), PREFIX.length() + DEFAULT_EXPRESSION_STRING.length(), DEFAULT...
{ "fields": [ { "declarator": "replacements", "modifier": "private final", "original_string": "private final TreeSet<ReplacementExpression> replacements;", "type": "TreeSet<ReplacementExpression>", "var_name": "replacements" } ], "file": "connect-file-pulse-expression/src/mai...
{ "body": "@Override\n public Object readValue(final EvaluationContext context) {\n return readValue(context, TypedValue.class).value();\n }", "class_method_signature": "SubstitutionExpression.readValue(final EvaluationContext context)", "constructor": false, "full_signature": "@Override public Obj...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_72
{ "fields": [ { "declarator": "DEFAULT_FIELD_ONE = \"a\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_FIELD_ONE = \"a\";", "type": "String", "var_name": "DEFAULT_FIELD_ONE" }, { "declarator": "DEFAULT_FIELD_TWO = \"b\"", ...
{ "body": "@Test\n public void shouldThrowExceptionGivenRightFieldWithArrayTypeNotEqualToLeftField() {\n Schema schemaLeft = SchemaBuilder.struct()\n .field(DEFAULT_FIELD_ONE, Schema.INT64_SCHEMA)\n .build();\n\n\n Schema schemaRight = SchemaBuilder.struct()\n ...
{ "fields": [], "file": "connect-file-pulse-api/src/main/java/io/streamthoughts/kafka/connect/filepulse/internal/SchemaUtils.java", "identifier": "SchemaUtils", "interfaces": "", "methods": [ { "class_method_signature": "SchemaUtils.getAllFieldNames(final Schema schema)", "constructor": false,...
{ "body": "public static void merge(final Schema leftSchema,\n final Schema rightSchema,\n final SchemaBuilder builder,\n final Set<String> overwrite) {\n final Map<String, Field> rightFields = groupFieldByName(rightSchema.fiel...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_4
{ "fields": [ { "declarator": "context = new StandardEvaluationContext(new Object())", "modifier": "private", "original_string": "private StandardEvaluationContext context = new StandardEvaluationContext(new Object());", "type": "StandardEvaluationContext", "var_name": "context" ...
{ "body": "@Test\n public void should_write_property_using_setter_method_given_pojo() {\n ReflectivePropertyAccessor accessor = new ReflectivePropertyAccessor();\n DummyObject object = new DummyObject(null);\n accessor.write(context, object, \"field\", TypedValue.string(\"foo\"));\n Ass...
{ "fields": [ { "declarator": "GETTER_PREFIX = \"get\"", "modifier": "private static final", "original_string": "private static final String GETTER_PREFIX = \"get\";", "type": "String", "var_name": "GETTER_PREFIX" }, { "declarator": "SETTER_PREFIX = \"set\"", "mod...
{ "body": "@Override\n public void write(final EvaluationContext context,\n final Object target,\n final String name,\n final Object newValue) throws AccessException {\n Objects.requireNonNull(target, \"target cannot be null\");\n Objects...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_52
{ "fields": [ { "declarator": "converter = new DefaultJSONStructConverter()", "modifier": "private", "original_string": "private JSONStructConverter converter = new DefaultJSONStructConverter();", "type": "JSONStructConverter", "var_name": "converter" } ], "file": "connect-fi...
{ "body": "@Test\n public void shouldConvertGivenFieldWithNullValue() throws Exception {\n TypedValue value = converter.readJson(\"{\\\"field-one\\\" : \\\"one\\\", \\\"field-two\\\":null}\");\n Assert.assertNotNull(value);\n Assert.assertEquals(Type.STRUCT, value.type());\n TypedStruct...
{ "fields": [ { "declarator": "ACCESSORS = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<ValueType, JsonFieldAccessor<?>> ACCESSORS = new HashMap<>();", "type": "Map<ValueType, JsonFieldAccessor<?>>", "var_name": "ACCESSORS" } ...
{ "body": "@Override\n public TypedValue readJson(final String data) {\n\n if (data == null) return null;\n\n try {\n JsonIterator it = JsonIterator.parse(data);\n return getAccessorForType(it.whatIsNext()).read(it);\n\n } catch (Exception e) {\n throw new Read...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_44
{ "fields": [ { "declarator": "LF = \"\\n\"", "modifier": "private static final", "original_string": "private static final String LF = \"\\n\";", "type": "String", "var_name": "LF" }, { "declarator": "CR = \"\\r\"", "modifier": "private static final", "origi...
{ "body": "@Test\n public void shouldNotAttemptToReadMoreLinesThanMinimumGivenStrictEqualsTrue() throws Exception {\n generateLines(writer, NLINES, CR + LF, false);\n try(NonBlockingBufferReader reader = createReaderWithCapacity(file, DEFAULT_INITIAL_CAPACITY)) {\n List<TextBlock> records =...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(NonBlockingBufferReader.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(NonBlockingBufferReader.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "public List<TextBlock> readLines(final int minRecords, final boolean strict) throws IOException {\n // Unfortunately we can't just use readLine() because it blocks in an uninterruptible way.\n // Instead we have to manage splitting lines ourselves, using simple backoff when no new value\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_13
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_substitution_expression_given_function_with_property() {\n final String strExpression = \"{{ lowercase($scope) }}\";\n Expression expression = new Antlr4ExpressionParser().parseExpression(strExpression);\n assertSubstitutionException(\n ex...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_68
{ "fields": [ { "declarator": "DEFAULT_FIELD_ONE = \"a\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_FIELD_ONE = \"a\";", "type": "String", "var_name": "DEFAULT_FIELD_ONE" }, { "declarator": "DEFAULT_FIELD_TWO = \"b\"", ...
{ "body": "@Test\n public void shouldMergeSchemasGivenRightFieldWithArrayTypeEqualToLeftField() {\n Schema schemaLeft = SchemaBuilder.struct()\n .field(DEFAULT_FIELD_ONE, Schema.STRING_SCHEMA)\n .build();\n\n Schema schemaRight = SchemaBuilder.struct()\n ....
{ "fields": [], "file": "connect-file-pulse-api/src/main/java/io/streamthoughts/kafka/connect/filepulse/internal/SchemaUtils.java", "identifier": "SchemaUtils", "interfaces": "", "methods": [ { "class_method_signature": "SchemaUtils.getAllFieldNames(final Schema schema)", "constructor": false,...
{ "body": "public static void merge(final Schema leftSchema,\n final Schema rightSchema,\n final SchemaBuilder builder,\n final Set<String> overwrite) {\n final Map<String, Field> rightFields = groupFieldByName(rightSchema.fiel...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_29
{ "fields": [ { "declarator": "folder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "folder" }, { "declarator": "file", "mod...
{ "body": "@Test\n public void shouldDeleteSourceFileGivenFailedSource() {\n DeleteCleanupPolicy policy = new DeleteCleanupPolicy();\n policy.configure(Collections.emptyMap());\n\n Boolean result = policy.apply(source.withStatus(SourceStatus.FAILED));\n assertTrue(result);\n asse...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DeleteCleanupPolicy.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DeleteCleanupPolicy.class);", "type": "Logger", "var_name": "LOG" } ], "...
{ "body": "@Override\n public void configure(final Map<String, ?> configs) {\n\n }", "class_method_signature": "DeleteCleanupPolicy.configure(final Map<String, ?> configs)", "constructor": false, "full_signature": "@Override public void configure(final Map<String, ?> configs)", "identifier": "configure"...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_28
{ "fields": [ { "declarator": "folder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "folder" }, { "declarator": "file", "mod...
{ "body": "@Test\n public void shouldDeleteSourceFileGivenCompletedSource() {\n DeleteCleanupPolicy policy = new DeleteCleanupPolicy();\n policy.configure(Collections.emptyMap());\n\n Boolean result = policy.apply(source.withStatus(SourceStatus.COMPLETED));\n assertTrue(result);\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DeleteCleanupPolicy.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DeleteCleanupPolicy.class);", "type": "Logger", "var_name": "LOG" } ], "...
{ "body": "@Override\n public void configure(final Map<String, ?> configs) {\n\n }", "class_method_signature": "DeleteCleanupPolicy.configure(final Map<String, ?> configs)", "constructor": false, "full_signature": "@Override public void configure(final Map<String, ?> configs)", "identifier": "configure"...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_69
{ "fields": [ { "declarator": "DEFAULT_FIELD_ONE = \"a\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_FIELD_ONE = \"a\";", "type": "String", "var_name": "DEFAULT_FIELD_ONE" }, { "declarator": "DEFAULT_FIELD_TWO = \"b\"", ...
{ "body": "@Test\n public void shouldMergeSchemasGivenTwoArrayFieldsWithEqualsValueType() {\n Schema schemaLeft = SchemaBuilder.struct()\n .field(DEFAULT_FIELD_ONE, SchemaBuilder.array(SchemaBuilder.string()))\n .build();\n\n Schema schemaRight = SchemaBuilder.struct()\n...
{ "fields": [], "file": "connect-file-pulse-api/src/main/java/io/streamthoughts/kafka/connect/filepulse/internal/SchemaUtils.java", "identifier": "SchemaUtils", "interfaces": "", "methods": [ { "class_method_signature": "SchemaUtils.getAllFieldNames(final Schema schema)", "constructor": false,...
{ "body": "public static void merge(final Schema leftSchema,\n final Schema rightSchema,\n final SchemaBuilder builder,\n final Set<String> overwrite) {\n final Map<String, Field> rightFields = groupFieldByName(rightSchema.fiel...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_12
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_multiple_substitution_expression_given_property_with_scope() {\n final String strExpression = \"prefix-{{ $scope.field1 }}-{{ $scope.field2 }}-suffix\";\n Expression expression = new Antlr4ExpressionParser().parseExpression(strExpression);\n assert...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_45
{ "fields": [ { "declarator": "NOW = System.currentTimeMillis()", "modifier": "private static final", "original_string": "private static final long NOW = System.currentTimeMillis();", "type": "long", "var_name": "NOW" }, { "declarator": "DEFAULT_TEST_SCHEMA", "mod...
{ "body": "@Test\n public void shouldReadGivenMultipleAvroRecord() {\n\n writeGenericRecords(\n DEFAULT_TEST_SCHEMA,\n DEFAULT_GENERIC_RECORD,\n DEFAULT_GENERIC_RECORD,\n DEFAULT_GENERIC_RECORD);\n\n FileInputIterator<FileRecord<TypedStruct>> iterator = rea...
{ "fields": [], "file": "connect-file-pulse-plugin/src/main/java/io/streamthoughts/kafka/connect/filepulse/reader/AvroFileInputReader.java", "identifier": "AvroFileInputReader", "interfaces": "", "methods": [ { "class_method_signature": "AvroFileInputReader.AvroFileInputReader()", "constructor...
{ "body": "@Override\n protected FileInputIterator<FileRecord<TypedStruct>> newIterator(final FileContext context,\n final IteratorManager iteratorManager) {\n return new AvroFileIterator(iteratorManager, context);\n }", "class_method_...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_53
{ "fields": [ { "declarator": "PRIMITIVE_VALUES", "modifier": "private static final", "original_string": "private static final List<String> PRIMITIVE_VALUES;", "type": "List<String>", "var_name": "PRIMITIVE_VALUES" }, { "declarator": "COMPLEXES_VALUES", "modifier"...
{ "body": "@Test\n public void should_explode_input_given_array_of_primitive() {\n RecordsIterable<TypedStruct> result = filter.apply(null, create().put(\"message\", PRIMITIVE_VALUES), false);\n Assert.assertEquals(PRIMITIVE_VALUES.size(), result.size());\n Assert.assertEquals(PRIMITIVE_VALUES...
{ "fields": [ { "declarator": "config", "modifier": "private", "original_string": "private ExplodeFilterConfig config;", "type": "ExplodeFilterConfig", "var_name": "config" } ], "file": "connect-file-pulse-filters/src/main/java/io/streamthoughts/kafka/connect/filepulse/filter...
{ "body": "@Override\n protected RecordsIterable<TypedStruct> apply(final FilterContext context,\n final TypedStruct record) throws FilterException {\n final TypedValue value = checkIsNotNull(record.find(config.source()));\n\n if (value.type() != Type.A...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_5
{ "fields": [ { "declarator": "context = new StandardEvaluationContext(new Object())", "modifier": "private", "original_string": "private StandardEvaluationContext context = new StandardEvaluationContext(new Object());", "type": "StandardEvaluationContext", "var_name": "context" ...
{ "body": "@Test\n public void should_read_property_using_getter_method_given_pojo() {\n ReflectivePropertyAccessor accessor = new ReflectivePropertyAccessor();\n Object object = accessor.read(context, new DummyObject(\"foo\"), \"field\");\n Assert.assertEquals(\"foo\", object);\n }", "cl...
{ "fields": [ { "declarator": "GETTER_PREFIX = \"get\"", "modifier": "private static final", "original_string": "private static final String GETTER_PREFIX = \"get\";", "type": "String", "var_name": "GETTER_PREFIX" }, { "declarator": "SETTER_PREFIX = \"set\"", "mod...
{ "body": "@Override\n public Object read(final EvaluationContext context,\n final Object target,\n final String name) throws AccessException {\n Objects.requireNonNull(target, \"target cannot be null\");\n Objects.requireNonNull(name, \"name cannot be null...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_73
{ "fields": [ { "declarator": "DEFAULT_FIELD_ONE = \"a\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_FIELD_ONE = \"a\";", "type": "String", "var_name": "DEFAULT_FIELD_ONE" }, { "declarator": "DEFAULT_FIELD_TWO = \"b\"", ...
{ "body": "@Test\n public void shouldThrowExceptionGivenTwoArrayFieldWithDifferentType() {\n Schema schemaLeft = SchemaBuilder.struct()\n .field(DEFAULT_FIELD_ONE, SchemaBuilder.array(SchemaBuilder.int64()))\n .build();\n\n\n Schema schemaRight = SchemaBuilder.struct()\n...
{ "fields": [], "file": "connect-file-pulse-api/src/main/java/io/streamthoughts/kafka/connect/filepulse/internal/SchemaUtils.java", "identifier": "SchemaUtils", "interfaces": "", "methods": [ { "class_method_signature": "SchemaUtils.getAllFieldNames(final Schema schema)", "constructor": false,...
{ "body": "public static void merge(final Schema leftSchema,\n final Schema rightSchema,\n final SchemaBuilder builder,\n final Set<String> overwrite) {\n final Map<String, Field> rightFields = groupFieldByName(rightSchema.fiel...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_24
{ "fields": [ { "declarator": "DEFAULT_EXPRESSION_STRING = \"{{ value }}\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_EXPRESSION_STRING = \"{{ value }}\";", "type": "String", "var_name": "DEFAULT_EXPRESSION_STRING" }, { ...
{ "body": "@Test\n public void testGivenSuffixedExpressionWithReplacement() {\n final int startIndex = 0;\n final int endIndex = DEFAULT_EXPRESSION_STRING.length();\n SubstitutionExpression expression = new SubstitutionExpression(DEFAULT_EXPRESSION_STRING + SUFFIX, startIndex, endIndex, DEFAUL...
{ "fields": [ { "declarator": "replacements", "modifier": "private final", "original_string": "private final TreeSet<ReplacementExpression> replacements;", "type": "TreeSet<ReplacementExpression>", "var_name": "replacements" } ], "file": "connect-file-pulse-expression/src/mai...
{ "body": "@Override\n public Object readValue(final EvaluationContext context) {\n return readValue(context, TypedValue.class).value();\n }", "class_method_signature": "SubstitutionExpression.readValue(final EvaluationContext context)", "constructor": false, "full_signature": "@Override public Obj...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_32
{ "fields": [ { "declarator": "metadata = new SourceMetadata(\n \"test\",\n \"/tmp/path\",\n 0L,\n 123L,\n 456L,\n 789L\n )", "modifier": "private static final", "original_string": "private static final SourceMetadata metadata ...
{ "body": "@Test(expected = NullPointerException.class)\n public void should_throw_npe_given_unknown_strategy() {\n new ComposeOffsetStrategy(null).toPartitionMap(metadata);\n }", "class_method_signature": "ComposeOffsetStrategyTest.should_throw_npe_given_unknown_strategy()", "constructor": false, ...
{ "fields": [ { "declarator": "FILEPATH_FIELD = \"path\"", "modifier": "private static final", "original_string": "private static final String FILEPATH_FIELD = \"path\";", "type": "String", "var_name": "FILEPATH_FIELD" }, { "declarator": "FILENAME_FIELD = \"name\"", ...
{ "body": "@Override\n public Map<String, Object> toPartitionMap(final SourceMetadata metadata) {\n Map<String, Object> offset = new LinkedHashMap<>();\n for (GenericOffsetStrategy strategy : strategies) {\n strategy.addAttributeToPartitionMap(metadata, offset);\n }\n return ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_65
{ "fields": [ { "declarator": "DEFAULT_FIELD_ONE = \"a\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_FIELD_ONE = \"a\";", "type": "String", "var_name": "DEFAULT_FIELD_ONE" }, { "declarator": "DEFAULT_FIELD_TWO = \"b\"", ...
{ "body": "@Test\n public void shouldMergeSchemasGivenTwoFieldsWithDifferentTypeGivenOverride() {\n Schema schemaLeft = SchemaBuilder.struct()\n .field(DEFAULT_FIELD_ONE, Schema.STRING_SCHEMA)\n .build();\n\n\n Schema schemaRight = SchemaBuilder.struct()\n ...
{ "fields": [], "file": "connect-file-pulse-api/src/main/java/io/streamthoughts/kafka/connect/filepulse/internal/SchemaUtils.java", "identifier": "SchemaUtils", "interfaces": "", "methods": [ { "class_method_signature": "SchemaUtils.getAllFieldNames(final Schema schema)", "constructor": false,...
{ "body": "public static void merge(final Schema leftSchema,\n final Schema rightSchema,\n final SchemaBuilder builder,\n final Set<String> overwrite) {\n final Map<String, Field> rightFields = groupFieldByName(rightSchema.fiel...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_49
{ "fields": [ { "declarator": "converter = new DefaultJSONStructConverter()", "modifier": "private", "original_string": "private JSONStructConverter converter = new DefaultJSONStructConverter();", "type": "JSONStructConverter", "var_name": "converter" } ], "file": "connect-fi...
{ "body": "@Test\n public void shouldConvertGivenFieldsWithStringType() throws Exception {\n\n TypedValue value = converter.readJson(\"{\\\"field-one\\\" : \\\"one\\\", \\\"field-two\\\":\\\"two\\\"}\");\n\n Assert.assertNotNull(value);\n Assert.assertEquals(Type.STRUCT, value.type());\n ...
{ "fields": [ { "declarator": "ACCESSORS = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<ValueType, JsonFieldAccessor<?>> ACCESSORS = new HashMap<>();", "type": "Map<ValueType, JsonFieldAccessor<?>>", "var_name": "ACCESSORS" } ...
{ "body": "@Override\n public TypedValue readJson(final String data) {\n\n if (data == null) return null;\n\n try {\n JsonIterator it = JsonIterator.parse(data);\n return getAccessorForType(it.whatIsNext()).read(it);\n\n } catch (Exception e) {\n throw new Read...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
170883666_9
{ "fields": [], "file": "connect-file-pulse-expression/src/test/java/io/streamthoughts/kafka/connect/filepulse/expression/parser/antlr4/Antlr4ExpressionParserTest.java", "identifier": "Antlr4ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_parse_substitution_expression_given_property_with_scope() {\n final String strExpression = \"{{ $scope }}\";\n Expression expression = new Antlr4ExpressionParser().parseExpression(strExpression);\n assertSubstitutionException(\n expression,\n ...
{ "fields": [ { "declarator": "DEFAULT_ROOT_OBJECT = \"value\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_ROOT_OBJECT = \"value\";", "type": "String", "var_name": "DEFAULT_ROOT_OBJECT" } ], "file": "connect-file-pulse-express...
{ "body": "@Override\n public Expression parseExpression(final String expression) throws ExpressionException {\n return parseExpression(expression, DEFAULT_ROOT_OBJECT);\n }", "class_method_signature": "Antlr4ExpressionParser.parseExpression(final String expression)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 170883666, "size": 2776, "stargazer_count": 26, "stars": null, "updates": null, "url": "https://github.com/streamthoughts/kafka-connect-file-pulse" }
9922054_5
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test\n public void typeProvidersShouldWorkForSubtypes() {\n final Widget someWidget = mock(Widget.class);\n\n GwtMockito.useProviderForType(Widget.class, new FakeProvider<Widget>() {\n @Override\n public Widget getFake(Class<?> type) {\n assertTrue(type == Label.class);\n re...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static void useProviderForType(Class<?> type, FakeProvider<?> provider) {\n if (bridge == null) {\n throw new IllegalStateException(\"Must call initMocks() before calling useProviderForType()\");\n }\n if (bridge.registeredMocks.containsKey(type)) {\n throw new IllegalArgumentExce...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_9
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test\n public void shouldAlwaysUseMostSpecificProvider() {\n GwtMockito.useProviderForType(AnotherInterface.class, new FakeProvider<AnotherInterface>() {\n @Override\n public AnotherInterface getFake(Class<?> type) {\n AnotherInterface mock = (AnotherInterface) mock(type);\n wh...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static void useProviderForType(Class<?> type, FakeProvider<?> provider) {\n if (bridge == null) {\n throw new IllegalStateException(\"Must call initMocks() before calling useProviderForType()\");\n }\n if (bridge.registeredMocks.containsKey(type)) {\n throw new IllegalArgumentExce...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_8
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test\n public void canUseProvidersForDifferentTypes() {\n GwtMockito.useProviderForType(Button.class, new FakeProvider<Label>() {\n @Override\n public Label getFake(Class<?> type) {\n Label label = mock(Label.class);\n when(label.getText()).thenReturn(\"abc\");\n return ...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static void useProviderForType(Class<?> type, FakeProvider<?> provider) {\n if (bridge == null) {\n throw new IllegalStateException(\"Must call initMocks() before calling useProviderForType()\");\n }\n if (bridge.registeredMocks.containsKey(type)) {\n throw new IllegalArgumentExce...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_4
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test\n public void canUseProvidersForTypes() {\n GwtMockito.useProviderForType(AnotherInterface.class, new FakeProvider<AnotherInterface>() {\n @Override\n public AnotherInterface getFake(Class<?> type) {\n return new AnotherInterface() {\n @Override\n public String ...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static void useProviderForType(Class<?> type, FakeProvider<?> provider) {\n if (bridge == null) {\n throw new IllegalStateException(\"Must call initMocks() before calling useProviderForType()\");\n }\n if (bridge.registeredMocks.containsKey(type)) {\n throw new IllegalArgumentExce...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_10
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test\n public void shouldFailForAmbiguousProviders() {\n GwtMockito.useProviderForType(AnotherInterface.class, new FakeProvider<AnotherInterface>() {\n @Override\n public AnotherInterface getFake(Class<?> type) {\n return mock(AnotherInterface.class);\n }\n });\n GwtMockito...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static void useProviderForType(Class<?> type, FakeProvider<?> provider) {\n if (bridge == null) {\n throw new IllegalStateException(\"Must call initMocks() before calling useProviderForType()\");\n }\n if (bridge.registeredMocks.containsKey(type)) {\n throw new IllegalArgumentExce...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_3
{ "fields": [ { "declarator": "dataProvider", "modifier": "@GwtMock private", "original_string": "@GwtMock private DataProvider dataProvider;", "type": "DataProvider", "var_name": "dataProvider" }, { "declarator": "myService", "modifier": "@GwtMock private", ...
{ "body": "@Test\n @SuppressWarnings(\"unchecked\")\n public void testMockRpcs() {\n doAnswer(returnSuccess(\"some data\")).when(myService).getData(any(AsyncCallback.class));\n widget.loadDataFromRpc();\n verify(widget.data).setText(\"some data\");\n }", "class_method_signature": "MyWidgetTest.testMockR...
{ "fields": [ { "declarator": "uiBinder = GWT.create(MyUiBinder.class)", "modifier": "private static final", "original_string": "private static final MyUiBinder uiBinder = GWT.create(MyUiBinder.class);", "type": "MyUiBinder", "var_name": "uiBinder" }, { "declarator": "n...
{ "body": "public void loadDataFromRpc() {\n MyServiceAsync service = GWT.create(MyService.class);\n service.getData(new AsyncCallback<String>() {\n @Override\n public void onSuccess(String result) {\n data.setText(result);\n }\n\n @Override\n public void onFailure(Throwable caug...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_2
{ "fields": [ { "declarator": "dataProvider", "modifier": "@GwtMock private", "original_string": "@GwtMock private DataProvider dataProvider;", "type": "DataProvider", "var_name": "dataProvider" }, { "declarator": "myService", "modifier": "@GwtMock private", ...
{ "body": "@Test\n public void testSetNameWithFakes() {\n // If we don't want to use mocks, we can instead provide fake\n // implementations to be created. Normally you would do this in setUp.\n GwtMockito.useProviderForType(HasText.class, new FakeProvider<HasText>() {\n @Override\n public HasText...
{ "fields": [ { "declarator": "uiBinder = GWT.create(MyUiBinder.class)", "modifier": "private static final", "original_string": "private static final MyUiBinder uiBinder = GWT.create(MyUiBinder.class);", "type": "MyUiBinder", "var_name": "uiBinder" }, { "declarator": "n...
{ "body": "public void setName(String firstName, String lastName) {\n name.setText(firstName + \" \" + lastName);\n }", "class_method_signature": "MyWidget.setName(String firstName, String lastName)", "constructor": false, "full_signature": "public void setName(String firstName, String lastName)", "identi...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_11
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test\n public void getFakeShouldReturnDefaultFakes() {\n SampleMessages messages = GwtMockito.getFake(SampleMessages.class);\n assertEquals(\"noArgs\", messages.noArgs());\n }", "class_method_signature": "GwtMockitoTest.getFakeShouldReturnDefaultFakes()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static <T> T getFake(Class<T> type) {\n // If initMocks hasn't been called, read from the default fake provider map. This allows static\n // fields to be initialized with fakes in tests that don't use the GwtMockito test runner.\n T fake = getFakeFromProviderMap(\n type,\n bri...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_1
{ "fields": [ { "declarator": "dataProvider", "modifier": "@GwtMock private", "original_string": "@GwtMock private DataProvider dataProvider;", "type": "DataProvider", "var_name": "dataProvider" }, { "declarator": "myService", "modifier": "@GwtMock private", ...
{ "body": "@Test\n public void testUpdateData() {\n // Since dataProvider is declared as a @GwtMock, any calls to\n // GWT.create(dataProvider.class) will return dataProvider.\n when(dataProvider.getData()).thenReturn(\"data\");\n\n widget.updateData();\n\n verify(widget.data).setText(\"data\");\n }"...
{ "fields": [ { "declarator": "uiBinder = GWT.create(MyUiBinder.class)", "modifier": "private static final", "original_string": "private static final MyUiBinder uiBinder = GWT.create(MyUiBinder.class);", "type": "MyUiBinder", "var_name": "uiBinder" }, { "declarator": "n...
{ "body": "public void updateData() {\n data.setText(dataProvider.getData());\n }", "class_method_signature": "MyWidget.updateData()", "constructor": false, "full_signature": "public void updateData()", "identifier": "updateData", "invocations": [ "setText", "getData" ], "modifiers": "public...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_12
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test\n public void getFakeShouldFailForUnregisteredFakes() {\n try {\n GwtMockito.getFake(SampleInterface.class);\n fail(\"Exception not thrown\");\n } catch (IllegalArgumentException e) {\n assertTrue(e.getMessage().contains(\"SampleInterface\"));\n }\n }", "class_method_signa...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static <T> T getFake(Class<T> type) {\n // If initMocks hasn't been called, read from the default fake provider map. This allows static\n // fields to be initialized with fakes in tests that don't use the GwtMockito test runner.\n T fake = getFakeFromProviderMap(\n type,\n bri...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_0
{ "fields": [ { "declarator": "dataProvider", "modifier": "@GwtMock private", "original_string": "@GwtMock private DataProvider dataProvider;", "type": "DataProvider", "var_name": "dataProvider" }, { "declarator": "myService", "modifier": "@GwtMock private", ...
{ "body": "@Test\n public void testSetName() {\n widget.setName(\"John\", \"Smith\");\n\n // Since name is a @UiField, it will be automatically filled with a mock\n // that we can verify here.\n verify(widget.name).setText(\"John Smith\");\n }", "class_method_signature": "MyWidgetTest.testSetName()", ...
{ "fields": [ { "declarator": "uiBinder = GWT.create(MyUiBinder.class)", "modifier": "private static final", "original_string": "private static final MyUiBinder uiBinder = GWT.create(MyUiBinder.class);", "type": "MyUiBinder", "var_name": "uiBinder" }, { "declarator": "n...
{ "body": "public void setName(String firstName, String lastName) {\n name.setText(firstName + \" \" + lastName);\n }", "class_method_signature": "MyWidget.setName(String firstName, String lastName)", "constructor": false, "full_signature": "public void setName(String firstName, String lastName)", "identi...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_7
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldNotAllowMultipleGwtMocksForSameType() {\n GwtMockito.initMocks(new Object() {\n @GwtMock SampleInterface mock1;\n @GwtMock SampleInterface mock2;\n });\n }", "class_method_signature": "GwtMockitoTest.shouldNotAllowMult...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static void initMocks(Object owner) {\n // Create a new bridge and register built-in type providers\n bridge = new Bridge();\n for (Entry<Class<?>, FakeProvider<?>> entry : DEFAULT_FAKE_PROVIDERS.entrySet()) {\n useProviderForType(entry.getKey(), entry.getValue());\n }\n\n // Ins...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
9922054_6
{ "fields": [ { "declarator": "mockedInterface", "modifier": "@GwtMock", "original_string": "@GwtMock SampleInterface mockedInterface;", "type": "SampleInterface", "var_name": "mockedInterface" }, { "declarator": "element", "modifier": "@Mock", "original_str...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldNotAllowProvidersForGwtMockedTypes() {\n GwtMockito.useProviderForType(SampleInterface.class, new FakeProvider<SampleInterface>() {\n @Override\n public SampleInterface getFake(Class<?> type) {\n return mock(SampleInt...
{ "fields": [ { "declarator": "DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>()", "modifier": "private static final", "original_string": "private static final Map<Class<?>, FakeProvider<?>> DEFAULT_FAKE_PROVIDERS =\n new HashMap<Class<?>, FakeProvider<?>>();", ...
{ "body": "public static void useProviderForType(Class<?> type, FakeProvider<?> provider) {\n if (bridge == null) {\n throw new IllegalStateException(\"Must call initMocks() before calling useProviderForType()\");\n }\n if (bridge.registeredMocks.containsKey(type)) {\n throw new IllegalArgumentExce...
{ "created": null, "fork": null, "fork_count": 53, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9922054, "size": 382, "stargazer_count": 152, "stars": null, "updates": null, "url": "https://github.com/google/gwtmockito" }
165549674_0
{ "fields": [], "file": "org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertor_10_30Test.java", "identifier": "VersionConvertor_10_30Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @DisplayName(\"Test 10_30 UnsignedIntType preserves value on conversion.\")\n public void testConvertUnsignedInt() {\n org.hl7.fhir.dstu3.model.UnsignedIntType output;\n output = (org.hl7.fhir.dstu3.model.UnsignedIntType)VersionConvertor_10_30.convertType(new org.hl7.fhir.dstu2.model.Unsign...
{ "fields": [], "file": "org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertor_10_30.java", "identifier": "VersionConvertor_10_30", "interfaces": "", "methods": [ { "class_method_signature": "VersionConvertor_10_30.copyElement(org.hl7.fhir.dstu2.model.Element src, org.hl7.fh...
{ "body": "public static org.hl7.fhir.dstu3.model.UnsignedIntType convertUnsignedInt(org.hl7.fhir.dstu2.model.UnsignedIntType src) throws FHIRException {\n org.hl7.fhir.dstu3.model.UnsignedIntType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.UnsignedIntType(src.getValue()) : new org.hl7.fhir.dstu3.model.Uns...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_1
{ "fields": [], "file": "org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/model/BaseDateTimeTypeTest.java", "identifier": "BaseDateTimeTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void equalsUsingFhirPathRulesOther() {\n // Setting timezone for this test. Grahame is in UTC+11, Travis is in GMT, and I'm here in Toronto, Canada with\n // all my time based tests failing locally...\n TimeZone.setDefault(TimeZone.getTimeZone(\"UTC+1100\"));\n\n // Exact same -...
{ "fields": [ { "declarator": "NANOS_PER_MILLIS = 1000000L", "modifier": "static final", "original_string": "static final long NANOS_PER_MILLIS = 1000000L;", "type": "long", "var_name": "NANOS_PER_MILLIS" }, { "declarator": "NANOS_PER_SECOND = 1000000000L", "modif...
{ "body": "public TimeZone getTimeZone() {\n\t\tif (myTimeZoneZulu) {\n\t\t\treturn TimeZone.getTimeZone(\"GMT\");\n\t\t}\n\t\treturn myTimeZone;\n\t}", "class_method_signature": "BaseDateTimeType.getTimeZone()", "constructor": false, "full_signature": "public TimeZone getTimeZone()", "identifier": "getTimeZo...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_6
{ "fields": [ { "declarator": "BAD_STRING_ARG = \"THIS_DOES_NOT_EXIST\"", "modifier": "public static final", "original_string": "public static final String BAD_STRING_ARG = \"THIS_DOES_NOT_EXIST\";", "type": "String", "var_name": "BAD_STRING_ARG" }, { "declarator": "ARG...
{ "body": "@Test\n @DisplayName(\"Test argument substitution without initializing Locale.\")\n void testFormatMessageWithoutInitLocale() {\n I18nTestClass testClass = new I18nTestClass();\n ResourceBundle loadedBundle = ResourceBundle.getBundle(\"Messages\", Locale.US);\n String result = testClass.formatMe...
{ "fields": [ { "declarator": "locale", "modifier": "private", "original_string": "private Locale locale;", "type": "Locale", "var_name": "locale" }, { "declarator": "i18nMessages", "modifier": "private", "original_string": "private ResourceBundle i18nMessag...
{ "body": "public String formatMessage(String theMessage, Object... theMessageArguments) {\n String message = theMessage;\n if (messageExistsForLocale(theMessage, (theMessageArguments != null && theMessageArguments.length > 0))) {\n if (Objects.nonNull(theMessageArguments) && theMessageArguments.length > 0...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_12
{ "fields": [], "file": "org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/model/BaseDateTimeTypeTest.java", "identifier": "BaseDateTimeTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @Disabled\n public void equalsUsingFhirPathRules() {\n\n // Exact same - Same timezone\n Assertions.assertTrue(compareDateTimes(\"2001-01-02T11:22:33.444Z\", \"2001-01-02T11:22:33.444Z\"));\n // Exact same - Different timezone\n Assertions.assertTrue(compareDateTimes(\"2001-01-02T11:2...
{ "fields": [ { "declarator": "NANOS_PER_MILLIS = 1000000L", "modifier": "static final", "original_string": "static final long NANOS_PER_MILLIS = 1000000L;", "type": "long", "var_name": "NANOS_PER_MILLIS" }, { "declarator": "NANOS_PER_SECOND = 1000000000L", "modif...
{ "body": "public Boolean equalsUsingFhirPathRules(BaseDateTimeType theOther) {\n\n BaseDateTimeType me = this;\n\n // Per FHIRPath rules, we compare equivalence at the lowest precision of the two values,\n // so if we need to, we'll clone either side and reduce its precision\n int lowestPrecision = Math....
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_7
{ "fields": [ { "declarator": "BAD_STRING_ARG = \"THIS_DOES_NOT_EXIST\"", "modifier": "public static final", "original_string": "public static final String BAD_STRING_ARG = \"THIS_DOES_NOT_EXIST\";", "type": "String", "var_name": "BAD_STRING_ARG" }, { "declarator": "ARG...
{ "body": "@Test\n @DisplayName(\"Assert no string modification is done when no match is found.\")\n void testFormatMessageForNonExistentMessage() {\n I18nTestClass testClass = new I18nTestClass();\n Assertions.assertEquals(BAD_STRING_ARG, testClass.formatMessage(BAD_STRING_ARG, ARG_1));\n }", "class_metho...
{ "fields": [ { "declarator": "locale", "modifier": "private", "original_string": "private Locale locale;", "type": "Locale", "var_name": "locale" }, { "declarator": "i18nMessages", "modifier": "private", "original_string": "private ResourceBundle i18nMessag...
{ "body": "public String formatMessage(String theMessage, Object... theMessageArguments) {\n String message = theMessage;\n if (messageExistsForLocale(theMessage, (theMessageArguments != null && theMessageArguments.length > 0))) {\n if (Objects.nonNull(theMessageArguments) && theMessageArguments.length > 0...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_4
{ "fields": [], "file": "org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/model/Base64BinaryTypeTest.java", "identifier": "Base64BinaryTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @DisplayName(\"Valid Base64 String creates non-null instance with non-null values.\")\n public void testValid() {\n String v = \"dGhpcyBpcyB2YWxpZCBiYXNlNjQ=\";\n Base64BinaryType b64 = new Base64BinaryType(v);\n Assertions.assertNotNull(b64);\n Assertions.assertNotNull(b64.getValue()...
{ "fields": [ { "declarator": "serialVersionUID = 3L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 3L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "myValue", "modifier": "private", ...
{ "body": "@Override\n public byte[] getValue() {\n return myValue;\n }", "class_method_signature": "Base64BinaryType.getValue()", "constructor": false, "full_signature": "@Override public byte[] getValue()", "identifier": "getValue", "invocations": [], "modifiers": "@Override public", "parameters"...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_11
{ "fields": [ { "declarator": "OSX = \"OS X\"", "modifier": "public static final", "original_string": "public static final String OSX = \"OS X\";", "type": "String", "var_name": "OSX" }, { "declarator": "MAC = \"MAC\"", "modifier": "public static final", "or...
{ "body": "@Test\n @DisplayName(\"Test size bounds on file size utility.\")\n void describeSizeTest() {\n Assertions.assertAll(\"GB Measure Limits\",\n () -> assertTrue(Utilities.describeSize(GB_MEASURE_JUST_OVER).contains(Utilities.GB)),\n () -> assertTrue(Utilities.describeSize(GB_MEASURE_EXACT).cont...
{ "fields": [ { "declarator": "OID_REGEX = \"[0-2](\\\\.(0|[1-9][0-9]*))+\"", "modifier": "private static final", "original_string": "private static final String OID_REGEX = \"[0-2](\\\\.(0|[1-9][0-9]*))+\";", "type": "String", "var_name": "OID_REGEX" }, { "declarator":...
{ "body": "public static String describeSize(int length) {\n if (length < 0) throw new IllegalArgumentException(\"File length of < 0 passed in...\");\n\n if (length > Math.pow(ONE_MB, 3)) {\n return length / ((long) Math.pow(ONE_MB, 3)) + GB;\n }\n if (length > Math.pow(ONE_MB, 2)) {\n return l...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_8
{ "fields": [ { "declarator": "OSX = \"OS X\"", "modifier": "public static final", "original_string": "public static final String OSX = \"OS X\";", "type": "String", "var_name": "OSX" }, { "declarator": "MAC = \"MAC\"", "modifier": "public static final", "or...
{ "body": "@Test\n @DisplayName(\"Test Utilities.path maps temp directory correctly\")\n public void testTempDirPath() throws IOException {\n Assertions.assertEquals(Utilities.path(\"[tmp]\", TEST_TXT), getTempDirectory() + TEST_TXT);\n }", "class_method_signature": "UtilitiesTest.testTempDirPath()", "const...
{ "fields": [ { "declarator": "OID_REGEX = \"[0-2](\\\\.(0|[1-9][0-9]*))+\"", "modifier": "private static final", "original_string": "private static final String OID_REGEX = \"[0-2](\\\\.(0|[1-9][0-9]*))+\";", "type": "String", "var_name": "OID_REGEX" }, { "declarator":...
{ "body": "public static String path(String... args) throws IOException {\n StringBuilder s = new StringBuilder();\n boolean d = false;\n boolean first = true;\n for (String arg : args) {\n if (first && arg == null)\n continue;\n first = false;\n if (!d)\n d = !noString(arg);\...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_9
{ "fields": [ { "declarator": "OSX = \"OS X\"", "modifier": "public static final", "original_string": "public static final String OSX = \"OS X\";", "type": "String", "var_name": "OSX" }, { "declarator": "MAC = \"MAC\"", "modifier": "public static final", "or...
{ "body": "@Test\n @DisplayName(\"Test Utilities.path maps user directory correctly\")\n public void testUserDirPath() throws IOException {\n Assertions.assertEquals(Utilities.path(\"[user]\", TEST_TXT), getUserDirectory() + TEST_TXT);\n }", "class_method_signature": "UtilitiesTest.testUserDirPath()", "cons...
{ "fields": [ { "declarator": "OID_REGEX = \"[0-2](\\\\.(0|[1-9][0-9]*))+\"", "modifier": "private static final", "original_string": "private static final String OID_REGEX = \"[0-2](\\\\.(0|[1-9][0-9]*))+\";", "type": "String", "var_name": "OID_REGEX" }, { "declarator":...
{ "body": "public static String path(String... args) throws IOException {\n StringBuilder s = new StringBuilder();\n boolean d = false;\n boolean first = true;\n for (String arg : args) {\n if (first && arg == null)\n continue;\n first = false;\n if (!d)\n d = !noString(arg);\...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_10
{ "fields": [ { "declarator": "OSX = \"OS X\"", "modifier": "public static final", "original_string": "public static final String OSX = \"OS X\";", "type": "String", "var_name": "OSX" }, { "declarator": "MAC = \"MAC\"", "modifier": "public static final", "or...
{ "body": "@Test\n @DisplayName(\"Test Utilities.path maps JAVA_HOME correctly\")\n public void testJavaHomeDirPath() throws IOException {\n Assertions.assertEquals(Utilities.path(\"[JAVA_HOME]\", TEST_TXT), getJavaHomeDirectory() + TEST_TXT);\n }", "class_method_signature": "UtilitiesTest.testJavaHomeDirPath...
{ "fields": [ { "declarator": "OID_REGEX = \"[0-2](\\\\.(0|[1-9][0-9]*))+\"", "modifier": "private static final", "original_string": "private static final String OID_REGEX = \"[0-2](\\\\.(0|[1-9][0-9]*))+\";", "type": "String", "var_name": "OID_REGEX" }, { "declarator":...
{ "body": "public static String path(String... args) throws IOException {\n StringBuilder s = new StringBuilder();\n boolean d = false;\n boolean first = true;\n for (String arg : args) {\n if (first && arg == null)\n continue;\n first = false;\n if (!d)\n d = !noString(arg);\...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_5
{ "fields": [], "file": "org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/model/Base64BinaryTypeTest.java", "identifier": "Base64BinaryTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @DisplayName(\"Valid Base64 String creates non-null instance with non-null values.\")\n public void testValid() {\n String v = \"dGhpcyBpcyB2YWxpZCBiYXNlNjQ=\";\n Base64BinaryType b64 = new Base64BinaryType(v);\n Assertions.assertNotNull(b64);\n Assertions.assertNotNull(b64.getValue()...
{ "fields": [ { "declarator": "serialVersionUID = 3L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 3L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "myValue", "modifier": "private", ...
{ "body": "@Override\n public byte[] getValue() {\n return myValue;\n }", "class_method_signature": "Base64BinaryType.getValue()", "constructor": false, "full_signature": "@Override public byte[] getValue()", "identifier": "getValue", "invocations": [], "modifiers": "@Override public", "parameters"...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_2
{ "fields": [], "file": "org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/model/BaseDateTimeTypeTest.java", "identifier": "BaseDateTimeTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToHumanDisplayForDateOnlyPrecisions() {\n Assertions.assertEquals(\"2019-01-02\", new DateTimeType(\"2019-01-02\").toHumanDisplay());\n Assertions.assertEquals(\"2019-01\", new DateTimeType(\"2019-01\").toHumanDisplay());\n Assertions.assertEquals(\"2019\", new DateTimeTyp...
{ "fields": [ { "declarator": "NANOS_PER_MILLIS = 1000000L", "modifier": "static final", "original_string": "static final long NANOS_PER_MILLIS = 1000000L;", "type": "long", "var_name": "NANOS_PER_MILLIS" }, { "declarator": "NANOS_PER_SECOND = 1000000000L", "modif...
{ "body": "public String toHumanDisplay() {\n\t return DateTimeUtil.toHumanDisplay(getTimeZone(), getPrecision(), getValue(), getValueAsString());\n\t}", "class_method_signature": "BaseDateTimeType.toHumanDisplay()", "constructor": false, "full_signature": "public String toHumanDisplay()", "identifier": "toH...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
165549674_3
{ "fields": [], "file": "org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/model/BaseDateTimeTypeTest.java", "identifier": "BaseDateTimeTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToHumanDisplayLocalTimezoneForDateOnlyPrecisions() {\n Assertions.assertEquals(\"2019-01-02\", new DateTimeType(\"2019-01-02\").toHumanDisplayLocalTimezone());\n Assertions.assertEquals(\"2019-01\", new DateTimeType(\"2019-01\").toHumanDisplayLocalTimezone());\n Assertions...
{ "fields": [ { "declarator": "NANOS_PER_MILLIS = 1000000L", "modifier": "static final", "original_string": "static final long NANOS_PER_MILLIS = 1000000L;", "type": "long", "var_name": "NANOS_PER_MILLIS" }, { "declarator": "NANOS_PER_SECOND = 1000000000L", "modif...
{ "body": "public String toHumanDisplayLocalTimezone() {\n\t return DateTimeUtil.toHumanDisplayLocalTimezone(getPrecision(), getValue(), getValueAsString());\n\t}", "class_method_signature": "BaseDateTimeType.toHumanDisplayLocalTimezone()", "constructor": false, "full_signature": "public String toHumanDisplayL...
{ "created": "1/13/2019 8:14:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 165549674, "size": null, "stargazer_count": null, "stars": 23, "updates": "2020-01-27T10:15:36+00:00", "url": "https://github.com/hapifhir/org.hl7...
68739393_0
{ "fields": [ { "declarator": "orderServiceV1", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private OrderServiceV1 orderServiceV1;", "type": "OrderServiceV1", "var_name": "orderServiceV1" } ], "file": "microservices/order-service/src/test/java/c...
{ "body": "@Test\n public void createOrder() throws Exception {\n // Create a new order and aggregate\n OrderAggregate expected = orderServiceV1.createOrder(new CreateOrderRequest(OrderStatus.CREATED));\n Assert.assertEquals(expected.getStatus(), OrderStatus.CREATED);\n\n String orderNu...
{ "fields": [ { "declarator": "log = LogFactory.getLog(OrderServiceV1.class)", "modifier": "private", "original_string": "private Log log = LogFactory.getLog(OrderServiceV1.class);", "type": "Log", "var_name": "log" }, { "declarator": "aggregateRepository", "modif...
{ "body": "public OrderAggregate createOrder(CreateOrderRequest orderRequest) {\n EntityWithIdAndVersion<OrderAggregate> createdAggregate =\n Util.get(aggregateRepository.save(new CreateOrderCommand(orderRequest.getOrderStatus())));\n\n // Save using JPA too\n\n OrderAggregate orde...
{ "created": null, "fork": null, "fork_count": 26, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 68739393, "size": 30, "stargazer_count": 17, "stars": null, "updates": null, "url": "https://github.com/kbastani/javaone-2016" }
9120355_0
{ "fields": [], "file": "codemodel/src/test/java/com/sun/codemodel/util/NameUtilitiesTest.java", "identifier": "NameUtilitiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testInnerClassNaming() {\n\t\tString expected =\n\t\t\tNameUtilitiesTest.class.getPackage().getName()+\".\"\n\t\t + NameUtilitiesTest.class.getSimpleName()+\".\"\n\t\t + \"Inner\"\n\t\t;\n\n\t\tString name = NameUtilities.getFullName(Inner.class);\n\t\tAssert.assertEquals(expected, n...
{ "fields": [], "file": "codemodel/src/main/java/com/sun/codemodel/util/NameUtilities.java", "identifier": "NameUtilities", "interfaces": "", "methods": [ { "class_method_signature": "NameUtilities.getFullName(Class c)", "constructor": false, "full_signature": "public static String getFu...
{ "body": "public static String getFullName(Class c) {\n\t\tif (c == null) {\n\t\t\tthrow new IllegalArgumentException(\"class cannot be null\");\n\t\t}\n\n\t\tStringBuilder name = new StringBuilder();\n\t\tname.append(c.getPackage().getName()).append(\".\");\n\n\t\tClass klaus = c;\n\t\tList<Class> enclosingClasses ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 9120355, "size": 3231, "stargazer_count": 11, "stars": null, "updates": null, "url": "https://github.com/UnquietCode/JCodeModel" }
3382195_250
{ "fields": [ { "declarator": "samlTestUtils = new SamlTestUtils()", "modifier": "private final", "original_string": "private final SamlTestUtils samlTestUtils = new SamlTestUtils();", "type": "SamlTestUtils", "var_name": "samlTestUtils" }, { "declarator": "conf = null"...
{ "body": "@Test\n public void testGetSamlServiceProvidersForZone() throws Exception {\n try {\n String zoneId = UUID.randomUUID().toString();\n SamlServiceProvider sp = mockSamlServiceProviderForZone(\"uaa\");\n sp.setIdentityZoneId(zoneId);\n IdentityZoneHolder....
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SamlServiceProviderConfigurator.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SamlServiceProviderConfigurator.class);", "type": "Logger", "var_nam...
{ "body": "public List<SamlServiceProviderHolder> getSamlServiceProvidersForZone(IdentityZone zone) {\n List<SamlServiceProviderHolder> result = new LinkedList<>();\n for (SamlServiceProvider provider : providerProvisioning.retrieveActive(zone.getId())) {\n try {\n SamlServiceP...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_315
{ "fields": [ { "declarator": "userId", "modifier": "private", "original_string": "private String userId;", "type": "String", "var_name": "userId" }, { "declarator": "endpoint", "modifier": "private", "original_string": "private TotpMfaEndpoint endpoint;", ...
{ "body": "@Test\n public void testGenerateQrUrlAfterMfaProviderSwitch() throws Exception{\n when(uaaAuthentication.getPrincipal()).thenReturn(new UaaPrincipal(userId, \"Marissa\", null, null, null, null), null, null);\n\n when(userGoogleMfaCredentialsProvisioning.activeUserCredentialExists(userId, m...
{ "fields": [ { "declarator": "mfaCredentialsProvisioning", "modifier": "private final", "original_string": "private final UserGoogleMfaCredentialsProvisioning mfaCredentialsProvisioning;", "type": "UserGoogleMfaCredentialsProvisioning", "var_name": "mfaCredentialsProvisioning" }...
{ "body": "@RequestMapping(value = {\"/register\"}, method = RequestMethod.GET)\n public String generateQrUrl(Model model,\n @ModelAttribute(\"uaaMfaCredentials\") UserGoogleMfaCredentials credentials)\n throws WriterException, IOException, UaaPrincipalIsNotInSession {\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_196
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/scim/util/ScimUtilsTest.java", "identifier": "ScimUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void userWithEmptyEmail() {\n ScimUser user = new ScimUser(null, \"josephine\", \"Jo\", \"Jung\");\n List<ScimUser.Email> emails = new ArrayList<>();\n ScimUser.Email email = new ScimUser.Email();\n email.setValue(\"\");\n emails.add(email);\n user.setEm...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ScimUtils.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ScimUtils.class);", "type": "Logger", "var_name": "logger" } ], "file": "ser...
{ "body": "public static void validate(final ScimUser user) throws InvalidScimResourceException {\n Pattern usernamePattern = Pattern.compile(\"[\\\\p{L}+0-9+\\\\-_.@'!]+\");\n if (!hasText(user.getUserName())) {\n throw new InvalidScimResourceException(\"A username must be provided.\");\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_179
{ "fields": [ { "declarator": "samlResponseLoggerBinding", "modifier": "private", "original_string": "private SamlResponseLoggerBinding samlResponseLoggerBinding;", "type": "SamlResponseLoggerBinding", "var_name": "samlResponseLoggerBinding" }, { "declarator": "original...
{ "body": "@Test\n void doesNotFailWithNullParameterMap() {\n HttpServletRequest mockHttpServletRequest = mock(HttpServletRequest.class);\n when(mockHttpServletRequest.getParameterMap()).thenReturn(null);\n HttpServletRequestAdapter httpServletRequestAdapter = new HttpServletRequestAdapter(moc...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SamlResponseLoggerBinding.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SamlResponseLoggerBinding.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public boolean supports(InTransport transport) {\n if (!(transport instanceof HttpServletRequestAdapter)) {\n return false;\n }\n\n HttpServletRequest httpServletRequest = ((HttpServletRequestAdapter) transport).getWrappedRequest();\n LOGGER.warn(\"Malf...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_483
{ "fields": [ { "declarator": "mfaProviderProvisioning", "modifier": "private", "original_string": "private JdbcMfaProviderProvisioning mfaProviderProvisioning;", "type": "JdbcMfaProviderProvisioning", "var_name": "mfaProviderProvisioning" }, { "declarator": "mfaProvide...
{ "body": "@Test\n void retrieveAll() {\n String zoneId = IdentityZoneHolder.get().getId();\n List<MfaProvider> providers = mfaProviderProvisioning.retrieveAll(zoneId);\n doNothing().when(mfaProviderValidator);\n int beforeCount = providers.size();\n\n MfaProvider mfaProvider = c...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JdbcMfaProviderProvisioning.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(JdbcMfaProviderProvisioning.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public List<MfaProvider> retrieveAll(String zoneId) {\n return jdbcTemplate.query(MFA_PROVIDERS_QUERY, mapper, zoneId);\n }", "class_method_signature": "JdbcMfaProviderProvisioning.retrieveAll(String zoneId)", "constructor": false, "full_signature": "@Override public List<Mfa...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_207
{ "fields": [ { "declarator": "mockMvc", "modifier": "private", "original_string": "private MockMvc mockMvc;", "type": "MockMvc", "var_name": "mockMvc" }, { "declarator": "webApplicationContext", "modifier": "@Autowired", "original_string": "@Autowired\n ...
{ "body": "@Test\n public void acceptInviteWithInvalidClientRedirect() throws Exception {\n UaaPrincipal uaaPrincipal = new UaaPrincipal(\"user-id-001\", \"user@example.com\", \"user@example.com\", OriginKeys.UAA, null,IdentityZoneHolder.get().getId());\n UsernamePasswordAuthenticationToken token = n...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(InvitationsController.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(InvitationsController.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@RequestMapping(value = \"/accept.do\", method = POST)\n public String acceptInvitation(@RequestParam(\"password\") String password,\n @RequestParam(\"password_confirmation\") String passwordConfirmation,\n @RequestParam(\"code\") Strin...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_50
{ "fields": [ { "declarator": "alias = \"saml\"", "modifier": "public static final", "original_string": "public static final String alias = \"saml\";", "type": "String", "var_name": "alias" }, { "declarator": "idpMetaData = \"<?xml version=\\\"1.0\\\"?>\\n\" +\n ...
{ "body": "@Test\n public void test_uaa_is_catch_all() {\n ldapDef.setEmailDomain(EMPTY_LIST);\n samlDef1.setEmailDomain(EMPTY_LIST);\n samlDef2.setEmailDomain(EMPTY_LIST);\n configureTestData();\n assertThat(filter.filter(activeProviders, client, email), Matchers.containsInAnyOr...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(DomainFilter.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(DomainFilter.class);", "type": "Logger", "var_name": "logger" } ], "file": "server/sr...
{ "body": "public static List<IdentityProvider> filter(List<IdentityProvider> activeProviders, ClientDetails client, String email) {\n return filter(activeProviders, client, email, true);\n }", "class_method_signature": "DomainFilter.filter(List<IdentityProvider> activeProviders, ClientDetails client, Str...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_342
{ "fields": [ { "declarator": "oAuth2RequestFactory", "modifier": "private", "original_string": "private OAuth2RequestFactory oAuth2RequestFactory;", "type": "OAuth2RequestFactory", "var_name": "oAuth2RequestFactory" }, { "declarator": "uaaAuthorizationEndpoint", ...
{ "body": "@Test\n public void testGetGrantType_id_token_only_is_implicit() {\n responseTypes.add(\"id_token\");\n assertEquals(GRANT_TYPE_IMPLICIT, uaaAuthorizationEndpoint.deriveGrantTypeFromResponseType(responseTypes));\n }", "class_method_signature": "UaaAuthorizationEndpointTest.testGetGran...
{ "fields": [ { "declarator": "AUTHORIZATION_REQUEST = \"authorizationRequest\"", "modifier": "public static final", "original_string": "public static final String AUTHORIZATION_REQUEST = \"authorizationRequest\";", "type": "String", "var_name": "AUTHORIZATION_REQUEST" }, { ...
{ "body": "protected String deriveGrantTypeFromResponseType(Set<String> responseTypes) {\n if (responseTypes.contains(\"token\")) {\n return GRANT_TYPE_IMPLICIT;\n } else if (responseTypes.size() == 1 && responseTypes.contains(\"id_token\")) {\n return GRANT_TYPE_IMPLICIT;\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_46
{ "fields": [ { "declarator": "alias = \"saml\"", "modifier": "public static final", "original_string": "public static final String alias = \"saml\";", "type": "String", "var_name": "alias" }, { "declarator": "idpMetaData = \"<?xml version=\\\"1.0\\\"?>\\n\" +\n ...
{ "body": "@Test\n public void test_multiple_positive_long_email_domain_matches_wildcard() {\n uaaDef.setEmailDomain(null);\n samlDef1.setEmailDomain(EMPTY_LIST);\n samlDef2.setEmailDomain(Collections.singletonList(\"*.*.*.com\"));\n ldapDef.setEmailDomain(Collections.singletonList(\"*....
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(DomainFilter.class)", "modifier": "private static", "original_string": "private static Logger logger = LoggerFactory.getLogger(DomainFilter.class);", "type": "Logger", "var_name": "logger" } ], "file": "server/sr...
{ "body": "public static List<IdentityProvider> filter(List<IdentityProvider> activeProviders, ClientDetails client, String email) {\n return filter(activeProviders, client, email, true);\n }", "class_method_signature": "DomainFilter.filter(List<IdentityProvider> activeProviders, ClientDetails client, Str...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_211
{ "fields": [], "file": "server/src/test/java/org/cloudfoundry/identity/uaa/provider/ldap/ProcessLdapPropertiesTest.java", "identifier": "ProcessLdapPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testProcess() throws Exception {\n Map<String,String> properties = new HashMap<>();\n ProcessLdapProperties process = new ProcessLdapProperties(\"ldap://localhost:389\", false, LDAP_TLS_NONE);\n assertNull(process.process(properties).get(LDAP_SOCKET_FACTORY));\n ...
{ "fields": [ { "declarator": "LDAP_SOCKET_FACTORY = \"java.naming.ldap.factory.socket\"", "modifier": "public static final", "original_string": "public static final String LDAP_SOCKET_FACTORY = \"java.naming.ldap.factory.socket\";", "type": "String", "var_name": "LDAP_SOCKET_FACTORY...
{ "body": "public Map process(Map map) {\n Map result = new LinkedHashMap(map);\n if (isDisableSslVerification()) {\n result.put(LDAP_SSL_SOCKET_FACTORY, SKIP_SSL_VERIFICATION_SOCKET_FACTORY);\n } else {\n result.put(LDAP_SSL_SOCKET_FACTORY, EXPIRY_CHECKING_SOCKET_FACTORY);\...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_354
{ "fields": [ { "declarator": "filter", "modifier": "", "original_string": "DisableIdTokenResponseTypeFilter filter;", "type": "DisableIdTokenResponseTypeFilter", "var_name": "filter" }, { "declarator": "disabledFilter", "modifier": "", "original_string": "D...
{ "body": "@Test\n public void testDoFilterInternal_Code_Response_Type_Parameter() throws Exception {\n String responseType = \"code\";\n request.addParameter(RESPONSE_TYPE, responseType);\n filter.doFilterInternal(request, response, chain);\n verify(chain).doFilter(captor.capture(), an...
{ "fields": [ { "declarator": "ID_TOKEN = \"id_token\"", "modifier": "public static final", "original_string": "public static final String ID_TOKEN = \"id_token\";", "type": "String", "var_name": "ID_TOKEN" }, { "declarator": "logger = LoggerFactory.getLogger(DisableIdT...
{ "body": "@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {\n logger.debug(\"Processing id_token disable filter\");\n\n HttpServletRequest requestWrapper = request;\n logger.deb...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_138
{ "fields": [ { "declarator": "instance", "modifier": "private", "original_string": "private PasswordGrantAuthenticationManager instance;", "type": "PasswordGrantAuthenticationManager", "var_name": "instance" }, { "declarator": "zoneAwareAuthzAuthenticationManager", ...
{ "body": "@Test\n void testOIDCPasswordGrant_NoLoginHintDefaultNotAllowedSingleIdpDoesNotSupportPassword() {\n IdentityZoneHolder.get().getConfig().setDefaultIdentityProvider(\"uaa\");\n Authentication auth = mock(Authentication.class);\n when(auth.getPrincipal()).thenReturn(\"marissa\");\n ...
{ "fields": [ { "declarator": "zoneAwareAuthzAuthenticationManager", "modifier": "private", "original_string": "private DynamicZoneAwareAuthenticationManager zoneAwareAuthzAuthenticationManager;", "type": "DynamicZoneAwareAuthenticationManager", "var_name": "zoneAwareAuthzAuthenticat...
{ "body": "@Override\n public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n UaaLoginHint uaaLoginHint = zoneAwareAuthzAuthenticationManager.extractLoginHint(authentication);\n List<String> allowedProviders = getAllowedProviders();\n String defaul...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_246
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private JdbcSamlServiceProviderProvisioning db;", "type": "JdbcSamlServiceProviderProvisioning", "var_name": "db" }, { "declarator": "jdbcTemplate", "modifier": "@Autowired\n private...
{ "body": "@Test\n void deleteSamlServiceProvidersInOtherZone(RandomStringGetter zoneId) {\n IdentityZone zone = MultitenancyFixture.identityZone(zoneId.get(), zoneId.get());\n\n SamlServiceProvider sp = createSamlServiceProvider(zoneId.get());\n SamlServiceProvider createdSp = db.create(sp, s...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(JdbcIdentityProviderProvisioning.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JdbcIdentityProviderProvisioning.class);", "type": "Logger", ...
{ "body": "@Override\n public SamlServiceProvider create(final SamlServiceProvider serviceProvider, final String zoneId) {\n validate(serviceProvider);\n final String id = UUID.randomUUID().toString();\n try {\n jdbcTemplate.update(CREATE_SERVICE_PROVIDER_SQL, ps -> {\n ...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_11
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" } ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void emptyKeyId() {\n TokenPolicy tokenPolicy = new TokenPolicy();\n tokenPolicy.setKeys(Collections.singletonMap(\" \", \"signing-key\"));\n }", "class_method_signature": "TokenPolicyTest.emptyKeyId()", "constructor": false,...
{ "fields": [ { "declarator": "outputCollector = Collectors.toMap(Map.Entry::getKey, e -> {\n KeyInformation keyInformation = new KeyInformation();\n keyInformation.setSigningKey(e.getValue());\n return keyInformation;\n })", "modifier": "private static final", "original_...
{ "body": "@JsonIgnore\n public void setKeys(Map<String, String> keys) {\n if (keys != null) {\n keys.forEach((key, value) -> {\n if (!StringUtils.hasText(value) || !StringUtils.hasText(key)) {\n throw new IllegalArgumentException(\"KeyId and Signing key should n...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_303
{ "fields": [ { "declarator": "secure", "modifier": "private final", "original_string": "private final boolean secure;", "type": "boolean", "var_name": "secure" }, { "declarator": "successHandler", "modifier": "private", "original_string": "private AccountSa...
{ "body": "@SuppressWarnings(\"deprecation\")\n @Test\n public void whenSuccessfullyAuthenticated_accountGetsSavedViaCookie() throws IOException, ServletException, CurrentUserCookieFactory.CurrentUserCookieEncodingException {\n IdentityZoneHolder.get().getConfig().setAccountChooserEnabled(true);\n ...
{ "fields": [ { "declarator": "redirectingHandler", "modifier": "private", "original_string": "private SavedRequestAwareAuthenticationSuccessHandler redirectingHandler;", "type": "SavedRequestAwareAuthenticationSuccessHandler", "var_name": "redirectingHandler" }, { "dec...
{ "body": "@Override\n public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {\n setSavedAccountOptionCookie(request, response, authentication);\n redirectingHandler.onAuthenticationSuccess(req...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...
3382195_180
{ "fields": [ { "declarator": "samlResponseLoggerBinding", "modifier": "private", "original_string": "private SamlResponseLoggerBinding samlResponseLoggerBinding;", "type": "SamlResponseLoggerBinding", "var_name": "samlResponseLoggerBinding" }, { "declarator": "original...
{ "body": "@Test\n void doesNotFailWithNullParameter() {\n HttpServletRequest mockHttpServletRequest = mock(HttpServletRequest.class);\n Map<String, String[]> parameters = new HashMap<>();\n parameters.put(null, null);\n parameters.put(\"key1\", null);\n parameters.put(\"key2\", ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SamlResponseLoggerBinding.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SamlResponseLoggerBinding.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public boolean supports(InTransport transport) {\n if (!(transport instanceof HttpServletRequestAdapter)) {\n return false;\n }\n\n HttpServletRequest httpServletRequest = ((HttpServletRequestAdapter) transport).getWrappedRequest();\n LOGGER.warn(\"Malf...
{ "created": "2/7/2012 10:40:55 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 3382195, "size": null, "stargazer_count": null, "stars": 1091, "updates": "2020-01-27T19:04:55+00:00", "url": "https://github.com/cloudfoundry/uaa...