id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
54671444_1
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/avro/AvroUtilTest.java", "identifier": "AvroUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void defaultFor() {\n\t \n\t Field field = Person.SCHEMA$.getField(\"bellybuttons\");\n\t assertEquals(\"1\", AvroUtil.defaultFor( field ));\n\t \n\t field = Person.SCHEMA$.getField(\"latitude\");\n\t assertEquals(null, AvroUtil.defaultFor( field ));\n }", "class_method_signature":...
{ "fields": [], "file": "core/src/main/java/com/pipeclamp/avro/AvroUtil.java", "identifier": "AvroUtil", "interfaces": "", "methods": [ { "class_method_signature": "AvroUtil.AvroUtil()", "constructor": true, "full_signature": "private AvroUtil()", "identifier": "AvroUtil", "...
{ "body": "public static String defaultFor(Field field) {\n\n\t\tJsonNode dflt = field.defaultValue();\n\t\tif (dflt == null || dflt instanceof NullNode) return null;\n\n\t\treturn dflt.asText();\n\t}", "class_method_signature": "AvroUtil.defaultFor(Field field)", "constructor": false, "full_signature": "public...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_30
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/path/JsonPathTest.java", "identifier": "JsonPathTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void valueVia() {\n\t \n\t Person person = PeopleBuilder.newPerson(\"brian\", \"remedios\", 123, new Date(), \"a\", \"br\");\n\n\t String json = person.toString();\n\t ReadContext context = com.jayway.jsonpath.JsonPath.parse(json);\n\t \n\t Path<ReadContext, Country> path = new JsonPa...
{ "fields": [ { "declarator": "path", "modifier": "private final", "original_string": "private final String path;", "type": "String", "var_name": "path" }, { "declarator": "hasLoop", "modifier": "private final", "original_string": "private final boolean hasL...
{ "body": "@Override\n\tpublic V valueVia(ReadContext context) {\n\t\treturn context.read(path);\n\t}", "class_method_signature": "JsonPath.valueVia(ReadContext context)", "constructor": false, "full_signature": "@Override public V valueVia(ReadContext context)", "identifier": "valueVia", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_25
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/params/IntegerRangeParameterTest.java", "identifier": "IntegerRangeParameterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void IntegerRangeParameter() {\n\t \n\t IntegerRangeParameter ipr = new IntegerRangeParameter(\"a\", \"Aye\", \" \");\n\t assertEquals(\"a\", ipr.id());\n\t assertEquals(\"Aye\", ipr.description());\n }", "class_method_signature": "IntegerRangeParameterTest.IntegerRangeParameter()", ...
{ "fields": [ { "declarator": "regexSplitter", "modifier": "private final", "original_string": "private final String regexSplitter;", "type": "String", "var_name": "regexSplitter" } ], "file": "core/src/main/java/com/pipeclamp/params/IntegerRangeParameter.java", "identifier...
{ "body": "public IntegerRangeParameter(String theId, String theDescription, String theRegexSplitter) {\n\t\tsuper(theId, theDescription);\n\n\t\tregexSplitter = theRegexSplitter;\n\t}", "class_method_signature": "IntegerRangeParameter.IntegerRangeParameter(String theId, String theDescription, String theRegexSplitt...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_2
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/avro/AvroUtilTest.java", "identifier": "AvroUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void denotesPrimitiveValue() {\n \n\t Field field = Person.SCHEMA$.getField(\"bellybuttons\");\n\t assertTrue( AvroUtil.denotesPrimitiveValue( field.schema() ));\n\t \n\t assertFalse( AvroUtil.denotesPrimitiveValue(Person.SCHEMA$));\n }", "class_method_signature": "AvroUtilTest.de...
{ "fields": [], "file": "core/src/main/java/com/pipeclamp/avro/AvroUtil.java", "identifier": "AvroUtil", "interfaces": "", "methods": [ { "class_method_signature": "AvroUtil.AvroUtil()", "constructor": true, "full_signature": "private AvroUtil()", "identifier": "AvroUtil", "...
{ "body": "public static boolean denotesPrimitiveValue(Schema schema) {\n\t\tswitch (schema.getType()) {\n\t\tcase INT :\n\t\tcase BOOLEAN :\n\t\tcase ENUM :\n\t\tcase BYTES :\n\t\tcase LONG :\n\t\tcase FIXED :\n\t\tcase FLOAT:\n\t\tcase DOUBLE :\n\t\tcase STRING : return true;\n\t\tdefault : return false;\n\t\t}\n\t...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_33
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/collections/MapKeyConstraintTest.java", "identifier": "MapKeyConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void testMapKeyConstraintBuilder() {\n\n\t\tMap<String,String> paramsByKey = asParams(\n\t\t\t\tMapKeyConstraint.KEY_TYPE, \"string\",\n\t\t\t\tAbstractMapConstraint.CONSTRAINT_ID, StringLengthConstraint.TypeTag, \n\t\t\t\tStringLengthConstraint.MIN_LENGTH, 3);\n\n\t\tCollection<Constraint<...
{ "fields": [ { "declarator": "TypeTag = \"mapKeys\"", "modifier": "public static final", "original_string": "public static final String TypeTag = \"mapKeys\";", "type": "String", "var_name": "TypeTag" }, { "declarator": "Docs = \"Applies a specified constraint against ...
{ "body": "public static ConstraintBuilder<Object[]> builderWith(final ConstraintFactory<?> cstFactory) {\n\n\t\treturn new BasicConstraintBuilder<Object[]>(TypeTag, MapKeyConstraint.class, Docs, KEY_TYPE, CONSTRAINT_ID) {\n\t\n\t\t\tpublic Collection<Constraint<?>> constraintsFrom(Type type, boolean nullsAllowed, M...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_48
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/NotNullConstraintTest.java", "identifier": "NotNullConstraintTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void typedErrorFor() {\n\n\t\tCollection<Constraint<?>> vcs = NotNullConstraint.Builder.constraintsFrom(Schema.Type.RECORD, false, Collections.<String,String>emptyMap());\n\n\t\tassertFalse(vcs.isEmpty());\n\n\t\tValueConstraint<?> constraint = (ValueConstraint<?>)vcs.iterator().next();\n\n...
{ "fields": [ { "declarator": "TypeTag = \"notNull\"", "modifier": "private static final", "original_string": "private static final String TypeTag = \"notNull\";", "type": "String", "var_name": "TypeTag" }, { "declarator": "Docs = \"Catches fields that have no values\""...
{ "body": "@Override\n\tpublic Violation typedErrorFor(Object value) {\n\t\t\n\t\treturn value == null ? new Violation(this, \"value is null\") : null;\n\t}", "class_method_signature": "NotNullConstraint.typedErrorFor(Object value)", "constructor": false, "full_signature": "@Override public Violation typedError...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_29
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/predicates/NumbersTest.java", "identifier": "NumbersTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void inRange() {\n \n\t Predicate<Number> range = Numbers.inRange(1, 5);\n\t \n\t assertTrue(range.apply(1));\n\t assertTrue(range.apply(3));\n\t assertTrue(range.apply(5));\n\t \n\t assertFalse(range.apply(null));\n\t assertFalse(range.apply(0));\n\t assertFalse(range.apply(15)...
{ "fields": [ { "declarator": "IsZero = new Predicate<Number>() {\n\t\tpublic boolean apply(Number number) {\n\t\t\treturn number != null && \"0\".equals(number.toString());\n\t\t\t}\n\t}", "modifier": "public static final", "original_string": "public static final Predicate<Number> IsZero = new ...
{ "body": "public static Predicate<Number> inRange(final long min, final long max) {\n\n\t\treturn new Predicate<Number>() {\n\t\t\tpublic boolean apply(Number number) {\n\t\t\t\treturn number != null &&\n\t\t\t\t\tnumber.longValue() >= min &&\n\t\t\t\t\tnumber.longValue() <= max;\n\t\t\t\t}\n\t\t};\n\t}", "class_m...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_13
{ "fields": [ { "declarator": "mf = MetricFactory.Instance", "modifier": "private static final", "original_string": "private static final MetricFactory mf = MetricFactory.Instance;", "type": "MetricFactory", "var_name": "mf" } ], "file": "core/src/test/java/com/pipeclamp/metr...
{ "body": "@Test\n public void showOnTest() {\n\n\t File outFile = new File(\"showOnTest.txt\");\n\n\t try {\n\t\t PrintStream out = new PrintStream(outFile);\n\t\t mf.showOn(out);\n\t\t out.close();\n\n\t\t String contents = new String(Files.readAllBytes(Paths.get(\"showOnTest.txt\")));\n\n\t\t assertTrue(co...
{ "fields": [ { "declarator": "buildersByFunction = new HashMap<>()", "modifier": "private final", "original_string": "private final Map<String, Map<Class<?>, Function<?,?>>> buildersByFunction = new HashMap<>();", "type": "Map<String, Map<Class<?>, Function<?,?>>>", "var_name": "bui...
{ "body": "public void showOn(PrintStream out) {\n\n\t\tint paramIdWidth = 12;\n\n\t\tfor (Entry<String, Map<Class<?>, Function<?,?>>> entry : buildersByFunction.entrySet()) {\n\t\t\tout.println(entry.getKey());\n\t\t\tfor (Function<?,?> function : entry.getValue().values()) {\n\t\t\t\tout.println(\"\\t\" + function....
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_44
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/string/StringLengthConstraintTest.java", "identifier": "StringLengthConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void typedErrorFor() {\n\n\t\tStringLengthConstraint slc = new StringLengthConstraint(\"\", true, 5, 10);\n\n\t\tViolation v = slc.errorFor(null);\t// nulls ok\n\t\tassertNull(v);\n\n\t\tv = slc.errorFor(\"billy\");\n\t\tassertNull(v);\n\n\t\tv = slc.errorFor(\"bill\");\n\t\tassertNotNull(v...
{ "fields": [ { "declarator": "minLength", "modifier": "private final", "original_string": "private final Integer minLength;", "type": "Integer", "var_name": "minLength" }, { "declarator": "maxLength", "modifier": "private final", "original_string": "private...
{ "body": "@Override\n\tpublic Violation typedErrorFor(String value) {\n\n\t\tint length = value == null ? 0 : value.length();\n\n\t\tif (minLength != null && minLength > length) {\n\t\t\treturn new Violation(this, '\\'' + value + \"' is too short, must be at least \" + minLength + \" chars\");\n\t\t}\n\t\tif (maxLen...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_45
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/timestamp/TimestampRangeConstraintTest.java", "identifier": "TimestampRangeConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void parameters() {\n\n\t\tMap<String,String> paramsByKey = asParams(\n\t\t\t\tTimestampRangeConstraint.MIN_TIMESTAMP, \"2016-02-01 00:00:00\",\n\t\t\t\tTimestampRangeConstraint.MAX_TIMESTAMP, \"2016-03-01 00:00:00\");\n\n\t\tCollection<Constraint<?>> vcs = TimestampRangeConstraint.Builder....
{ "fields": [ { "declarator": "minTimestamp", "modifier": "private final", "original_string": "private final Long minTimestamp;", "type": "Long", "var_name": "minTimestamp" }, { "declarator": "maxTimestamp", "modifier": "private final", "original_string": "p...
{ "body": "@Override\n\tpublic Map<Parameter<?>, Object> parameters() {\n\n\t\tMap<Parameter<?>, Object> params = new HashMap<>(2);\n\t\tif (minTimestamp != null) params.put(MIN_TIMESTAMP, minTimestamp);\n\t\tif (maxTimestamp != null) params.put(MAX_TIMESTAMP, maxTimestamp);\n\t\treturn params;\n\t}", "class_method...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_12
{ "fields": [ { "declarator": "mf = MetricFactory.Instance", "modifier": "private static final", "original_string": "private static final MetricFactory mf = MetricFactory.Instance;", "type": "MetricFactory", "var_name": "mf" } ], "file": "core/src/test/java/com/pipeclamp/metr...
{ "body": "@Test\n public void functionFor() {\n \n\t assertEquals(Summer.IntegerSum, mf.functionFor(Summer.Id, Integer.class));\n\t assertEquals(Summer.LongSum, mf.functionFor(Summer.Id, Long.class));\n\t assertEquals(Summer.FloatSum, mf.functionFor(Summer.Id, Float.class));\n\t assertEquals(Summer.DoubleSum...
{ "fields": [ { "declarator": "buildersByFunction = new HashMap<>()", "modifier": "private final", "original_string": "private final Map<String, Map<Class<?>, Function<?,?>>> buildersByFunction = new HashMap<>();", "type": "Map<String, Map<Class<?>, Function<?,?>>>", "var_name": "bui...
{ "body": "public Function<?,?> functionFor(String functionId, Class<?> javaType) {\n\n\t\tMap<Class<?>, Function<?,?>> builders = buildersByFunction.get(functionId);\n\t\tif (builders == null) return null;\n\n\t\treturn builders.get(javaType);\n\t}", "class_method_signature": "MetricFactory.functionFor(String fun...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_28
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/params/NumberParameterTest.java", "identifier": "NumberParameterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void valueIn() {\n NumberParameter np = new NumberParameter(\"n\", \"en\");\n \n Number result = np.valueIn(\"five\", Type.INT);\n assertNull(result);\n \n result = np.valueIn(\"5\", Type.INT);\n assertEquals(Integer.class, result.getClass());\n assertEquals(5, resul...
{ "fields": [], "file": "core/src/main/java/com/pipeclamp/params/NumberParameter.java", "identifier": "NumberParameter", "interfaces": "", "methods": [ { "class_method_signature": "NumberParameter.NumberParameter(String theId, String theDescription)", "constructor": true, "full_signature...
{ "body": "@Override\n\tpublic Number valueIn(String text, Type type) {\n\n\t\ttry {\n\t\t\tswitch (type) {\n\t\t\t\tcase INT : return Integer.parseInt(text);\n\t\t\t\tcase LONG : return Long.parseLong(text);\n\t\t\t\tcase FLOAT : return Float.parseFloat(text);\n\t\t\t\tcase DOUBLE : return Double.parseDouble(text);\...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_49
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/multivalue/ComparativeConstraintTest.java", "identifier": "ComparativeConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void builderFor() {\n\n\t\tConstraintBuilder<?> builder = ComparativeConstraint.builderFor(\" \", SimpleAvroPath.Builder);\n\t\tassertNotNull(builder);\n\t\n\t\tMap<String,String> paramsByKey = asParams(\n\t\t\t\tComparativeConstraint.Path1, \"birthdate\", \n\t\t\t\tComparativeConstraint.Pa...
{ "fields": [ { "declarator": "op1Path", "modifier": "private final", "original_string": "private final Path<T,?> op1Path;", "type": "Path<T,?>", "var_name": "op1Path" }, { "declarator": "op2Path", "modifier": "private final", "original_string": "private fin...
{ "body": "public static ConstraintBuilder<Object[]> builderFor(final String regexDelimiter, final PathBuilder builder) {\n\t\t\n\t\treturn new BasicConstraintBuilder<Object[]>(\"theid\", ComparativeConstraint.class, \"\", Path1, Path2, CompParam) {\n\n\t\t\t@Override\n\t\t\tpublic Collection<Constraint<?>> constrain...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_32
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/collections/CollectionSizeConstraintTest.java", "identifier": "CollectionSizeConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void typedErrorFor() {\n\n\t\tMap<String,String> paramsByKey = asParams(\n\t\t\t\tCollectionSizeConstraint.MIN_ITEMS, 3, \n\t\t\t\tCollectionSizeConstraint.MAX_ITEMS, 5,\n\t\t\t\tStringLengthConstraint.MIN_LENGTH, 43);\n\n\t\tCollection<Constraint<?>> vcs = CollectionSizeConstraint.Builder....
{ "fields": [ { "declarator": "minSize", "modifier": "private final", "original_string": "private final Integer minSize;", "type": "Integer", "var_name": "minSize" }, { "declarator": "maxSize", "modifier": "private final", "original_string": "private final I...
{ "body": "@Override\n\tpublic Violation typedErrorFor(Object[] value) {\n\n\t\tint len = value == null ? 0 : value.length;\n\n\t\tif (minSize != null && minSize > len) return new Violation(this, \"too few items, need at least \" + minSize);\n\t\tif (maxSize != null && maxSize < len) return new Violation(this, \"too ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_24
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/classifiers/BasicClassifierTest.java", "identifier": "BasicClassifierTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void classify() {\n \n\t BasicClassifier<String> bc = new BasicClassifier<>(\"a\", \"b\");\n\t \n\t try {\n\t\t String clasz = bc.classify(\"hello world\");\n\t \t} catch (RuntimeException re) {\n\t \t\tassertTrue(re.getMessage().contains(\"not implemented\"));\n\t \t\t}\n }", "...
{ "fields": [], "file": "core/src/main/java/com/pipeclamp/classifiers/BasicClassifier.java", "identifier": "BasicClassifier", "interfaces": "implements Classifier<I>", "methods": [ { "class_method_signature": "BasicClassifier.BasicClassifier(String theId, String theDescription)", "constructor"...
{ "body": "@Override\n\tpublic String classify(I item) {\n\t\tthrow new RuntimeException(\"Classify method not implemented\");\n\t}", "class_method_signature": "BasicClassifier.classify(I item)", "constructor": false, "full_signature": "@Override public String classify(I item)", "identifier": "classify", "i...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_3
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/avro/AvroUtilTest.java", "identifier": "AvroUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void isNullableSingleTypeField() {\n\t \n\t Field field = Person.SCHEMA$.getField(\"bellybuttons\");\n\t assertFalse( AvroUtil.isNullableSingleType( field ));\n\t \n\t field = Person.SCHEMA$.getField(\"latitude\");\n\t assertTrue( AvroUtil.isNullableSingleType( field ));\n }", "cla...
{ "fields": [], "file": "core/src/main/java/com/pipeclamp/avro/AvroUtil.java", "identifier": "AvroUtil", "interfaces": "", "methods": [ { "class_method_signature": "AvroUtil.AvroUtil()", "constructor": true, "full_signature": "private AvroUtil()", "identifier": "AvroUtil", "...
{ "body": "public static boolean isNullableSingleType(Field field) {\n\t\treturn field.schema().getType() == Type.UNION &&\n\t\t\t\tisNullableSingleType(field.schema().getTypes());\n\t}", "class_method_signature": "AvroUtil.isNullableSingleType(Field field)", "constructor": false, "full_signature": "public stat...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_8
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/avro/AvroConstraintUtilTest.java", "identifier": "AvroConstraintUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void constraintsIn2() {\n\n\t\tbyte[] schemaBytes = AbstractConstraintTest.readResource(\"GoodBadMix.avsc\");\n\t\tSchema sc = AvroUtil.parseSchema(new String(schemaBytes));\n\n\t\tMap<Path<GenericRecord, ?>, Collection<Constraint<?>>> constraints = AvroConstraintUtil.constraintsIn(sc, true...
{ "fields": [ { "declarator": "TypeKey = \"_type\"", "modifier": "public static final", "original_string": "public static final String TypeKey = \"_type\";", "type": "String", "var_name": "TypeKey" }, { "declarator": "AllowNullKey = \"allowNull\"", "modifier": "pu...
{ "body": "public static Map<Path<GenericRecord,?>, Collection<Constraint<?>>> constraintsIn(Schema schema, boolean flagUnknowns, ConstraintFactory<Schema.Type> factory) {\n\n\t\treturn constraintParamsIn(schema, factory);\n\t}", "class_method_signature": "AvroConstraintUtil.constraintsIn(Schema schema, boolean fla...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_39
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/bytes/SimplePrefixMatcherTest.java", "identifier": "SimplePrefixMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void matches() {\n\n\t\tSimplePrefixMatcher spm = new SimplePrefixMatcher(\"dummy\", new byte[] { 0, 1, 2} );\n\n\t\tassertTrue(spm.matches(new byte[] { 0, 1, 2} ));\n\t\tassertTrue(spm.matches(new byte[] { 0, 1, 2, 3, 4} ));\n\n\t\tassertFalse(spm.matches(null));\n\t\tassertFalse(spm.match...
{ "fields": [ { "declarator": "offset", "modifier": "private final", "original_string": "private final int offset;", "type": "int", "var_name": "offset" }, { "declarator": "prefixes", "modifier": "private final", "original_string": "private final byte[][] pr...
{ "body": "@Override\n\tpublic boolean matches(byte[] data) {\n\n\t\tfor (byte[] prefix : prefixes) {\n\t\t\tif (ByteUtil.matches(data, prefix, offset)) return true;\n\t\t}\n\t\treturn false;\n\t}", "class_method_signature": "SimplePrefixMatcher.matches(byte[] data)", "constructor": false, "full_signature": "@O...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_15
{ "fields": [ { "declarator": "Tests = new String[][] {\n\t\t{ \"0\", \"0\", \"0\", \"0\", \"0\" },\n\t\t{ \"2\", \"2\", \"4\", \"4\", \"4\", \"5\", \"5\", \"7\", \"9\" },\n\t\t}", "modifier": "private static final", "original_string": "private static final String[][] Tests = new String[][...
{ "body": "@Test\n\tpublic void computeInts() {\n\n\t\tfor (String[] test : Tests) {\n\t\t\tInteger expectedResult = Integer.parseInt(test[0]);\n\t\t\tList<Integer> nums = intsOf(test);\n\n\t\t\tCollector<Integer> collector = asFinalCollector(nums);\n\n\t\t\tInteger result = StdDeviation.IntDev.compute(collector);\n\...
{ "fields": [ { "declarator": "summer", "modifier": "private final", "original_string": "private final Summer<I> summer;", "type": "Summer<I>", "var_name": "summer" }, { "declarator": "multiplier", "modifier": "private final", "original_string": "private fin...
{ "body": "@Override\n\tpublic I compute(Collector<I> collector) {\n\n\t\tI avg = averager.compute(collector);\n\n\t\tList<I> deviations = new ArrayList<I>(collector.collected());\n\t\tfor (I value : collector.all()) {\n\t\t\tdeviations.add( summer.subtract(avg, value));\n\t\t}\n\t\tList<I> squares = new ArrayList<I>...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_42
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/string/IllegalCharacterConstraintTest.java", "identifier": "IllegalCharacterConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void typedErrorFor() {\n\n\t\tMap<String,String> paramsByKey = asParams(IllegalCharacterConstraint.BAD_CHARS, \"./?\");\n\n\t\tCollection<Constraint<?>> vcs = IllegalCharacterConstraint.Builder.constraintsFrom(Schema.Type.STRING, false, paramsByKey);\n\t\tValueConstraint<?> vc = (ValueConst...
{ "fields": [ { "declarator": "blacklist[]", "modifier": "private final", "original_string": "private final boolean blacklist[];", "type": "boolean", "var_name": "blacklist" }, { "declarator": "TypeTag = \"illegalChars\"", "modifier": "public static final", ...
{ "body": "@Override\n\tpublic Violation typedErrorFor(String value) {\n\t\t\n\t\tint len = value.length();\n\t\tif (len == 0) return null;\n\t\t\n\t\tfor (int i=0; i<len; i++) {\n\t\t\tchar ch = value.charAt(i);\n\t\t\tif (isIllegal(ch)) {\n\t\t\t\treturn new Violation(this, \"Illegal character: \" + ch);\n\t\t\t}\n...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_23
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/util/ByteUtilTest.java", "identifier": "ByteUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void matchesStart() {\n \n\t byte[] prefix\t\t= new byte[] { 1, 2, 3 };\n\t byte[] candidate1\t= new byte[] { 1, 2, 3, 4, 5};\n\t byte[] candidate2\t= new byte[] { 2, 3, 4, 5};\n\t byte[] candidate3\t= new byte[] { 1, 2};\n\t byte[] candidate4\t= new byte[] { };\n\t byte[] candi...
{ "fields": [], "file": "core/src/main/java/com/pipeclamp/util/ByteUtil.java", "identifier": "ByteUtil", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtil.ByteUtil()", "constructor": true, "full_signature": "private ByteUtil()", "identifier": "ByteUtil", "...
{ "body": "public static boolean matchesStart(byte[] source, byte[] prefix) {\n\n\t\tif (source == null) return false;\n\n\t\tif (source.length < prefix.length) return false;\n\n\t\tfor (int i=0; i<prefix.length; i++) {\n\t\t\tif (prefix[i] != source[i]) return false;\n\t\t}\n\t\treturn true;\n\t}", "class_method_s...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_4
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/avro/AvroUtilTest.java", "identifier": "AvroUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void isRecordType() {\n\t \n\t assertTrue( AvroUtil.isRecordType( Person.SCHEMA$ ));\n\t assertFalse( AvroUtil.isRecordType( Person.SCHEMA$.getField(\"latitude\").schema() ));\n }", "class_method_signature": "AvroUtilTest.isRecordType()", "constructor": false, "full_signature": "@...
{ "fields": [], "file": "core/src/main/java/com/pipeclamp/avro/AvroUtil.java", "identifier": "AvroUtil", "interfaces": "", "methods": [ { "class_method_signature": "AvroUtil.AvroUtil()", "constructor": true, "full_signature": "private AvroUtil()", "identifier": "AvroUtil", "...
{ "body": "public static boolean isRecordType(Schema schema) {\n\t\treturn schema != null && schema.getType() == Type.RECORD;\n\t}", "class_method_signature": "AvroUtil.isRecordType(Schema schema)", "constructor": false, "full_signature": "public static boolean isRecordType(Schema schema)", "identifier": "isR...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_35
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/collections/MapValueConstraintTest.java", "identifier": "MapValueConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void testMapValueConstraintBuilder() {\n\n\t\tMap<String,String> paramsByKey = asParams(\n\t\t\t\tMapValueConstraint.VALUE_TYPE, \"string\",\n\t\t\t\tAbstractMapConstraint.CONSTRAINT_ID, StringLengthConstraint.TypeTag, \n\t\t\t\tStringLengthConstraint.MIN_LENGTH, 3);\n\n\t\tCollection<Const...
{ "fields": [ { "declarator": "TypeTag = \"mapValues\"", "modifier": "public static final", "original_string": "public static final String TypeTag = \"mapValues\";", "type": "String", "var_name": "TypeTag" }, { "declarator": "Docs = \"Applies a specified constraint agai...
{ "body": "public static ConstraintBuilder<Object[]> builderWith(final ConstraintFactory<?> cstFactory) {\n\t\t\n\t\treturn new BasicConstraintBuilder<Object[]>(TypeTag, MapValueConstraint.class, Docs, VALUE_TYPE, CONSTRAINT_ID) {\n\t\n\t\t\tpublic Collection<Constraint<?>> constraintsFrom(Type type, boolean nullsAl...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_19
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/metrics/MetricDescriptorTest.java", "identifier": "MetricDescriptorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void MetricDescriptor() {\n \n\t MetricDescriptor md = new MetricDescriptor(\"beatFrequency\", \"Beat frequency\", null, \"Hz\", \"The interference resulting from the union of two signals\");\n\t \n\t assertEquals(md.id(), \"beatFrequency\");\n\t assertEquals(md.label, \"Beat frequen...
{ "fields": [ { "declarator": "label", "modifier": "public final", "original_string": "public final String label;", "type": "String", "var_name": "label" }, { "declarator": "function", "modifier": "public final", "original_string": "public final Function<? e...
{ "body": "public MetricDescriptor(String theId, String theLabel, Function<? extends Object, ? extends Object> theFunction, String aUnitLabel, String theDescription) {\n\t\tsuper(theId, theDescription);\n\t\tlabel = theLabel;\n\t\tfunction = theFunction;\n\t\tunitLabel = aUnitLabel;\n\t}", "class_method_signature":...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_18
{ "fields": [ { "declarator": "Tests = new String[][] {\n\t\t{ \"0\", \"0\", \"0\", \"0\", \"0\" },\n\t\t{ \"5\", \"0\", \"10\" },\n\t\t{ \"0\", \"-3\", \"3\" },\n\t\t{ \"2\", \"1\", \"3\" },\n\t\t}", "modifier": "private static final", "original_string": "private static final String[][]...
{ "body": "@Test\n\tpublic void computeFloats() {\n\n\t\tfor (String[] test : Tests) {\n\t\t\tFloat expectedResult = Float.parseFloat(test[0]);\n\t\t\tList<Float> nums = floatsOf(test);\n\n\t\t\tCollector<Float> collector = asFinalCollector(nums);\n\t\t\t\n\t\t\tFloat result = Averager.FloatAvg.compute(collector);\n\...
{ "fields": [ { "declarator": "summer", "modifier": "private final", "original_string": "private final Summer<I> summer;", "type": "Summer<I>", "var_name": "summer" }, { "declarator": "multiplier", "modifier": "private final", "original_string": "private fin...
{ "body": "@Override\n\tpublic I compute(Collector<I> collector) {\n\n\t\tI sum = summer.compute(collector);\n\n\t\treturn multiplier.divide(sum, collector.collected());\n\t}", "class_method_signature": "Averager.compute(Collector<I> collector)", "constructor": false, "full_signature": "@Override public I compu...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_34
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/collections/MapKeyConstraintTest.java", "identifier": "MapKeyConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void typedErrorFor() {\n\t\t\n\t\t// Constraint: country names, used as keys in the passport map, cannot be longer than three characters\n\n\t\tMap<String,String> paramsByKey = asParams(\n\t\t\t\tMapKeyConstraint.KEY_TYPE, \"string\",\n\t\t\t\tAbstractMapConstraint.CONSTRAINT_ID, StringLeng...
{ "fields": [ { "declarator": "TypeTag = \"mapKeys\"", "modifier": "public static final", "original_string": "public static final String TypeTag = \"mapKeys\";", "type": "String", "var_name": "TypeTag" }, { "declarator": "Docs = \"Applies a specified constraint against ...
{ "body": "public static ConstraintBuilder<Object[]> builderWith(final ConstraintFactory<?> cstFactory) {\n\n\t\treturn new BasicConstraintBuilder<Object[]>(TypeTag, MapKeyConstraint.class, Docs, KEY_TYPE, CONSTRAINT_ID) {\n\t\n\t\t\tpublic Collection<Constraint<?>> constraintsFrom(Type type, boolean nullsAllowed, M...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_22
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/metrics/MetricDescriptorTest.java", "identifier": "MetricDescriptorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void toStringTest() {\n\t MetricDescriptor md = new MetricDescriptor(\"beatFrequency\", \"Beat frequency\", null, \"Hz\", \"The interference resulting from the union of two signals\");\n\t String textForm = md.toString();\n\t \n\t assertEquals(\"beatFrequency\tBeat frequency\tHz\tThe in...
{ "fields": [ { "declarator": "label", "modifier": "public final", "original_string": "public final String label;", "type": "String", "var_name": "label" }, { "declarator": "function", "modifier": "public final", "original_string": "public final Function<? e...
{ "body": "@Override\n\tpublic String toString() {\n\t\treturn id() + \"\\t\" + label + \"\\t\" + unitLabel + \"\\t\" + description();\n\t}", "class_method_signature": "MetricDescriptor.toString()", "constructor": false, "full_signature": "@Override public String toString()", "identifier": "toString", "invo...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_5
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/avro/AvroUtilTest.java", "identifier": "AvroUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void primaryTypeIn() {\n \n\t assertEquals(Type.RECORD, AvroUtil.primaryTypeIn(Person.SCHEMA$));\n\t assertEquals(Type.INT, AvroUtil.primaryTypeIn(Person.SCHEMA$.getField(\"bellybuttons\").schema()));\n }", "class_method_signature": "AvroUtilTest.primaryTypeIn()", "constructor": fa...
{ "fields": [], "file": "core/src/main/java/com/pipeclamp/avro/AvroUtil.java", "identifier": "AvroUtil", "interfaces": "", "methods": [ { "class_method_signature": "AvroUtil.AvroUtil()", "constructor": true, "full_signature": "private AvroUtil()", "identifier": "AvroUtil", "...
{ "body": "public static Type primaryTypeIn(Schema schema) {\n\n\t\tif (schema.getType() == Type.UNION) {\n\t\t\tfor (Schema sch : schema.getTypes()) {\n\t\t\t\tif (sch.getType() == Type.NULL) continue;\n\t\t\t\treturn sch.getType();\t// TODO what about more complex UNIONs ?\n\t\t\t}\n\t\t}\n\t\treturn schema.getType...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_43
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/string/WhitespaceConstraintTest.java", "identifier": "WhitespaceConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void testTypedErrorFor() {\n\t\t\n\t\tMap<String,String> paramsByKey = asParams(WhitespaceConstraint.NO_LEADING, true);\n\n\t\tCollection<Constraint<?>> vcs = WhitespaceConstraint.Builder.constraintsFrom(Schema.Type.STRING, false, paramsByKey);\n\t\tassertNotNull(vcs);\n\t\tValueConstraint<...
{ "fields": [ { "declarator": "checkLeading", "modifier": "private final", "original_string": "private final boolean checkLeading;", "type": "boolean", "var_name": "checkLeading" }, { "declarator": "checkTrailing", "modifier": "private final", "original_stri...
{ "body": "@Override\n\tpublic Violation typedErrorFor(String value) {\n\t\t\n\t\tint len = value.length();\n\t\tif (len == 0) return null;\n\t\n\t\tif (checkLeading) {\n\t\t\tchar ch = value.charAt(0);\n\t\t\tif (Character.isWhitespace(ch)) {\n\t\t\t\treturn new Violation(this, \"Illegal starting whitespace: \" + ch...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_14
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/metrics/collectors/RegexCollectorTest.java", "identifier": "RegexCollectorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void add() {\n \n\t RegexCollector collector = new RegexCollector(null);\n\t collector.register(\"emails\", RegexDescriptor.EMailAddress.regex);\n\t \n\t collector.add(\"brian@test.com\");\n\t collector.add(\"not an email.com\");\n\t collector.add(\"brian @test.com\");\n\t \n\t a...
{ "fields": [ { "declarator": "qualifiersByName = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, Pattern> qualifiersByName = new HashMap<>();", "type": "Map<String, Pattern>", "var_name": "qualifiersByName" }, { "declarator": "countsPer...
{ "body": "@Override\n\tpublic boolean add(String item) {\n\t\tif (!super.add(item)) return false;\n\n\t\tString itemKey = keyFor(item);\n\t\tif (itemKey == null) return false;\n\n\t\tInteger count = countsPerItem.get(itemKey);\n\t\tif (count == null) count = 0;\n\t\tcountsPerItem.put(itemKey, count+1);\n\t\treturn t...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_38
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/constraints/bytes/ByteArraySizeConstraintTest.java", "identifier": "ByteArraySizeConstraintTest", "interfaces": "", "superclass": "extends AbstractConstraintTest" }
{ "body": "@Test\n\tpublic void typedErrorFor() {\n\n\t\tMap<String,String> paramsByKey = asParams(ByteArraySizeConstraint.MIN_SIZE, 2, ByteArraySizeConstraint.MAX_SIZE, 4);\n\n\t\tCollection<Constraint<?>> vcs = ByteArraySizeConstraint.Builder.constraintsFrom(Schema.Type.BYTES, false, paramsByKey);\n\n\t\tValueConst...
{ "fields": [ { "declarator": "minSize", "modifier": "private final", "original_string": "private final Integer minSize;", "type": "Integer", "var_name": "minSize" }, { "declarator": "maxSize", "modifier": "private final", "original_string": "private final I...
{ "body": "@Override\n\tpublic Violation typedErrorFor(byte[] values) {\n\n\t\tif (minSize != null && minSize > values.length) return new Violation(this, \" is too small, minimum size is \" + minSize);\n\t\tif (maxSize != null && maxSize < values.length) return new Violation(this, \" is too big, maximum size is \" + ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
54671444_9
{ "fields": [], "file": "core/src/test/java/com/pipeclamp/avro/AvroMetricUtilTest.java", "identifier": "AvroMetricUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void AvroMetricUtil() {\n \n }", "class_method_signature": "AvroMetricUtilTest.AvroMetricUtil()", "constructor": false, "full_signature": "@Test public void AvroMetricUtil()", "identifier": "AvroMetricUtil", "invocations": [], "modifiers": "@Test public", "parameters": "()...
{ "fields": [ { "declarator": "MetricsKey = \"metrics\"", "modifier": "private static final", "original_string": "private static final String MetricsKey = \"metrics\";", "type": "String", "var_name": "MetricsKey" }, { "declarator": "MetricFunctionKey = \"function\"", ...
{ "body": "private AvroMetricUtil() {\n\t\tsuper();\n\t}", "class_method_signature": "AvroMetricUtil.AvroMetricUtil()", "constructor": true, "full_signature": "private AvroMetricUtil()", "identifier": "AvroMetricUtil", "invocations": [], "modifiers": "private", "parameters": "()", "return": "", "si...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 54671444, "size": 614, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/Comcast/pipeclamp" }
86808110_48
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/testcases.commands/GetAttributesCommandWithInheritanceTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBu...
{ "body": "@Test\n public void shouldExecuteSuccessfullyGetterAnnotatedClass() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n\n ...
{ "fields": [ { "declarator": "INSTANCE = new GetAttributesCommandWithInheritance()", "modifier": "public final static", "original_string": "public final static GetAttributesCommandWithInheritance INSTANCE = new GetAttributesCommandWithInheritance();", "type": "GetAttributesCommandWithInhe...
{ "body": "@Override\n public AttributeResult[] execute(TypeElement element) {\n\n return BeanUtils.getAttributesWithInheritance(element);\n }", "class_method_signature": "GetAttributesCommandWithInheritance.execute(TypeElement element)", "constructor": false, "full_signature": "@Override public At...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_279
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationValueUtilsTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuil...
{ "body": "@Test\n public void annotationValueUtils_test_getFloatValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtils...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationValueUtils.java", "identifier": "AnnotationValueUtils", "interfaces": "", "methods": [ { "class_method_signature": "AnnotationValueUtils.AnnotationValueUtils()", "constructor": ...
{ "body": "public static Float getFloatValue(AnnotationValue annotationValue) {\n return !isFloat(annotationValue) ? null : (Float) annotationValue.getValue();\n }", "class_method_signature": "AnnotationValueUtils.getFloatValue(AnnotationValue annotationValue)", "constructor": false, "full_signature":...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_296
{ "fields": [], "file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/UtilitiesTest.java", "identifier": "UtilitiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void convertVarargsToArray_singleNullValue_shouldReturnEmptyArrayg() {\n\n MatcherAssert.assertThat(Arrays.asList(Utilities.convertVarargsToArray(null)), Matchers.empty());\n\n }", "class_method_signature": "UtilitiesTest.convertVarargsToArray_singleNullValue_shouldReturnEmpty...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/Utilities.java", "identifier": "Utilities", "interfaces": "", "methods": [ { "class_method_signature": "Utilities.Utilities()", "constructor": true, "full_signature": "private Util...
{ "body": "@SafeVarargs\n public static <T> T[] convertVarargsToArray(T... varargs) {\n final Object[] e = {};\n\n if (varargs == null) {\n return (T[]) e;\n }\n return varargs;\n\n }", "class_method_signature": "Utilities.convertVarargsToArray(T... varargs)", "constru...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_150
{ "fields": [ { "declarator": "unit = new ByElementKindMatcher()", "modifier": "private", "original_string": "private ByElementKindMatcher unit = new ByElementKindMatcher();", "type": "ByElementKindMatcher", "var_name": "unit" } ], "file": "annotationprocessor/src/test/java/i...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_nullValuedElementKind() {\n Element element = Mockito.mock(Element.class);\n MatcherAssert.assertThat(\"Should return false in case of null valued annotation\", !unit.checkForMatchingCharacteristic(element, null));\n\n }", "class...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByElementKindMatcher.java", "identifier": "ByElementKindMatcher", "interfaces": "implements CriteriaMatcher<Element, ElementKind>", "methods": [ { "class_method_signature": "ByElem...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, ElementKind toCheckFor) {\n return (element != null && toCheckFor != null) && element.getKind().equals(toCheckFor);\n }", "class_method_signature": "ByElementKindMatcher.checkForMatchingCharacteristic(Element element,...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_384
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/IncludeTemplateBlockTest.java", "identifier": "IncludeTemplateBlockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_getContent_successfully_withModelDefinitionInContentBlock() {\n IncludeTemplateBlock unit = new IncludeTemplateBlock(\"resource : '/IncludeTemplateBlockTest.tpl'\",\"model : model.bridge\");\n\n Map<String, Object> model = new HashMap<String, Object>();\n Ma...
{ "fields": [ { "declarator": "ATTRIBUTE_NAME_RESOURCE = \"resource\"", "modifier": "final static", "original_string": "final static String ATTRIBUTE_NAME_RESOURCE = \"resource\";", "type": "String", "var_name": "ATTRIBUTE_NAME_RESOURCE" }, { "declarator": "ATTRIBUTE_NA...
{ "body": "@Override\n public String getContent(Map<String, Object> variables) {\n\n Map<String, Object> model;\n if (this.modelAccessPath != null) {\n Object values = ModelPathResolver.resolveModelPath(variables, this.modelAccessPath).getValue();\n\n model = new HashMap<>();\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_107
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void byReturnTypeMirrorMatcher_match() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // find field\n List<? extends Element> re...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByReturnTypeMatcher.java", "identifier": "ByReturnTypeMatcher", "interfaces": "implements CriteriaMatcher<ExecutableElement, Class>", "methods": [ { "class_method_signature": "ByRe...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, Class toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // check if number of parameters is the same\n return TypeUtils.TypeComparison.isTypeEq...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_238
{ "fields": [ { "declarator": "unit = new ByModifierMatcher()", "modifier": "private", "original_string": "private ByModifierMatcher unit = new ByModifierMatcher();", "type": "ByModifierMatcher", "var_name": "unit" } ], "file": "annotationprocessor/src/test/java/io/toolistico...
{ "body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_passedNullValue() {\n\n MatcherAssert.assertThat(\"Should return null for null valued parameter\", unit.getStringRepresentationOfPassedCharacteristic(null) == null);\n\n }", "class_method_signature": "ByModifierMatcherTes...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByModifierMatcher.java", "identifier": "ByModifierMatcher", "interfaces": "implements CriteriaMatcher<Element, Modifier>", "methods": [ { "class_method_signature": "ByModifierMatch...
{ "body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(Modifier toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.name() : null;\n }", "class_method_signature": "ByModifierMatcher.getStringRepresentationOfPassedChara...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_392
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/TemplateProcessorTest.java", "identifier": "TemplateProcessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTemplateString() {\n\n Map<String, Object> map = new HashMap<String, Object>();\n map.put(\"test\", \"YEP\");\n\n MatcherAssert.assertThat(TemplateProcessor.processTemplate(\"${test}\", map), Matchers.is(\"YEP\"));\n\n\n }", "class_method_signature": "Te...
{ "fields": [], "file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/TemplateProcessor.java", "identifier": "TemplateProcessor", "interfaces": "", "methods": [ { "class_method_signature": "TemplateProcessor.processTemplate(String templateString, Map<String, Object> ...
{ "body": "public static String processTemplate(String templateString, Map<String, Object> values) {\n\n TemplateBlockBinder binder = ParseUtilities.parseString(templateString);\n return binder.getContent(values);\n\n }", "class_method_signature": "TemplateProcessor.processTemplate(String templateS...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_111
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void getStringRepresentationOfPassedCharacteristic_getStringRepresetation() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assert...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByReturnTypeMatcher.java", "identifier": "ByReturnTypeMatcher", "interfaces": "implements CriteriaMatcher<ExecutableElement, Class>", "methods": [ { "class_method_signature": "ByRe...
{ "body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(Class toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.getCanonicalName() : \"\";\n }", "class_method_signature": "ByReturnTypeMatcher.getStringRepresentationOf...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_280
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationValueUtilsTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuil...
{ "body": "@Test\n public void annotationValueUtils_test_getDoubleValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtil...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationValueUtils.java", "identifier": "AnnotationValueUtils", "interfaces": "", "methods": [ { "class_method_signature": "AnnotationValueUtils.AnnotationValueUtils()", "constructor": ...
{ "body": "public static Double getDoubleValue(AnnotationValue annotationValue) {\n return !isDouble(annotationValue) ? null : (Double) annotationValue.getValue();\n }", "class_method_signature": "AnnotationValueUtils.getDoubleValue(AnnotationValue annotationValue)", "constructor": false, "full_signat...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_146
{ "fields": [ { "declarator": "unit = new ByElementKindMatcher()", "modifier": "private", "original_string": "private ByElementKindMatcher unit = new ByElementKindMatcher();", "type": "ByElementKindMatcher", "var_name": "unit" } ], "file": "annotationprocessor/src/test/java/i...
{ "body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_passedNullValue() {\n\n MatcherAssert.assertThat(\"Should return null for null valued parameter\", unit.getStringRepresentationOfPassedCharacteristic(null) == null);\n\n }", "class_method_signature": "ByElementKindMatcher...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByElementKindMatcher.java", "identifier": "ByElementKindMatcher", "interfaces": "implements CriteriaMatcher<Element, ElementKind>", "methods": [ { "class_method_signature": "ByElem...
{ "body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(ElementKind toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.name() : null;\n }", "class_method_signature": "ByElementKindMatcher.getStringRepresentationOfPasse...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_351
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java", "identifier": "ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void evaluateExpression_withModel_evenMoreComplexMixedExpressionWithStringConcatenation() {\n\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"value1\", 5L);\n model.put(\"value2\", 6L);\n model.put(\"value3\", null);\n model....
{ "fields": [], "file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParser.java", "identifier": "ExpressionParser", "interfaces": "", "methods": [ { "class_method_signature": "ExpressionParser.parseExpression(String expressionString, Map<Strin...
{ "body": "public static Expression parseExpression(String expressionString, Map<String, Object> model) {\n\n ModelPathResolver.modelMapThreadLocal.set(model);\n return parseExpression(expressionString);\n\n }", "class_method_signature": "ExpressionParser.parseExpression(String expressionString, Ma...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_214
{ "fields": [ { "declarator": "NAME = \"NAME\"", "modifier": "private final static", "original_string": "private final static String NAME = \"NAME\";", "type": "String", "var_name": "NAME" }, { "declarator": "unit = new ByNameMatcher()", "modifier": "private", ...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_nullValuedParameters() {\n MatcherAssert.assertThat(\"Should retrun false in case of null valued parameters\", !unit.checkForMatchingCharacteristic(null, null));\n\n }", "class_method_signature": "ByNameMatcherTest.test_checkForMatching...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByNameMatcher.java", "identifier": "ByNameMatcher", "interfaces": "implements CriteriaMatcher<Element, String>", "methods": [ { "class_method_signature": "ByNameMatcher.checkForMat...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n return (element != null && toCheckFor != null) && element.getSimpleName().toString().equals(toCheckFor);\n }", "class_method_signature": "ByNameMatcher.checkForMatchingCharacteristic(Element ele...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_25
{ "fields": [ { "declarator": "list", "modifier": "", "original_string": "List<Element> list;", "type": "List<Element>", "var_name": "list" }, { "declarator": "element1", "modifier": "", "original_string": "Element element1;", "type": "Element", ...
{ "body": "@Test\n public void testImplicitFilter_nullSafety_nullValuedValidator() {\n\n ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>> unit =\n new ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>>(null);\n\n\n List<Element> r...
{ "fields": [ { "declarator": "validator", "modifier": "private final", "original_string": "private final VALIDATOR validator;", "type": "VALIDATOR", "var_name": "validator" } ], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/filter...
{ "body": "public List<ELEMENT> filter(List<ELEMENT> toFilter) {\n return filter(toFilter, false);\n }", "class_method_signature": "ImplicitFilter.filter(List<ELEMENT> toFilter)", "constructor": false, "full_signature": "public List<ELEMENT> filter(List<ELEMENT> toFilter)", "identifier": "filter", ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_306
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/UnaryOperationWrapperOperandTest.java", "identifier": "UnaryOperationWrapperOperandTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void test_nullValuedOperand_mustThrowException() {\n\n UnaryOperationWrapperOperand unit = new UnaryOperationWrapperOperand(null, OperationType.NEGATE);\n MatcherAssert.assertThat(unit.value(), Matchers.nullValue());\n\n\n }", ...
{ "fields": [ { "declarator": "operand", "modifier": "private final", "original_string": "private final Operand operand;", "type": "Operand", "var_name": "operand" }, { "declarator": "unaryOperationType", "modifier": "private final", "original_string": "priv...
{ "body": "@Override\n public Object value() {\n\n if (resultOperand == null) {\n calculateResultOperand();\n }\n\n return resultOperand.value();\n }", "class_method_signature": "UnaryOperationWrapperOperand.value()", "constructor": false, "full_signature": "@Override publi...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_72
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void checkMismatchingClass_enum() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n TypeElement typeElement = TypeUtils.TypeRetrieval.getTypeEleme...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsClassMatcher.java", "identifier": "IsClassMatcher", "interfaces": "implements ImplicitMatcher<ELEMENT>", "methods": [ { "class_method_signature": "IsClassMatcher.check(ELEMENT el...
{ "body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isClass(element);\n }", "class_method_signature": "IsClassMatcher.check(ELEMENT element)", "constructor": false, "full_signature": "@Override public boolean check(ELEMENT element)", "identifier...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_243
{ "fields": [ { "declarator": "unit = new ByModifierMatcher()", "modifier": "private", "original_string": "private ByModifierMatcher unit = new ByModifierMatcher();", "type": "ByModifierMatcher", "var_name": "unit" } ], "file": "annotationprocessor/src/test/java/io/toolistico...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_nullValuedParameters() {\n MatcherAssert.assertThat(\"Should retrun false in case of null valued parameters\", !unit.checkForMatchingCharacteristic(null, null));\n\n }", "class_method_signature": "ByModifierMatcherTest.test_checkForMatc...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByModifierMatcher.java", "identifier": "ByModifierMatcher", "interfaces": "implements CriteriaMatcher<Element, Modifier>", "methods": [ { "class_method_signature": "ByModifierMatch...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, Modifier toCheckFor) {\n return (element != null && toCheckFor != null) && element.getModifiers().contains(toCheckFor);\n }", "class_method_signature": "ByModifierMatcher.checkForMatchingCharacteristic(Element element...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_185
{ "fields": [], "file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/HasNoThrownTypesMatcherTest.java", "identifier": "HasNoThrownTypesMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_check_withNonVoidReturnType() {\n\n ExecutableElement element = Mockito.mock(ExecutableElement.class);\n TypeMirror typeMirror = Mockito.mock(TypeMirror.class);\n List list = new ArrayList<TypeMirror>();\n list.add(Mockito.mock(TypeMirror.class));\n ...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/HasNoThrownTypesMatcher.java", "identifier": "HasNoThrownTypesMatcher", "interfaces": "implements ImplicitMatcher<ExecutableElement>", "methods": [ { "class_method_signature": "Has...
{ "body": "@Override\n public boolean check(ExecutableElement element) {\n return element != null && element.getThrownTypes().size() == 0;\n }", "class_method_signature": "HasNoThrownTypesMatcher.check(ExecutableElement element)", "constructor": false, "full_signature": "@Override public boolean ch...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_310
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/OperandFactoryTest.java", "identifier": "OperandFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void createOperand_nullValued_operandType() {\n OperandFactory.createOperand(null, \"ABC\", new OperationType[0], null);\n }", "class_method_signature": "OperandFactoryTest.createOperand_nullValued_operandType()", "constructor": fal...
{ "fields": [], "file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/OperandFactory.java", "identifier": "OperandFactory", "interfaces": "", "methods": [ { "class_method_signature": "OperandFactory.OperandFactory()", "constructor": true, ...
{ "body": "public static Operand createOperand(OperandType operandType, String expressionString, OperationType[] unaryOperationsToBeApplied, Expression expression) {\n\n if ((operandType == null) || (expressionString == null)) {\n throw new IllegalArgumentException(\"operandType and expressionString...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_255
{ "fields": [ { "declarator": "MESSSAGE = \"message ${0} : ${1}\"", "modifier": "final static", "original_string": "final static String MESSSAGE = \"message ${0} : ${1}\";", "type": "String", "var_name": "MESSSAGE" }, { "declarator": "MESSAGE_ARG_1 = \"A\"", "modi...
{ "body": "@Test\n public void createMessage_smallerNumberOfParameters() {\n\n MatcherAssert.assertThat(MessagerUtils.createMessage(\"TEST ${0}, ${2}, ${1}\", 1, \"YES\"), Matchers.is(\"TEST 1, ${2}, YES\"));\n\n }", "class_method_signature": "MessagerUtilsTest.createMessage_smallerNumberOfParameters()...
{ "fields": [ { "declarator": "printMessageCodes = false", "modifier": "private static", "original_string": "private static boolean printMessageCodes = false;", "type": "boolean", "var_name": "printMessageCodes" } ], "file": "annotationprocessor/src/main/java/io/toolisticon/a...
{ "body": "public static String createMessage(String message, Object... messageParameters) {\n\n // use custom message\n String result = message;\n\n if (messageParameters != null) {\n\n for (int i = 0; i < messageParameters.length; i++) {\n result = result.replaceAll(\"...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_64
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/testcases.commands/GetAttributesCommandTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestB...
{ "body": "@Test\n public void shouldExecuteSuccessfullyGetterAnnotatedField() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n T...
{ "fields": [ { "declarator": "INSTANCE = new GetAttributesCommand()", "modifier": "public final static", "original_string": "public final static GetAttributesCommand INSTANCE = new GetAttributesCommand();", "type": "GetAttributesCommand", "var_name": "INSTANCE" } ], "file": ...
{ "body": "@Override\n public AttributeResult[] execute(TypeElement element) {\n\n return BeanUtils.getAttributes(element);\n\n }", "class_method_signature": "GetAttributesCommand.execute(TypeElement element)", "constructor": false, "full_signature": "@Override public AttributeResult[] execute(Type...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_8
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationClassAttributeTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTest...
{ "body": "@Test\n public void getClassAttributeFromAnnotationAsTypeMirror_shouldReturnNullForNonMatchingClassAttributes() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n ...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationUtils.java", "identifier": "AnnotationUtils", "interfaces": "", "methods": [ { "class_method_signature": "AnnotationUtils.AnnotationUtils()", "constructor": true, "full_si...
{ "body": "public static TypeMirror getClassAttributeFromAnnotationAsTypeMirror(Element element, Class<? extends Annotation> annotationType) {\n return getClassAttributeFromAnnotationAsTypeMirror(element, annotationType, \"value\");\n }", "class_method_signature": "AnnotationUtils.getClassAttributeFromAnn...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_193
{ "fields": [], "file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/HasVoidReturnTypeMatcherTest.java", "identifier": "HasVoidReturnTypeMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_check_withNonVoidReturnType() {\n\n ExecutableElement element = Mockito.mock(ExecutableElement.class);\n TypeMirror typeMirror = Mockito.mock(TypeMirror.class);\n Mockito.when(element.getReturnType()).thenReturn(typeMirror);\n Mockito.when(typeMirror....
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/HasVoidReturnTypeMatcher.java", "identifier": "HasVoidReturnTypeMatcher", "interfaces": "implements ImplicitMatcher<ExecutableElement>", "methods": [ { "class_method_signature": "H...
{ "body": "@Override\n public boolean check(ExecutableElement element) {\n return element != null && TypeUtils.CheckTypeKind.isVoid(element.getReturnType());\n }", "class_method_signature": "HasVoidReturnTypeMatcher.check(ExecutableElement element)", "constructor": false, "full_signature": "@Overri...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_347
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java", "identifier": "ExpressionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void evaluateExpression_withModel_equalOperandsWithDifferentTypes() {\n\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"value1\", 5L);\n model.put(\"value2\", 5);\n\n Expression expression = ExpressionParser.parseExpression(\"value1...
{ "fields": [], "file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParser.java", "identifier": "ExpressionParser", "interfaces": "", "methods": [ { "class_method_signature": "ExpressionParser.parseExpression(String expressionString, Map<Strin...
{ "body": "public static Expression parseExpression(String expressionString, Map<String, Object> model) {\n\n ModelPathResolver.modelMapThreadLocal.set(model);\n return parseExpression(expressionString);\n\n }", "class_method_signature": "ExpressionParser.parseExpression(String expressionString, Ma...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_33
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationValueUtilsTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuil...
{ "body": "@Test\n public void fieldWithoutGetter_checkHasGetter() {\n\n unitTestBuilder.useSource(JavaFileObjectUtils.readFromResource(\"testcases.beanutils/FieldLevelTestcases.java\"))\n .useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n ...
{ "fields": [ { "declarator": "GETTER_PREFIXES = {\"get\", \"is\", \"has\"}", "modifier": "protected final static", "original_string": "protected final static String[] GETTER_PREFIXES = {\"get\", \"is\", \"has\"};", "type": "String[]", "var_name": "GETTER_PREFIXES" }, { ...
{ "body": "public static boolean checkHasGetter(VariableElement field) {\n\n if (field == null || field.getKind() != ElementKind.FIELD || CoreMatchers.BY_MODIFIER.getMatcher().checkForMatchingCharacteristic(field, Modifier.STATIC)) {\n return false;\n }\n\n TypeElement typeElement = El...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_202
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void byNumberOfParametersMatcher_methodWith0Parameters() {\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n TypeElement typeElement = TypeUtils.TypeR...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByNumberOfParametersMatcher.java", "identifier": "ByNumberOfParametersMatcher", "interfaces": "implements CriteriaMatcher<ExecutableElement, Integer>", "methods": [ { "class_method...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, Integer toCheckFor) {\n return (element != null && toCheckFor != null) && element.getParameters().size() == toCheckFor;\n }", "class_method_signature": "ByNumberOfParametersMatcher.checkForMatchingCharacteri...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_275
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationValueUtilsTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuil...
{ "body": "@Test\n public void annotationValueUtils_test_isAnnotation() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtils....
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationValueUtils.java", "identifier": "AnnotationValueUtils", "interfaces": "", "methods": [ { "class_method_signature": "AnnotationValueUtils.AnnotationValueUtils()", "constructor": ...
{ "body": "public static boolean isAnnotation(AnnotationValue annotationValue) {\n return hasAnnotationValueOneOfPassedTypes(annotationValue, AnnotationMirror.class);\n }", "class_method_signature": "AnnotationValueUtils.isAnnotation(AnnotationValue annotationValue)", "constructor": false, "full_signa...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_44
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationValueUtilsTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuil...
{ "body": "@Test\n public void getAttributes_withTypeHierarchy1() {\n\n unitTestBuilder\n .useSource(JavaFileObjectUtils.readFromResource(\"testcases.beanutils/TypeHierarchyTestClass.java\"))\n .useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n ...
{ "fields": [ { "declarator": "GETTER_PREFIXES = {\"get\", \"is\", \"has\"}", "modifier": "protected final static", "original_string": "protected final static String[] GETTER_PREFIXES = {\"get\", \"is\", \"has\"};", "type": "String[]", "var_name": "GETTER_PREFIXES" }, { ...
{ "body": "public static AttributeResult[] getAttributes(TypeElement typeElement) {\n\n\n if (typeElement == null) {\n return new AttributeResult[0];\n }\n\n List<VariableElement> fields = FluentElementFilter.createFluentElementFilter(typeElement.getEnclosedElements())\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_330
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/StringOperandTest.java", "identifier": "StringOperandTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @Ignore\n public void testStringWithEscapedEscapeChars() {\n MatcherAssert.assertThat(new StringOperand(\"'ABC\\\\\\\\ DEF'\").value(), Matchers.is(\"ABC\\\\ DEF\"));\n MatcherAssert.assertThat(new StringOperand(\"'ABC\\\\\\\\\\\\' DEF'\").value(), Matchers.is(\"ABC\\\\' DEF\"))...
{ "fields": [ { "declarator": "internalValue", "modifier": "private final", "original_string": "private final String internalValue;", "type": "String", "var_name": "internalValue" } ], "file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expr...
{ "body": "@Override\n public String value() {\n return internalValue;\n }", "class_method_signature": "StringOperand.value()", "constructor": false, "full_signature": "@Override public String value()", "identifier": "value", "invocations": [], "modifiers": "@Override public", "parameters":...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_13
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void checkInfoElementMessage() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n FluentValidatorMessage ...
{ "fields": [ { "declarator": "element", "modifier": "private final", "original_string": "private final Element element;", "type": "Element", "var_name": "element" }, { "declarator": "kind", "modifier": "private final", "original_string": "private final Diag...
{ "body": "public void issueMessage() {\n\n if (annotationMirror != null && annotationValue != null) {\n MessagerUtils.printMessage(element, annotationMirror, annotationValue, kind, message, args);\n } else if (annotationMirror != null) {\n MessagerUtils.printMessage(element, annot...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_222
{ "fields": [ { "declarator": "NAME = \"NAME\"", "modifier": "private final static", "original_string": "private final static String NAME = \"NAME\";", "type": "String", "var_name": "NAME" }, { "declarator": "unit = new ByQualifiedNameRegexMatcher()", "modifier": ...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_match_method() {\n\n Element element = Mockito.mock(Element.class);\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(NAME);\n\n Mockito.when(element.getKind()).thenRe...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameRegexMatcher.java", "identifier": "ByQualifiedNameRegexMatcher", "interfaces": "implements CriteriaMatcher<Element, String>", "methods": [ { "class_method_signature"...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n if (element != null && toCheckFor != null) {\n\n String name = null;\n switch (element.getKind()) {\n case ENUM:\n case INTERFACE:\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_388
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ModelPathResolverTest.java", "identifier": "ModelPathResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getGetter_testExistingMethodName() {\n\n MatcherAssert.assertThat(ModelPathResolver.getGetter(new GetGetterTestClass(), \"someMethod\"), Matchers.is(\"someMethod\"));\n\n }", "class_method_signature": "ModelPathResolverTest.getGetter_testExistingMethodName()", "construc...
{ "fields": [ { "declarator": "modelMapThreadLocal = new ThreadLocal<Map<String, Object>>() {\n @Override\n protected Map<String, Object> initialValue() {\n return new HashMap<String, Object>();\n }\n }", "modifier": "public static", "original_string": "public ...
{ "body": "protected static String getGetter(Object instance, String fieldNameOrGetter) {\n\n final String[] GETTER_PREFIXES = {\"get\", \"is\", \"has\"};\n\n final String trimmedFieldNameOrGetter = fieldNameOrGetter != null ? fieldNameOrGetter.trim() : null;\n\n if (instance == null || trimmedFi...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_367
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ParseUtilitiesTest.java", "identifier": "ParseUtilitiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = InvalidPathException.class)\n public void addKeyValuePair_incorrectUsage_irregularValueExpression() {\n\n // PREPARE INPUT\n Map<String, Object> outerModel = new HashMap<>();\n Map<String, Object> outerModelModel = new HashMap<>();\n outerModel.put(\"model\",...
{ "fields": [ { "declarator": "DYNAMIC_TEXT_BLOCK_REGEX = Pattern.compile(\"[$][{]\\\\s*((?:\\\\w|.)*?)\\\\s*[}]\")", "modifier": "public static final", "original_string": "public static final Pattern DYNAMIC_TEXT_BLOCK_REGEX = Pattern.compile(\"[$][{]\\\\s*((?:\\\\w|.)*?)\\\\s*[}]\");", "...
{ "body": "static void addKeyValuePair(Map<String, Object> outerModel, Map<String, Object> modelToBuild, String key, String valueExpression) {\n\n String[] keyAccessPath = key.split(\"[.]\");\n String valueKey = keyAccessPath[keyAccessPath.length - 1];\n\n // First get target Map to put the value...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_234
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationClassAttributeTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTest...
{ "body": "@Test\n public void checkForMatchingCharacteristic_nullValuedElement() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByRawTypeMatcher.java", "identifier": "ByRawTypeMatcher", "interfaces": "implements CriteriaMatcher<Element, Class>", "methods": [ { "class_method_signature": "ByRawTypeMatcher.ByR...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, Class toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // cast to executable element for further checks\n\n return TypeUtils.TypeComparison.isErasedType...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_371
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/ForTemplateBlockTest.java", "identifier": "ForTemplateBlockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = InvalidExpressionResult.class)\n public void test_getContent_nullValueInModel_mustReturnEmptyString() {\n ForTemplateBlock unit = new ForTemplateBlock(\" abc : def \", \"${abc}\");\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"def\", n...
{ "fields": [ { "declarator": "ATTRIBUTE_PATTERN = Pattern.compile(\"\\\\s*(\\\\w+?)\\\\s*[:]\\\\s*((?:\\\\w|[.])+?)\\\\s*\")", "modifier": "private final static", "original_string": "private final static Pattern ATTRIBUTE_PATTERN = Pattern.compile(\"\\\\s*(\\\\w+?)\\\\s*[:]\\\\s*((?:\\\\w|[.])+...
{ "body": "@Override\n public String getContent(Map<String, Object> outerVariables) {\n\n Map<String, Object> variables = new HashMap<>();\n variables.putAll(outerVariables);\n\n // get array or List\n Object values = ModelPathResolver.resolveModelPath(outerVariables, accessPath).getVal...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_52
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/testcases.commands/GetAttributesCommandWithInheritanceTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBu...
{ "body": "@Test\n public void shouldExecuteSuccessfullyMixedGetterAndSetterAnnotatedClassAndField2_() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n ...
{ "fields": [ { "declarator": "INSTANCE = new GetAttributesCommandWithInheritance()", "modifier": "public final static", "original_string": "public final static GetAttributesCommandWithInheritance INSTANCE = new GetAttributesCommandWithInheritance();", "type": "GetAttributesCommandWithInhe...
{ "body": "@Override\n public AttributeResult[] execute(TypeElement element) {\n\n return BeanUtils.getAttributesWithInheritance(element);\n }", "class_method_signature": "GetAttributesCommandWithInheritance.execute(TypeElement element)", "constructor": false, "full_signature": "@Override public At...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_263
{ "fields": [ { "declarator": "MESSSAGE = \"message ${0} : ${1}\"", "modifier": "final static", "original_string": "final static String MESSSAGE = \"message ${0} : ${1}\";", "type": "String", "var_name": "MESSSAGE" }, { "declarator": "MESSAGE_ARG_1 = \"A\"", "modi...
{ "body": "@Test\n public void printMessage_testStringBasedMessageWithAnnotationMirror() {\n\n unit.printMessage(element, annotationMirror, Diagnostic.Kind.ERROR, MESSSAGE, MESSAGE_ARG_1, MESSAGE_ARG_2);\n\n Mockito.verify(messager).printMessage(Diagnostic.Kind.ERROR, MESSSAGE_STR_WITH_REPLACED_ARGUM...
{ "fields": [ { "declarator": "printMessageCodes = false", "modifier": "private static", "original_string": "private static boolean printMessageCodes = false;", "type": "boolean", "var_name": "printMessageCodes" } ], "file": "annotationprocessor/src/main/java/io/toolisticon/a...
{ "body": "public static void printMessage(Element e, Diagnostic.Kind kind, String message, Object... args) {\n printMessage(e, kind, PlainValidationMessage.create(message), args);\n }", "class_method_signature": "MessagerUtils.printMessage(Element e, Diagnostic.Kind kind, String message, Object... args...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_326
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/StringOperandTest.java", "identifier": "StringOperandTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_getOperandsJavaType() {\n\n MatcherAssert.assertThat(new StringOperand(\"'test'\").getOperandsJavaType(), Matchers.equalTo((Class) String.class));\n\n }", "class_method_signature": "StringOperandTest.test_getOperandsJavaType()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "internalValue", "modifier": "private final", "original_string": "private final String internalValue;", "type": "String", "var_name": "internalValue" } ], "file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expr...
{ "body": "@Override\n public Class<String> getOperandsJavaType() {\n return String.class;\n }", "class_method_signature": "StringOperand.getOperandsJavaType()", "constructor": false, "full_signature": "@Override public Class<String> getOperandsJavaType()", "identifier": "getOperandsJavaType", ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_131
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void byParameterTypeMatcher_match_withGenericType() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element1) {\n\n // First get test class\n Ty...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeMatcher.java", "identifier": "ByParameterTypeMatcher", "interfaces": "implements CriteriaMatcher<ExecutableElement, Class[]>", "methods": [ { "class_method_signature...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, Class[] toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // check if number of parameters is the same\n if (element.getParameters().size() != ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_29
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationValueUtilsTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuil...
{ "body": "@Test\n public void fieldWithImplementedGetterAndSetters_checkHasGetter() {\n\n unitTestBuilder.useSource(JavaFileObjectUtils.readFromResource(\"testcases.beanutils/FieldLevelTestcases.java\"))\n .useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @O...
{ "fields": [ { "declarator": "GETTER_PREFIXES = {\"get\", \"is\", \"has\"}", "modifier": "protected final static", "original_string": "protected final static String[] GETTER_PREFIXES = {\"get\", \"is\", \"has\"};", "type": "String[]", "var_name": "GETTER_PREFIXES" }, { ...
{ "body": "public static boolean checkHasGetter(VariableElement field) {\n\n if (field == null || field.getKind() != ElementKind.FIELD || CoreMatchers.BY_MODIFIER.getMatcher().checkForMatchingCharacteristic(field, Modifier.STATIC)) {\n return false;\n }\n\n TypeElement typeElement = El...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_218
{ "fields": [ { "declarator": "NAME = \"NAME\"", "modifier": "private final static", "original_string": "private final static String NAME = \"NAME\";", "type": "String", "var_name": "NAME" }, { "declarator": "unit = new ByQualifiedNameRegexMatcher()", "modifier": ...
{ "body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_happyPath() {\n\n MatcherAssert.assertThat(\"Should return enum name\", unit.getStringRepresentationOfPassedCharacteristic(NAME).equals(NAME));\n\n }", "class_method_signature": "ByQualifiedNameRegexMatcherTest.test_getSt...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameRegexMatcher.java", "identifier": "ByQualifiedNameRegexMatcher", "interfaces": "implements CriteriaMatcher<Element, String>", "methods": [ { "class_method_signature"...
{ "body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor) {\n return toGetStringRepresentationFor;\n }", "class_method_signature": "ByQualifiedNameRegexMatcher.getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_166
{ "fields": [ { "declarator": "NAME = \"NAME\"", "modifier": "private final static", "original_string": "private final static String NAME = \"NAME\";", "type": "String", "var_name": "NAME" }, { "declarator": "unit = new ByQualifiedNameMatcher()", "modifier": "priv...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_match_class() {\n\n TypeElement element = Mockito.mock(TypeElement.class);\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(NAME);\n\n Mockito.when(element.getKind())...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameMatcher.java", "identifier": "ByQualifiedNameMatcher", "interfaces": "implements CriteriaMatcher<Element, String>", "methods": [ { "class_method_signature": "ByQuali...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n switch (element.getKind()) {\n case ENUM:\n case INTERFACE:\n case ANN...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_189
{ "fields": [], "file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsAttributeFieldMatcherTest.java", "identifier": "IsAttributeFieldMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_isNoAttributeField_isStatic_shouldReturnFalse() {\n\n CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorUnitTestClassInternal.java\"))\n .useProcessor(new AbstractUnitTestA...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsAttributeFieldMatcher.java", "identifier": "IsAttributeFieldMatcher", "interfaces": "implements ImplicitMatcher<VariableElement>", "methods": [ { "class_method_signature": "IsAtt...
{ "body": "@Override\n public boolean check(VariableElement element) {\n\n if (element == null || element.getKind() != ElementKind.FIELD) {\n return false;\n }\n\n\n return BeanUtils.isAttribute(element);\n }", "class_method_signature": "IsAttributeFieldMatcher.check(VariableEl...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_91
{ "fields": [ { "declarator": "unit = new ByAnnotationMatcher()", "modifier": "private", "original_string": "private ByAnnotationMatcher unit = new ByAnnotationMatcher();", "type": "ByAnnotationMatcher", "var_name": "unit" } ], "file": "annotationprocessor/src/test/java/io/to...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_nullValuedParameters() {\n MatcherAssert.assertThat(\"Should retrun false in case of null valued parameters\", !unit.checkForMatchingCharacteristic(null, null));\n\n }", "class_method_signature": "ByAnnotationMatcherTest.test_checkForMa...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByAnnotationMatcher.java", "identifier": "ByAnnotationMatcher", "interfaces": "implements CriteriaMatcher<Element, Class<? extends Annotation>>", "methods": [ { "class_method_signa...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, Class<? extends Annotation> toCheckFor) {\n return element != null && toCheckFor != null && element.getAnnotation(toCheckFor) != null;\n }", "class_method_signature": "ByAnnotationMatcher.checkForMatchingCharacteristi...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_4
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationClassAttributeTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTest...
{ "body": "@Test\n public void annotationUtilsTest_arrayClassAttribute_StringDoubleFloatValues() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n List<? extends Element> r...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationUtils.java", "identifier": "AnnotationUtils", "interfaces": "", "methods": [ { "class_method_signature": "AnnotationUtils.AnnotationUtils()", "constructor": true, "full_si...
{ "body": "public static String[] getClassArrayAttributeFromAnnotationAsFqn(Element element, Class<? extends Annotation> annotationType) {\n\n return getClassArrayAttributeFromAnnotationAsFqn(element, annotationType, \"value\");\n }", "class_method_signature": "AnnotationUtils.getClassArrayAttributeFromAn...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_170
{ "fields": [ { "declarator": "NAME = \"NAME\"", "modifier": "private final static", "original_string": "private final static String NAME = \"NAME\";", "type": "String", "var_name": "NAME" }, { "declarator": "unit = new ByQualifiedNameMatcher()", "modifier": "priv...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_mismatch_package() {\n\n PackageElement element = Mockito.mock(PackageElement.class);\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(\"XXX\");\n\n Mockito.when(elem...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameMatcher.java", "identifier": "ByQualifiedNameMatcher", "interfaces": "implements CriteriaMatcher<Element, String>", "methods": [ { "class_method_signature": "ByQuali...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n switch (element.getKind()) {\n case ENUM:\n case INTERFACE:\n case ANN...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_87
{ "fields": [ { "declarator": "unit = new ByAnnotationMatcher()", "modifier": "private", "original_string": "private ByAnnotationMatcher unit = new ByAnnotationMatcher();", "type": "ByAnnotationMatcher", "var_name": "unit" } ], "file": "annotationprocessor/src/test/java/io/to...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_match() {\n\n TestAnnotation annotation = Mockito.mock(TestAnnotation.class);\n Element element = Mockito.mock(Element.class);\n\n Mockito.when(element.getAnnotation(TestAnnotation.class)).thenReturn(annotation);\n\n Mat...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByAnnotationMatcher.java", "identifier": "ByAnnotationMatcher", "interfaces": "implements CriteriaMatcher<Element, Class<? extends Annotation>>", "methods": [ { "class_method_signa...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, Class<? extends Annotation> toCheckFor) {\n return element != null && toCheckFor != null && element.getAnnotation(toCheckFor) != null;\n }", "class_method_signature": "ByAnnotationMatcher.checkForMatchingCharacteristi...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_68
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/testcases.commands/GetAttributesCommandTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestB...
{ "body": "@Test\n public void shouldExecuteSuccessfullyGetterAndSetterAnnotatedMethodWithInvalidParameterType() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement eleme...
{ "fields": [ { "declarator": "INSTANCE = new GetAttributesCommand()", "modifier": "public final static", "original_string": "public final static GetAttributesCommand INSTANCE = new GetAttributesCommand();", "type": "GetAttributesCommand", "var_name": "INSTANCE" } ], "file": ...
{ "body": "@Override\n public AttributeResult[] execute(TypeElement element) {\n\n return BeanUtils.getAttributes(element);\n\n }", "class_method_signature": "GetAttributesCommand.execute(TypeElement element)", "constructor": false, "full_signature": "@Override public AttributeResult[] execute(Type...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_259
{ "fields": [ { "declarator": "MESSSAGE = \"message ${0} : ${1}\"", "modifier": "final static", "original_string": "final static String MESSSAGE = \"message ${0} : ${1}\";", "type": "String", "var_name": "MESSSAGE" }, { "declarator": "MESSAGE_ARG_1 = \"A\"", "modi...
{ "body": "@Test\n public void argToString_arrayValue() {\n\n String[] array = {\"A\", \"B\", \"C\"};\n MatcherAssert.assertThat(MessagerUtils.argToString(array), Matchers.is(\"[A, B, C]\"));\n\n }", "class_method_signature": "MessagerUtilsTest.argToString_arrayValue()", "constructor": false, ...
{ "fields": [ { "declarator": "printMessageCodes = false", "modifier": "private static", "original_string": "private static boolean printMessageCodes = false;", "type": "boolean", "var_name": "printMessageCodes" } ], "file": "annotationprocessor/src/main/java/io/toolisticon/a...
{ "body": "protected static String argToString(Object arg){\n\n if(arg == null) {\n\n return \"<NULL>\";\n\n } else if (arg.getClass().isArray()) {\n\n StringBuilder stringBuilder = new StringBuilder(\"[\");\n boolean first = true;\n\n for (Object argument : (...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_127
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void checkMatchingExecutableElement_method() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // find field\n List<? extends Eleme...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsExecutableElementMatcher.java", "identifier": "IsExecutableElementMatcher", "interfaces": "implements ImplicitMatcher<ELEMENT>", "methods": [ { "class_method_signature": "IsExecu...
{ "body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CastElement.isExecutableElement(element);\n }", "class_method_signature": "IsExecutableElementMatcher.check(ELEMENT element)", "constructor": false, "full_signature": "@Override public boolean check(ELEMENT element...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_126
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationClassAttributeTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTest...
{ "body": "@Test\n public void checkNullValuedElement() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for null valued ele...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsTypeElementMatcher.java", "identifier": "IsTypeElementMatcher", "interfaces": "implements ImplicitMatcher<ELEMENT>", "methods": [ { "class_method_signature": "IsTypeElementMatche...
{ "body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CastElement.isTypeElement(element);\n }", "class_method_signature": "IsTypeElementMatcher.check(ELEMENT element)", "constructor": false, "full_signature": "@Override public boolean check(ELEMENT element)", "ident...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_86
{ "fields": [ { "declarator": "unit = new ByAnnotationMatcher()", "modifier": "private", "original_string": "private ByAnnotationMatcher unit = new ByAnnotationMatcher();", "type": "ByAnnotationMatcher", "var_name": "unit" } ], "file": "annotationprocessor/src/test/java/io/to...
{ "body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_passedNullValue() {\n\n MatcherAssert.assertThat(\"Should return null for null valued parameter\", unit.getStringRepresentationOfPassedCharacteristic(null) == null);\n\n }", "class_method_signature": "ByAnnotationMatcherT...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByAnnotationMatcher.java", "identifier": "ByAnnotationMatcher", "interfaces": "implements CriteriaMatcher<Element, Class<? extends Annotation>>", "methods": [ { "class_method_signa...
{ "body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(Class<? extends Annotation> toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.getCanonicalName() : null;\n }", "class_method_signature": "ByAnnotationMatcher.get...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_69
{ "fields": [], "file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/fluentfilter/FluentElementFilterTest.java", "identifier": "FluentElementFilterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemoveDuplicates() {\n\n Element element = Mockito.mock(Element.class);\n\n MatcherAssert.assertThat(\"PRECONDITION : MUST contain double Elements\", FluentElementFilter.createFluentElementFilter(element, element).getResult(), Matchers.contains(element, element));\n...
{ "fields": [ { "declarator": "elements", "modifier": "private final", "original_string": "private final List<ELEMENT> elements;", "type": "List<ELEMENT>", "var_name": "elements" } ], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/f...
{ "body": "public FluentElementFilter<ELEMENT> removeDuplicates() {\n return new FluentElementFilter<>((List<ELEMENT>) TransitionFilters.REMOVE_DUPLICATES_ELEMENTS.transition(elements));\n }", "class_method_signature": "FluentElementFilter.removeDuplicates()", "constructor": false, "full_signature": "...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_258
{ "fields": [ { "declarator": "MESSSAGE = \"message ${0} : ${1}\"", "modifier": "final static", "original_string": "final static String MESSSAGE = \"message ${0} : ${1}\";", "type": "String", "var_name": "MESSSAGE" }, { "declarator": "MESSAGE_ARG_1 = \"A\"", "modi...
{ "body": "@Test\n public void argToString_nullValue() {\n MatcherAssert.assertThat(MessagerUtils.argToString(null), Matchers.is(\"<NULL>\"));\n }", "class_method_signature": "MessagerUtilsTest.argToString_nullValue()", "constructor": false, "full_signature": "@Test public void argToString_nullValu...
{ "fields": [ { "declarator": "printMessageCodes = false", "modifier": "private static", "original_string": "private static boolean printMessageCodes = false;", "type": "boolean", "var_name": "printMessageCodes" } ], "file": "annotationprocessor/src/main/java/io/toolisticon/a...
{ "body": "protected static String argToString(Object arg){\n\n if(arg == null) {\n\n return \"<NULL>\";\n\n } else if (arg.getClass().isArray()) {\n\n StringBuilder stringBuilder = new StringBuilder(\"[\");\n boolean first = true;\n\n for (Object argument : (...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_5
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationClassAttributeTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTest...
{ "body": "@Test\n public void annotationUtilsTest_arrayClassAttributeWithExplicitAttributeName_LongIntegerValues() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n List<?...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationUtils.java", "identifier": "AnnotationUtils", "interfaces": "", "methods": [ { "class_method_signature": "AnnotationUtils.AnnotationUtils()", "constructor": true, "full_si...
{ "body": "public static String[] getClassArrayAttributeFromAnnotationAsFqn(Element element, Class<? extends Annotation> annotationType) {\n\n return getClassArrayAttributeFromAnnotationAsFqn(element, annotationType, \"value\");\n }", "class_method_signature": "AnnotationUtils.getClassArrayAttributeFromAn...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_171
{ "fields": [ { "declarator": "NAME = \"NAME\"", "modifier": "private final static", "original_string": "private final static String NAME = \"NAME\";", "type": "String", "var_name": "NAME" }, { "declarator": "unit = new ByQualifiedNameMatcher()", "modifier": "priv...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_mismatch_method() {\n\n Element element = Mockito.mock(Element.class);\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(\"XXX\");\n\n Mockito.when(element.getKind())....
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameMatcher.java", "identifier": "ByQualifiedNameMatcher", "interfaces": "implements CriteriaMatcher<Element, String>", "methods": [ { "class_method_signature": "ByQuali...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n switch (element.getKind()) {\n case ENUM:\n case INTERFACE:\n case ANN...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_90
{ "fields": [ { "declarator": "unit = new ByAnnotationMatcher()", "modifier": "private", "original_string": "private ByAnnotationMatcher unit = new ByAnnotationMatcher();", "type": "ByAnnotationMatcher", "var_name": "unit" } ], "file": "annotationprocessor/src/test/java/io/to...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_nullValuedAnnotationType() {\n Element element = Mockito.mock(Element.class);\n MatcherAssert.assertThat(\"Should retrun false in case of null valued annotation\", !unit.checkForMatchingCharacteristic(element, null));\n\n }", "cl...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByAnnotationMatcher.java", "identifier": "ByAnnotationMatcher", "interfaces": "implements CriteriaMatcher<Element, Class<? extends Annotation>>", "methods": [ { "class_method_signa...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, Class<? extends Annotation> toCheckFor) {\n return element != null && toCheckFor != null && element.getAnnotation(toCheckFor) != null;\n }", "class_method_signature": "ByAnnotationMatcher.checkForMatchingCharacteristi...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_167
{ "fields": [ { "declarator": "NAME = \"NAME\"", "modifier": "private final static", "original_string": "private final static String NAME = \"NAME\";", "type": "String", "var_name": "NAME" }, { "declarator": "unit = new ByQualifiedNameMatcher()", "modifier": "priv...
{ "body": "@Test\n public void test_checkForMatchingCharacteristic_match_package() {\n\n PackageElement element = Mockito.mock(PackageElement.class);\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(NAME);\n\n Mockito.when(element.ge...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameMatcher.java", "identifier": "ByQualifiedNameMatcher", "interfaces": "implements CriteriaMatcher<Element, String>", "methods": [ { "class_method_signature": "ByQuali...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n switch (element.getKind()) {\n case ENUM:\n case INTERFACE:\n case ANN...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_188
{ "fields": [], "file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsAttributeFieldMatcherTest.java", "identifier": "IsAttributeFieldMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_isNoAttributeField_noSetter_shouldReturnFalse() {\n\n CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorUnitTestClassInternal.java\"))\n .useProcessor(new AbstractUnitTestA...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsAttributeFieldMatcher.java", "identifier": "IsAttributeFieldMatcher", "interfaces": "implements ImplicitMatcher<VariableElement>", "methods": [ { "class_method_signature": "IsAtt...
{ "body": "@Override\n public boolean check(VariableElement element) {\n\n if (element == null || element.getKind() != ElementKind.FIELD) {\n return false;\n }\n\n\n return BeanUtils.isAttribute(element);\n }", "class_method_signature": "IsAttributeFieldMatcher.check(VariableEl...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_28
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationValueUtilsTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuil...
{ "body": "@Test\n public void getPossibleGetterOrSetterNames_getter() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n MatcherAssert.assertThat(Arrays.asList(BeanUtils.getP...
{ "fields": [ { "declarator": "GETTER_PREFIXES = {\"get\", \"is\", \"has\"}", "modifier": "protected final static", "original_string": "protected final static String[] GETTER_PREFIXES = {\"get\", \"is\", \"has\"};", "type": "String[]", "var_name": "GETTER_PREFIXES" }, { ...
{ "body": "public static String getPrefixedName(String prefix, String name) {\n return prefix + name.substring(0, 1).toUpperCase() + name.substring(1);\n }", "class_method_signature": "BeanUtils.getPrefixedName(String prefix, String name)", "constructor": false, "full_signature": "public static String...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_219
{ "fields": [ { "declarator": "NAME = \"NAME\"", "modifier": "private final static", "original_string": "private final static String NAME = \"NAME\";", "type": "String", "var_name": "NAME" }, { "declarator": "unit = new ByQualifiedNameRegexMatcher()", "modifier": ...
{ "body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_passedNullValue() {\n\n MatcherAssert.assertThat(\"Should return null for null valued parameter\", unit.getStringRepresentationOfPassedCharacteristic(null) == null);\n\n }", "class_method_signature": "ByQualifiedNameRegex...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameRegexMatcher.java", "identifier": "ByQualifiedNameRegexMatcher", "interfaces": "implements CriteriaMatcher<Element, String>", "methods": [ { "class_method_signature"...
{ "body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor) {\n return toGetStringRepresentationFor;\n }", "class_method_signature": "ByQualifiedNameRegexMatcher.getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_130
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void byParameterTypeMatcher_match() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // find field\n List<? extends Element> resul...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeMatcher.java", "identifier": "ByParameterTypeMatcher", "interfaces": "implements CriteriaMatcher<ExecutableElement, Class[]>", "methods": [ { "class_method_signature...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, Class[] toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // check if number of parameters is the same\n if (element.getParameters().size() != ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_53
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/testcases.commands/GetAttributesCommandWithInheritanceTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBu...
{ "body": "@Test\n public void shouldExecuteSuccessfullyGetterAnnotatedField() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n T...
{ "fields": [ { "declarator": "INSTANCE = new GetAttributesCommandWithInheritance()", "modifier": "public final static", "original_string": "public final static GetAttributesCommandWithInheritance INSTANCE = new GetAttributesCommandWithInheritance();", "type": "GetAttributesCommandWithInhe...
{ "body": "@Override\n public AttributeResult[] execute(TypeElement element) {\n\n return BeanUtils.getAttributesWithInheritance(element);\n }", "class_method_signature": "GetAttributesCommandWithInheritance.execute(TypeElement element)", "constructor": false, "full_signature": "@Override public At...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_262
{ "fields": [ { "declarator": "MESSSAGE = \"message ${0} : ${1}\"", "modifier": "final static", "original_string": "final static String MESSSAGE = \"message ${0} : ${1}\";", "type": "String", "var_name": "MESSSAGE" }, { "declarator": "MESSAGE_ARG_1 = \"A\"", "modi...
{ "body": "@Test\n public void printMessage_testStringBasedMessage() {\n\n unit.printMessage(element, Diagnostic.Kind.ERROR, MESSSAGE, MESSAGE_ARG_1, MESSAGE_ARG_2);\n\n Mockito.verify(messager).printMessage(Diagnostic.Kind.ERROR, MESSSAGE_STR_WITH_REPLACED_ARGUMENTS, element);\n\n }", "class_me...
{ "fields": [ { "declarator": "printMessageCodes = false", "modifier": "private static", "original_string": "private static boolean printMessageCodes = false;", "type": "boolean", "var_name": "printMessageCodes" } ], "file": "annotationprocessor/src/main/java/io/toolisticon/a...
{ "body": "public static void printMessage(Element e, Diagnostic.Kind kind, String message, Object... args) {\n printMessage(e, kind, PlainValidationMessage.create(message), args);\n }", "class_method_signature": "MessagerUtils.printMessage(Element e, Diagnostic.Kind kind, String message, Object... args...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_327
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/StringOperandTest.java", "identifier": "StringOperandTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStringWithoutEscapes() {\n\n MatcherAssert.assertThat(new StringOperand(\"'ABC DEF'\").value(), Matchers.is(\"ABC DEF\"));\n MatcherAssert.assertThat(new StringOperand(\"'//%&§/'\").value(), Matchers.is(\"//%&§/\"));\n MatcherAssert.assertThat(new StringOpera...
{ "fields": [ { "declarator": "internalValue", "modifier": "private final", "original_string": "private final String internalValue;", "type": "String", "var_name": "internalValue" } ], "file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expr...
{ "body": "@Override\n public String value() {\n return internalValue;\n }", "class_method_signature": "StringOperand.value()", "constructor": false, "full_signature": "@Override public String value()", "identifier": "value", "invocations": [], "modifiers": "@Override public", "parameters":...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_235
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationClassAttributeTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTest...
{ "body": "@Test\n public void checkForMatchingCharacteristic_nullValuedRawType() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return...
{ "fields": [], "file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByRawTypeMatcher.java", "identifier": "ByRawTypeMatcher", "interfaces": "implements CriteriaMatcher<Element, Class>", "methods": [ { "class_method_signature": "ByRawTypeMatcher.ByR...
{ "body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, Class toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // cast to executable element for further checks\n\n return TypeUtils.TypeComparison.isErasedType...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_370
{ "fields": [], "file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/ForTemplateBlockTest.java", "identifier": "ForTemplateBlockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = InvalidPathException.class)\n public void test_getContent_invalidType() {\n ForTemplateBlock unit = new ForTemplateBlock(\" abc : def \", \"${abc}\");\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"def\", \"NOPE\");\n\n unit.getC...
{ "fields": [ { "declarator": "ATTRIBUTE_PATTERN = Pattern.compile(\"\\\\s*(\\\\w+?)\\\\s*[:]\\\\s*((?:\\\\w|[.])+?)\\\\s*\")", "modifier": "private final static", "original_string": "private final static Pattern ATTRIBUTE_PATTERN = Pattern.compile(\"\\\\s*(\\\\w+?)\\\\s*[:]\\\\s*((?:\\\\w|[.])+...
{ "body": "@Override\n public String getContent(Map<String, Object> outerVariables) {\n\n Map<String, Object> variables = new HashMap<>();\n variables.putAll(outerVariables);\n\n // get array or List\n Object values = ModelPathResolver.resolveModelPath(outerVariables, accessPath).getVal...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }
86808110_12
{ "fields": [ { "declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))", "modifier": "private", "original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild...
{ "body": "@Test\n public void checkWarningElementMessage() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n FluentValidatorMessa...
{ "fields": [ { "declarator": "element", "modifier": "private final", "original_string": "private final Element element;", "type": "Element", "var_name": "element" }, { "declarator": "kind", "modifier": "private final", "original_string": "private final Diag...
{ "body": "public void issueMessage() {\n\n if (annotationMirror != null && annotationValue != null) {\n MessagerUtils.printMessage(element, annotationMirror, annotationValue, kind, message, args);\n } else if (annotationMirror != null) {\n MessagerUtils.printMessage(element, annot...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 86808110, "size": 2194, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/toolisticon/annotation-processor-toolkit" }