id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
86808110_223 | {
"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_mismatch_class() {\n\n TypeElement element = Mockito.mock(TypeElement.class);\n\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(\"XXX\");\n\n Mockito.when(element.ge... | {
"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_389 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ModelPathResolverTest.java",
"identifier": "ModelPathResolverTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getGetter_testNonAccessibleExistingMethodName() {\n\n MatcherAssert.assertThat(ModelPathResolver.getGetter(new GetGetterTestClass(), \"nonAccessibleMethod\"), Matchers.nullValue());\n\n }",
"class_method_signature": "ModelPathResolverTest.getGetter_testNonAccessibleExisti... | {
"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_366 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ParseUtilitiesTest.java",
"identifier": "ParseUtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void addKeyValuePair_incorrectUsage_accessesNonMapInKey() {\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_274 | {
"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_isClass() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtils.getAn... | {
"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 isClass(AnnotationValue annotationValue) {\n return hasAnnotationValueOneOfPassedTypes(annotationValue, TypeMirror.class);\n }",
"class_method_signature": "AnnotationValueUtils.isClass(AnnotationValue annotationValue)",
"constructor": false,
"full_signature": "public s... | {
"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_45 | {
"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_withTypeHierarchy2() {\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[] getAttributesWithInheritance(TypeElement typeElement) {\n List<AttributeResult> resultList = new ArrayList<AttributeResult>();\n resultList.addAll(Arrays.asList(GetAttributesCommand.INSTANCE.execute(typeElement)));\n\n // process super types\n for... | {
"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_331 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/DynamicOperandTest.java",
"identifier": "DynamicOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void test_passedNullValue() {\n new DynamicOperand(null).value();\n }",
"class_method_signature": "DynamicOperandTest.test_passedNullValue()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.clas... | {
"fields": [
{
"declarator": "value",
"modifier": "private",
"original_string": "private Object value;",
"type": "Object",
"var_name": "value"
}
],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/DynamicOperand.java... | {
"body": "@Override\n public Object value() {\n\n ModelPathResolver.ResolvedModelPathResult result = ModelPathResolver.resolveModelPath(ModelPathResolver.modelMapThreadLocal.get(), getExpressionString());\n\n // result cannot be null\n return result.getValue();\n\n }",
"class_method_sign... | {
"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_346 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_withModel_equalOperands() {\n\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"value1\", 5L);\n model.put(\"value2\", 5L);\n\n Expression expression = ExpressionParser.parseExpression(\"value1 == value2\", mod... | {
"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_32 | {
"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 fieldWithImplementedGetterAndSetterAnnotation_checkHasGetter() {\n\n unitTestBuilder.useSource(JavaFileObjectUtils.readFromResource(\"testcases.beanutils/FieldLevelTestcases.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 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_203 | {
"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_methodWith1Parameters() {\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_9 | {
"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 getClassAttributeFromAnnotationAsFqn_shouldGetClassAttributeSuccefully() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // precondition\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 String getClassAttributeFromAnnotationAsFqn(Element element, Class<? extends Annotation> annotationType) {\n return getClassAttributeFromAnnotationAsFqn(element, annotationType, \"value\");\n }",
"class_method_signature": "AnnotationUtils.getClassAttributeFromAnnotationAsFqn(Eleme... | {
"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_192 | {
"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_withVoidReturnType() {\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.get... | {
"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_311 | {
"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_expressionString() {\n OperandFactory.createOperand(OperandType.BOOLEAN, null, new OperationType[0], null);\n }",
"class_method_signature": "OperandFactoryTest.createOperand_nullValued_expressionString()"... | {
"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_254 | {
"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_exactNumberOfParameters() {\n\n MatcherAssert.assertThat(MessagerUtils.createMessage(\"TEST ${0}, ${2}, ${1}\", 1, \"YES\", true), Matchers.is(\"TEST 1, true, YES\"));\n\n }",
"class_method_signature": "MessagerUtilsTest.createMessage_exactNumberOfParameters... | {
"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_65 | {
"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 shouldExecuteSuccessfullySetterAnnotatedField() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n\n ... | {
"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_184 | {
"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_withoutThrownTypes() {\n\n ExecutableElement element = Mockito.mock(ExecutableElement.class);\n TypeMirror typeMirror = Mockito.mock(TypeMirror.class);\n Mockito.when(element.getThrownTypes()).thenReturn(Collections.EMPTY_LIST);\n\n MatcherAsser... | {
"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_307 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/LongOperandTest.java",
"identifier": "LongOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void test_passedNullValue() {\n new LongOperand(null).value();\n }",
"class_method_signature": "LongOperandTest.test_passedNullValue()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.class) pub... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/LongOperand.java",
"identifier": "LongOperand",
"interfaces": "",
"methods": [
{
"class_method_signature": "LongOperand.LongOperand(String expressionString)",
"constructo... | {
"body": "@Override\n public Long value() {\n return Long.valueOf(getExpressionString());\n }",
"class_method_signature": "LongOperand.value()",
"constructor": false,
"full_signature": "@Override public Long value()",
"identifier": "value",
"invocations": [
"valueOf",
"getExpressionStr... | {
"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_73 | {
"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 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/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_242 | {
"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_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/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_350 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_withModel_evenMoreComplexMixedExpression() {\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\n Expression expression = Exp... | {
"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_215 | {
"fields": [
{
"declarator": "field = \"sds\"",
"modifier": "private",
"original_string": "private String field = \"sds\";",
"type": "String",
"var_name": "field"
},
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(... | {
"body": "@Test\n public void checkMatchingVariableElement_field() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // find field\n List<? extends Element>... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsVariableElementMatcher.java",
"identifier": "IsVariableElementMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsVariableE... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CastElement.isVariableElement(element);\n }",
"class_method_signature": "IsVariableElementMatcher.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_24 | {
"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_inverted_allNotMatching() {\n\n ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>> unit =\n new ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>>(TestCoreMatcherFactory.createElementBasedI... | {
"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_147 | {
"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_match() {\n\n Element element = Mockito.mock(Element.class);\n\n Mockito.when(element.getKind()).thenReturn(ElementKind.CLASS);\n\n MatcherAssert.assertThat(\"Should find match correctly\", unit.checkForMatchingCharacteristic(e... | {
"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_281 | {
"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_getBooleanValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUti... | {
"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 getBooleanValue(AnnotationValue annotationValue) {\n return !isBoolean(annotationValue) ? null : (Boolean) annotationValue.getValue();\n }",
"class_method_signature": "AnnotationValueUtils.getBooleanValue(AnnotationValue annotationValue)",
"constructor": false,
"full_s... | {
"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_110 | {
"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_nullValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should... | {
"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_239 | {
"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_match() {\n\n\n Element element = Mockito.mock(Element.class);\n\n Set<Modifier> modifierSet = new HashSet<Modifier>();\n modifierSet.add(Modifier.FINAL);\n\n Mockito.when(element.getModifiers()).thenReturn(modifierSet);... | {
"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_393 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/TemplateProcessorTest.java",
"identifier": "TemplateProcessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTemplateFile() {\n\n Map<String, Object> map = new HashMap<String, Object>();\n map.put(\"test\", \"YEP\");\n\n MatcherAssert.assertThat(TemplateProcessor.processTemplateResourceFile(\"/TestTemplateProcessorTemplateFile.tpl\", map), Matchers.is(\"YEP\"));\n\n... | {
"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 processTemplateResourceFile(String templateFileName, Map<String, Object> values) {\n\n String templateString = null;\n try {\n templateString = ParseUtilities.readResourceToString(templateFileName);\n } catch (Exception e) {\n throw new Illega... | {
"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_106 | {
"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/IsGetterMethodMatcher.java",
"identifier": "IsGetterMethodMatcher",
"interfaces": "implements ImplicitMatcher<ExecutableElement>",
"methods": [
{
"class_method_signature": "IsGette... | {
"body": "@Override\n public boolean check(ExecutableElement element) {\n\n if (element == null) {\n return false;\n }\n\n if (!FluentElementValidator.createFluentElementValidator(element)\n .applyValidator(CoreMatchers.BY_MODIFIER).hasAllOf(Modifier.PUBLIC)\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_385 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/IncludeTemplateBlockTest.java",
"identifier": "IncludeTemplateBlockTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = InvalidPathException.class)\n public void test_getContent_missingModelValue() {\n IncludeTemplateBlock unit = new IncludeTemplateBlock(\"resource: '/IncludeTemplateBlockTest.tpl'\",\"\");\n\n Map<String, Object> model = new HashMap<String, Object>();\n\n unit.getCon... | {
"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_151 | {
"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_nullValuedParameters() {\n MatcherAssert.assertThat(\"Should return false in case of null valued parameters\", !unit.checkForMatchingCharacteristic(null, null));\n\n }",
"class_method_signature": "ByElementKindMatcherTest.test_checkForM... | {
"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_49 | {
"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 shouldExecuteSuccessfullySetterAnnotatedClass() {\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_278 | {
"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_getIntegerValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUti... | {
"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 Integer getIntegerValue(AnnotationValue annotationValue) {\n return !isInteger(annotationValue) ? null : (Integer) annotationValue.getValue();\n }",
"class_method_signature": "AnnotationValueUtils.getIntegerValue(AnnotationValue annotationValue)",
"constructor": false,
"full_s... | {
"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_297 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/UtilitiesTest.java",
"identifier": "UtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void convertVarargsToArray_withValues() {\n\n\n MatcherAssert.assertThat(Arrays.asList(Utilities.convertVarargsToArray(\"A\",\"B\", (String)null, \"C\")), Matchers.contains(\"A\",\"B\", (String)null,\"C\"));\n\n }",
"class_method_signature": "UtilitiesTest.convertVarargsToArra... | {
"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_42 | {
"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 isAttribute_fieldWithoutSetter() {\n\n unitTestBuilder\n .useSource(JavaFileObjectUtils.readFromResource(\"testcases.beanutils/FieldLevelTestcases.java\"))\n .useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Over... | {
"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 isAttribute(VariableElement field) {\n\n return checkHasSetter(field) && checkHasGetter(field);\n\n }",
"class_method_signature": "BeanUtils.isAttribute(VariableElement field)",
"constructor": false,
"full_signature": "public static boolean isAttribute(VariableElement ... | {
"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_273 | {
"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_isEnum() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtils.getAnn... | {
"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 isEnum(AnnotationValue annotationValue) {\n return hasAnnotationValueOneOfPassedTypes(annotationValue, VariableElement.class);\n }",
"class_method_signature": "AnnotationValueUtils.isEnum(AnnotationValue annotationValue)",
"constructor": false,
"full_signature": "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_336 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/DoubleOperandTest.java",
"identifier": "DoubleOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getOperandsJavaType() {\n\n MatcherAssert.assertThat(new DoubleOperand(\"6.0\").getOperandsJavaType(), Matchers.equalTo((Class) Double.class));\n\n }",
"class_method_signature": "DoubleOperandTest.test_getOperandsJavaType()",
"constructor": false,
"full_signature... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/DoubleOperand.java",
"identifier": "DoubleOperand",
"interfaces": "",
"methods": [
{
"class_method_signature": "DoubleOperand.DoubleOperand( String expressionString)",
"c... | {
"body": "@Override\n public Class<Double> getOperandsJavaType() {\n return Double.class;\n }",
"class_method_signature": "DoubleOperand.getOperandsJavaType()",
"constructor": false,
"full_signature": "@Override public Class<Double> 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_224 | {
"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_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/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_15 | {
"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 checkElementWithAnnotationMirrorAndAnnotationValue() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n ... | {
"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_361 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ParseUtilitiesTest.java",
"identifier": "ParseUtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void parseNamedAttributes_parseAttributes() {\n String stringToParse = \" abc : '/val1' , def : 'v.a.l2',hij:'val 3' \";\n\n Map<String, String> map = ParseUtilities.parseNamedAttributes(stringToParse);\n\n MatcherAssert.assertThat(map.get(\"abc\"), Matchers.is(\"/val... | {
"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": "public static Map<String, String> parseNamedAttributes(String attributeString) {\n\n Map<String, String> attributeMap = new HashMap<>();\n final String attributePatternString = \"\\\\s*(\\\\w+)\\\\s*:\\\\s*'(.*?)'\\\\s*\";\n\n Pattern attributePattern = Pattern.compile(\"(\" + attribut... | {
"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_232 | {
"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_match() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n TypeElement tmpElement = TypeUtils.TypeRetrieval.get... | {
"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_377 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/VariableTextTemplateBlockTest.java",
"identifier": "VariableTextTemplateBlockTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = InvalidPathException.class)\n public void test_getContent_invalidPath() {\n\n VariableTextTemplateBlock unit = new VariableTextTemplateBlock(\"abc\");\n\n Map<String,Object> model = new HashMap<String, Object>();\n\n unit.getContent(model);\n\n }",
"class_metho... | {
"fields": [
{
"declarator": "accessPath",
"modifier": "private final",
"original_string": "private final String accessPath;",
"type": "String",
"var_name": "accessPath"
}
],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/templateblock... | {
"body": "@Override\n public String getContent(Map<String, Object> variables) {\n\n\n Expression expression = ExpressionParser.parseExpression(accessPath, variables);\n Operand result = expression.evaluateExpression();\n\n return result.value() != null ? result.value().toString() : null;\n\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_265 | {
"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 typeUtils_typeRetrieval_getTypes_getEncapsulatedTypesInstance() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(Ty... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/TypeUtils.java",
"identifier": "TypeUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeUtils.TypeUtils()",
"constructor": true,
"full_signature": "private Type... | {
"body": "public static Types getTypes() {\n return ProcessingEnvironmentUtils.getTypes();\n }",
"class_method_signature": "TypeUtils.getTypes()",
"constructor": false,
"full_signature": "public static Types getTypes()",
"identifier": "getTypes",
"invocations": [
"getTypes"
],
"modifiers"... | {
"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_54 | {
"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 shouldExecuteSuccessfullySetterAnnotatedField() {\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_320 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/NullValueOperandTest.java",
"identifier": "NullValueOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getOperandsJavaType() {\n\n MatcherAssert.assertThat(new NullValueOperand(\"null\").getOperandsJavaType(), Matchers.nullValue());\n\n }",
"class_method_signature": "NullValueOperandTest.test_getOperandsJavaType()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/NullValueOperand.java",
"identifier": "NullValueOperand",
"interfaces": "",
"methods": [
{
"class_method_signature": "NullValueOperand.NullValueOperand(String expressionString)... | {
"body": "@Override\n public Class<Object> getOperandsJavaType() {\n return null;\n }",
"class_method_signature": "NullValueOperand.getOperandsJavaType()",
"constructor": false,
"full_signature": "@Override public Class<Object> getOperandsJavaType()",
"identifier": "getOperandsJavaType",
"invo... | {
"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_137 | {
"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 byParameterTypeMirrorMatcher_match_withGenericParameter() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // First get testclass\n ... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeMirrorMatcher.java",
"identifier": "ByParameterTypeMirrorMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, TypeMirror[]>",
"methods": [
{
"class... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, TypeMirror[] toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n\n // check if number of parameters is the same\n if (element.getParameters().siz... | {
"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_160 | {
"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_noMatch() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n List<? extends Element> result = ElementUtils.AccessEnc... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByReturnTypeFqnMatcher.java",
"identifier": "ByReturnTypeFqnMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, String>",
"methods": [
{
"class_method_signature"... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, String 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.isTypeE... | {
"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_97 | {
"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 checkMatchingParameter() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n TypeElement typeElement = TypeUtils.TypeRetrieval.getTypeElement(I... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsParameterMatcher.java",
"identifier": "IsParameterMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsParameterMatcher.chec... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isParameter(element);\n }",
"class_method_signature": "IsParameterMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element)",
"id... | {
"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_78 | {
"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_shouldBeAbleToCompareGenericType() {\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n\n @Override\n protected void testCase(TypeElement element) {\n\n\n List<? e... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByGenericTypeMatcher.java",
"identifier": "ByGenericTypeMatcher",
"interfaces": "implements CriteriaMatcher<Element, GenericType>",
"methods": [
{
"class_method_signature": "ByGene... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, GenericType toCheckFor) {\n\n return (element != null && toCheckFor != null) && TypeUtils.Generics.genericTypeEquals(element.asType(), toCheckFor);\n\n }",
"class_method_signature": "ByGenericTypeMatcher.checkForMatch... | {
"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_249 | {
"fields": [
{
"declarator": "SUCCEEDING_MATCHER = new TestCriteriaMatcher(true)",
"modifier": "private static final",
"original_string": "private static final TestCriteriaMatcher SUCCEEDING_MATCHER = new TestCriteriaMatcher(true);",
"type": "TestCriteriaMatcher",
"var_name": "SUCCE... | {
"body": "@Test\n public void validateByValidatorKind_atLeastOneOf_test() {\n\n MatcherAssert.assertThat(\"Should be validated as true\", unit.validateByValidatorKind(CriteriaElementValidatorImpl.ValidatorKind.HAS_AT_LEAST_ONE_OF, SUCCEEDING_MATCHER, element, \"TEST\"));\n MatcherAssert.assertThat(\... | {
"fields": [
{
"declarator": "INSTANCE = new CriteriaElementValidatorImpl()",
"modifier": "public static",
"original_string": "public static CriteriaElementValidatorImpl INSTANCE = new CriteriaElementValidatorImpl();",
"type": "CriteriaElementValidatorImpl",
"var_name": "INSTANCE"
... | {
"body": "@SafeVarargs\n public final <ELEMENT extends Element, CRITERIA, MATCHER extends CriteriaMatcher<ELEMENT, CRITERIA>> boolean validateByValidatorKind(ValidatorKind validatorKind, MATCHER matcher, ELEMENT element, CRITERIA... criteriaToCheck) {\n\n if (validatorKind == null) {\n return fa... | {
"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_2 | {
"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_classAttributeWithExplicitAttributeName_LongClassValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n List<? extends... | {
"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 getClassAttributeFromAnnotationAsFqn(Element element, Class<? extends Annotation> annotationType) {\n return getClassAttributeFromAnnotationAsFqn(element, annotationType, \"value\");\n }",
"class_method_signature": "AnnotationUtils.getClassAttributeFromAnnotationAsFqn(Eleme... | {
"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_176 | {
"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 checkMismatchingConstructor() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for non constr... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsConstructorMatcher.java",
"identifier": "IsConstructorMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsConstructorMatche... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isConstructor(element);\n }",
"class_method_signature": "IsConstructorMatcher.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_199 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByNameRegexMatcher()",
"modifier": "private"... | {
"body": "@Test\n public void test_checkForMatchingCharacteristic_nullValuedElement() {\n\n MatcherAssert.assertThat(\"Should return false in case of null valued element\", !unit.checkForMatchingCharacteristic(null, NAME));\n\n }",
"class_method_signature": "ByNameRegexMatcherTest.test_checkForMatchin... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByNameRegexMatcher.java",
"identifier": "ByNameRegexMatcher",
"interfaces": "implements CriteriaMatcher<Element, String>",
"methods": [
{
"class_method_signature": "ByNameRegexMatc... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n if (element != null && toCheckFor != null) {\n\n Pattern pattern = Pattern.compile(toCheckFor);\n return pattern.matcher(element.getSimpleName().toString()).matches();\n\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_81 | {
"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_shouldNotBeAbleToCompareGenericTypeWithWildcards() {\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n\n @Override\n protected void testCase(TypeElement element) {\n\n\n ... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByGenericTypeMatcher.java",
"identifier": "ByGenericTypeMatcher",
"interfaces": "implements CriteriaMatcher<Element, GenericType>",
"methods": [
{
"class_method_signature": "ByGene... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, GenericType toCheckFor) {\n\n return (element != null && toCheckFor != null) && TypeUtils.Generics.genericTypeEquals(element.asType(), toCheckFor);\n\n }",
"class_method_signature": "ByGenericTypeMatcher.checkForMatch... | {
"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_121 | {
"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_nullValues() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n\n List<? extends Element> result = ElementUtils.Acce... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByReturnTypeMirrorMatcher.java",
"identifier": "ByReturnTypeMirrorMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, TypeMirror>",
"methods": [
{
"class_method_... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, TypeMirror 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.isT... | {
"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_39 | {
"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 getGetterName_nonBooleanFieldWithLombokGetter() {\n\n unitTestBuilder\n .useSource(JavaFileObjectUtils.readFromResource(\"testcases.beanutils/FieldLevelTestcases.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 String getGetterMethodName(VariableElement field) {\n\n if (field == null || field.getKind() != ElementKind.FIELD) {\n return null;\n }\n\n TypeElement typeElement = (TypeElement) ElementUtils.AccessEnclosingElements.getFirstEnclosingElementOfKind(field, Elemen... | {
"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_208 | {
"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_getStringRepresentationOfPassedCharacteristic_happyPath() {\n\n MatcherAssert.assertThat(\"Should return enum name\", unit.getStringRepresentationOfPassedCharacteristic(NAME).equals(NAME));\n\n }",
"class_method_signature": "ByNameMatcherTest.test_getStringRepresenta... | {
"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 String getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor) {\n return toGetStringRepresentationFor;\n }",
"class_method_signature": "ByNameMatcher.getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor)",
"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_290 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/UtilitiesTest.java",
"identifier": "UtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void convertVarargsToSet_singleNullValue_shouldReturnEmptySet() {\n\n MatcherAssert.assertThat(Utilities.convertVarargsToSet(null), Matchers.empty());\n\n }",
"class_method_signature": "UtilitiesTest.convertVarargsToSet_singleNullValue_shouldReturnEmptySet()",
"constructor":... | {
"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> Set<T> convertVarargsToSet(T... varargs) {\n\n return varargs != null ? new HashSet<>(Arrays.asList(varargs)) : new HashSet<T>();\n\n }",
"class_method_signature": "Utilities.convertVarargsToSet(T... varargs)",
"constructor": false,
"full_signature": "@Sa... | {
"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_156 | {
"fields": [
{
"declarator": "testField",
"modifier": "private",
"original_string": "private PublicNoargConstructorNextToOtherConstructors testField;",
"type": "PublicNoargConstructorNextToOtherConstructors",
"var_name": "testField"
},
{
"declarator": "unitTestBuilder ... | {
"body": "@Test\n public void checkWithPublicNoargConstructorNextToOtherConstructors() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n Element testElement = FluentElemen... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/HasPublicNoargConstructorMatcher.java",
"identifier": "HasPublicNoargConstructorMatcher",
"interfaces": "implements ImplicitMatcher<Element>",
"methods": [
{
"class_method_signatur... | {
"body": "@Override\n public boolean check(Element element) {\n\n if (element == null) {\n return false;\n }\n\n\n // check if underlying TypeElement can be found for element\n TypeElement typeElement = TypeUtils.TypeRetrieval.getTypeElement(element.asType());\n if (t... | {
"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_382 | {
"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() {\n IncludeTemplateBlock unit = new IncludeTemplateBlock(\"resource : '/IncludeTemplateBlockTest.tpl'\",\"\");\n\n Map<String, Object> model = new HashMap<String, Object>();\n Map<String, Object> subModel = new HashMap<String, Objec... | {
"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_19 | {
"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_allMatching() {\n\n ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>> unit =\n new ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>>(TestCoreMatcherFactory.createElementBasedImplicitCoreM... | {
"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_228 | {
"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_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/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_101 | {
"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 checkMismatchingMethod_class() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for non metho... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsInterfaceMatcher.java",
"identifier": "IsInterfaceMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsInterfaceMatcher.chec... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isInterface(element);\n }",
"class_method_signature": "IsInterfaceMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element)",
"id... | {
"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_394 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/TemplateProcessorTest.java",
"identifier": "TemplateProcessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testTemplateFile_withNonExistingFile() {\n\n Map<String, Object> map = new HashMap<String, Object>();\n map.put(\"test\", \"YEP\");\n\n TemplateProcessor.processTemplateResourceFile(\"/XXX.tpl\", map);\n\n\n }",
"cl... | {
"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 processTemplateResourceFile(String templateFileName, Map<String, Object> values) {\n\n String templateString = null;\n try {\n templateString = ParseUtilities.readResourceToString(templateFileName);\n } catch (Exception e) {\n throw new Illega... | {
"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_117 | {
"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/IsPackageMatcher.java",
"identifier": "IsPackageMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsPackageMatcher.check(ELEM... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isPackage(element);\n }",
"class_method_signature": "IsPackageMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element)",
"identi... | {
"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_58 | {
"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 shouldExecuteSuccessfullyDataAnnotatedClass() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n Typ... | {
"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_269 | {
"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_isDouble() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtils.getA... | {
"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 isDouble(AnnotationValue annotationValue) {\n return hasAnnotationValueOneOfPassedTypes(annotationValue, Double.class);\n }",
"class_method_signature": "AnnotationValueUtils.isDouble(AnnotationValue annotationValue)",
"constructor": false,
"full_signature": "public sta... | {
"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_286 | {
"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_getAnnotationValueOfAttribute() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror =... | {
"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 AnnotationMirror getAnnotationValue(AnnotationValue annotationValue) {\n return !isAnnotation(annotationValue) ? null : (AnnotationMirror) annotationValue.getValue();\n }",
"class_method_signature": "AnnotationValueUtils.getAnnotationValue(AnnotationValue annotationValue)",
"con... | {
"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_140 | {
"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_nullValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeMirrorMatcher.java",
"identifier": "ByParameterTypeMirrorMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, TypeMirror[]>",
"methods": [
{
"class... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(TypeMirror[] toGetStringRepresentationFor) {\n\n if (toGetStringRepresentationFor != null) {\n StringBuilder stringBuilder = new StringBuilder(\"[\");\n boolean isFirst = true;\n for (TypeMirr... | {
"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_357 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_testInbetweenWhitespaces1() {\n\n Expression expression = ExpressionParser.parseExpression(\"5== 5\");\n MatcherAssert.assertThat((Boolean) expression.evaluateExpression().value(), Matchers.is(true));\n\n }",
"class_method_signature": "Expre... | {
"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_23 | {
"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_inverted_oneNotMatching() {\n\n ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>> unit =\n new ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>>(TestCoreMatcherFactory.createElementBasedI... | {
"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_212 | {
"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_nullValuedElement() {\n\n MatcherAssert.assertThat(\"Should return false in case of null valued element\", !unit.checkForMatchingCharacteristic(null, NAME));\n\n }",
"class_method_signature": "ByNameMatcherTest.test_checkForMatchingChar... | {
"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_300 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/AbstractAnnotationProcessorTest.java",
"identifier": "AbstractAnnotationProcessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createSupportedAnnotationSet_withNullParameter() {\n\n MatcherAssert.assertThat(AbstractAnnotationProcessor.createSupportedAnnotationSet(null), Matchers.<String>empty());\n MatcherAssert.assertThat(AbstractAnnotationProcessor.createSupportedAnnotationSet(Override.class,... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/AbstractAnnotationProcessor.java",
"identifier": "AbstractAnnotationProcessor",
"interfaces": "",
"methods": [
{
"class_method_signature": "AbstractAnnotationProcessor.init(ProcessingEnvironment proc... | {
"body": "@SafeVarargs\n protected static Set<String> createSupportedAnnotationSet(Class<? extends Annotation>... annotationTypes) {\n Set<String> result = new HashSet<>();\n\n if (annotationTypes != null) {\n for (Class<? extends Annotation> annotationType : annotationTypes) {\n\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_245 | {
"fields": [
{
"declarator": "SUCCEEDING_MATCHER = new TestCriteriaMatcher(true)",
"modifier": "private static final",
"original_string": "private static final TestCriteriaMatcher SUCCEEDING_MATCHER = new TestCriteriaMatcher(true);",
"type": "TestCriteriaMatcher",
"var_name": "SUCCE... | {
"body": "@Test\n public void validateByValidatorKind_oneOf_test() {\n\n MatcherAssert.assertThat(\"Should be validated as true\", unit.validateByValidatorKind(CriteriaElementValidatorImpl.ValidatorKind.HAS_ONE_OF, SUCCEEDING_MATCHER, element, \"TEST\"));\n MatcherAssert.assertThat(\"Should be valid... | {
"fields": [
{
"declarator": "INSTANCE = new CriteriaElementValidatorImpl()",
"modifier": "public static",
"original_string": "public static CriteriaElementValidatorImpl INSTANCE = new CriteriaElementValidatorImpl();",
"type": "CriteriaElementValidatorImpl",
"var_name": "INSTANCE"
... | {
"body": "@SafeVarargs\n public final <ELEMENT extends Element, CRITERIA, MATCHER extends CriteriaMatcher<ELEMENT, CRITERIA>> boolean validateByValidatorKind(ValidatorKind validatorKind, MATCHER matcher, ELEMENT element, CRITERIA... criteriaToCheck) {\n\n if (validatorKind == null) {\n return fa... | {
"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_74 | {
"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 checkMatchingEnum() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n TypeElement typeElement = TypeUtils.TypeRetrieval.getTypeElement(IsEnum... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsEnumMatcher.java",
"identifier": "IsEnumMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsEnumMatcher.check(ELEMENT eleme... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isEnum(element);\n }",
"class_method_signature": "IsEnumMatcher.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_183 | {
"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_withNullValue() {\n\n MatcherAssert.assertThat(CoreMatchers.HAS_NO_THROWN_TYPES.getMatcher().check(null), Matchers.is(false));\n\n }",
"class_method_signature": "HasNoThrownTypesMatcherTest.test_check_withNullValue()",
"constructor": false,
"full_signature"... | {
"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_316 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/OperandTest.java",
"identifier": "OperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void OperandType_getOperand_testBoolean_true() {\n MatcherAssert.assertThat(OperandType.getOperandType(\"true\"), Matchers.is(OperandType.BOOLEAN));\n }",
"class_method_signature": "OperandTest.OperandType_getOperand_testBoolean_true()",
"constructor": false,
"full_signatu... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/Operand.java",
"identifier": "Operand",
"interfaces": "",
"methods": [
{
"class_method_signature": "Operand.Operand()",
"constructor": true,
"full_signature": "publ... | {
"body": "public abstract OperandType getOperandType();",
"class_method_signature": "Operand.getOperandType()",
"constructor": false,
"full_signature": "public abstract OperandType getOperandType()",
"identifier": "getOperandType",
"invocations": [],
"modifiers": "public abstract",
"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_62 | {
"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 shouldExecuteSuccessfullyMixedGetterAndSetterAnnotatedClassAndField2() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n ... | {
"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_253 | {
"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 testGetMessaggerUtils() {\n\n MatcherAssert.assertThat(unit.getMessager(), Matchers.is(messager));\n\n }",
"class_method_signature": "MessagerUtilsTest.testGetMessaggerUtils()",
"constructor": false,
"full_signature": "@Test public void testGetMessaggerUtils()",
"id... | {
"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 Messager getMessager() {\n return ProcessingEnvironmentUtils.getMessager();\n }",
"class_method_signature": "MessagerUtils.getMessager()",
"constructor": false,
"full_signature": "public static Messager getMessager()",
"identifier": "getMessager",
"invocations": [
"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_195 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByNameRegexMatcher()",
"modifier": "private"... | {
"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": "ByNameRegexMatcherTe... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByNameRegexMatcher.java",
"identifier": "ByNameRegexMatcher",
"interfaces": "implements CriteriaMatcher<Element, String>",
"methods": [
{
"class_method_signature": "ByNameRegexMatc... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor) {\n return toGetStringRepresentationFor;\n }",
"class_method_signature": "ByNameRegexMatcher.getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor)",
"co... | {
"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_341 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void parseExpression_parseNegation_negatedFalse_Test() {\n Expression expression = ExpressionParser.parseExpression(\"!false\");\n\n MatcherAssert.assertThat(expression.getOperands().length, Matchers.is(1));\n MatcherAssert.assertThat(expression.getOperationTypes().le... | {
"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_204 | {
"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_methodWith2Parameters() {\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_35 | {
"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 fieldWithoutSetter_checkHasLombokSetter() {\n\n unitTestBuilder\n .useSource(JavaFileObjectUtils.readFromResource(\"testcases.beanutils/LombokDataOnClass.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 boolean checkHasSetter(VariableElement field) {\n\n if (field == null || field.getKind() != ElementKind.FIELD) {\n return false;\n }\n\n TypeElement typeElement = ElementUtils.AccessEnclosingElements.<TypeElement>getFirstEnclosingElementOfKind(field, ElementKin... | {
"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_340 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void parseExpression_parseNegation_negatedTrue_Test() {\n Expression expression = ExpressionParser.parseExpression(\"!true\");\n\n MatcherAssert.assertThat(expression.getOperands().length, Matchers.is(1));\n MatcherAssert.assertThat(expression.getOperationTypes().leng... | {
"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_205 | {
"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_nullValue() {\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n List<? extends Element> result = ElementUtils.AccessE... | {
"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_34 | {
"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 fieldWithoutSetter_checkHasSetter() {\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 checkHasSetter(VariableElement field) {\n\n if (field == null || field.getKind() != ElementKind.FIELD) {\n return false;\n }\n\n TypeElement typeElement = ElementUtils.AccessEnclosingElements.<TypeElement>getFirstEnclosingElementOfKind(field, ElementKin... | {
"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_194 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByNameRegexMatcher()",
"modifier": "private"... | {
"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": "ByNameRegexMatcherTest.test_getStringRepre... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByNameRegexMatcher.java",
"identifier": "ByNameRegexMatcher",
"interfaces": "implements CriteriaMatcher<Element, String>",
"methods": [
{
"class_method_signature": "ByNameRegexMatc... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor) {\n return toGetStringRepresentationFor;\n }",
"class_method_signature": "ByNameRegexMatcher.getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor)",
"co... | {
"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_317 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/OperandTest.java",
"identifier": "OperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void OperandType_getOperand_testBoolean_false() {\n MatcherAssert.assertThat(OperandType.getOperandType(\"false\"), Matchers.is(OperandType.BOOLEAN));\n }",
"class_method_signature": "OperandTest.OperandType_getOperand_testBoolean_false()",
"constructor": false,
"full_sign... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/Operand.java",
"identifier": "Operand",
"interfaces": "",
"methods": [
{
"class_method_signature": "Operand.Operand()",
"constructor": true,
"full_signature": "publ... | {
"body": "public abstract OperandType getOperandType();",
"class_method_signature": "Operand.getOperandType()",
"constructor": false,
"full_signature": "public abstract OperandType getOperandType()",
"identifier": "getOperandType",
"invocations": [],
"modifiers": "public abstract",
"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_63 | {
"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 shouldExecuteSuccessfullyMixedGetterAndSetterAnnotatedClassAndField2_() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n ... | {
"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_252 | {
"fields": [
{
"declarator": "SUCCEEDING_MATCHER = new TestCriteriaMatcher(true)",
"modifier": "private static final",
"original_string": "private static final TestCriteriaMatcher SUCCEEDING_MATCHER = new TestCriteriaMatcher(true);",
"type": "TestCriteriaMatcher",
"var_name": "SUCCE... | {
"body": "@Test\n public void validateByValidatorKind_allOf_nullSafety_test() {\n\n TestCriteriaMatcher matcherSpy = Mockito.spy(SUCCEEDING_MATCHER);\n\n // matcher == null\n MatcherAssert.assertThat(\"Should return false if matcher is null\", !unit.validateByValidatorKind(CriteriaElementVali... | {
"fields": [
{
"declarator": "INSTANCE = new CriteriaElementValidatorImpl()",
"modifier": "public static",
"original_string": "public static CriteriaElementValidatorImpl INSTANCE = new CriteriaElementValidatorImpl();",
"type": "CriteriaElementValidatorImpl",
"var_name": "INSTANCE"
... | {
"body": "@SafeVarargs\n public final <ELEMENT extends Element, CRITERIA, MATCHER extends CriteriaMatcher<ELEMENT, CRITERIA>> boolean validateByValidatorKind(ValidatorKind validatorKind, MATCHER matcher, ELEMENT element, CRITERIA... criteriaToCheck) {\n\n if (validatorKind == null) {\n return fa... | {
"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_182 | {
"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 getStringRepresentationOfPassedCharacteristic_getStringRepresentation() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.asser... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsAssignableToMatcher.java",
"identifier": "IsAssignableToMatcher",
"interfaces": "implements CriteriaMatcher<Element, Class>",
"methods": [
{
"class_method_signature": "IsAssignab... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(Class toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.getCanonicalName() : null;\n }",
"class_method_signature": "IsAssignableToMatcher.getStringRepresentation... | {
"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_301 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/AbstractAnnotationProcessorTest.java",
"identifier": "AbstractAnnotationProcessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void wrapToArrayt_withNullParameter() {\n\n MatcherAssert.assertThat(\"Should return null\", AbstractAnnotationProcessor.wrapToArray((String) null)[0] == null);\n\n Class[] resultArray = AbstractAnnotationProcessor.wrapToArray(Override.class, null, Ignore.class);\n Ma... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/AbstractAnnotationProcessor.java",
"identifier": "AbstractAnnotationProcessor",
"interfaces": "",
"methods": [
{
"class_method_signature": "AbstractAnnotationProcessor.init(ProcessingEnvironment proc... | {
"body": "@SafeVarargs\n public static <T> T[] wrapToArray(T... element) {\n return element;\n }",
"class_method_signature": "AbstractAnnotationProcessor.wrapToArray(T... element)",
"constructor": false,
"full_signature": "@SafeVarargs public static T[] wrapToArray(T... 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_244 | {
"fields": [
{
"declarator": "SUCCEEDING_MATCHER = new TestCriteriaMatcher(true)",
"modifier": "private static final",
"original_string": "private static final TestCriteriaMatcher SUCCEEDING_MATCHER = new TestCriteriaMatcher(true);",
"type": "TestCriteriaMatcher",
"var_name": "SUCCE... | {
"body": "@Test\n public void validateByValidatorKind_null_safety_test() {\n\n TestCriteriaMatcher matcherSpy = Mockito.spy(SUCCEEDING_MATCHER);\n\n MatcherAssert.assertThat(\"Should return false if validator kind is null\", !unit.validateByValidatorKind(null, matcherSpy, element, \"TEST\"));\n ... | {
"fields": [
{
"declarator": "INSTANCE = new CriteriaElementValidatorImpl()",
"modifier": "public static",
"original_string": "public static CriteriaElementValidatorImpl INSTANCE = new CriteriaElementValidatorImpl();",
"type": "CriteriaElementValidatorImpl",
"var_name": "INSTANCE"
... | {
"body": "@SafeVarargs\n public final <ELEMENT extends Element, CRITERIA, MATCHER extends CriteriaMatcher<ELEMENT, CRITERIA>> boolean validateByValidatorKind(ValidatorKind validatorKind, MATCHER matcher, ELEMENT element, CRITERIA... criteriaToCheck) {\n\n if (validatorKind == null) {\n return fa... | {
"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_75 | {
"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 checkMisatchingEnum_class() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for non enum : \... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsEnumMatcher.java",
"identifier": "IsEnumMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsEnumMatcher.check(ELEMENT eleme... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isEnum(element);\n }",
"class_method_signature": "IsEnumMatcher.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_356 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_testTrailingWhitespacesInBraces() {\n\n Expression expression = ExpressionParser.parseExpression(\"(5==5 )\");\n MatcherAssert.assertThat((Boolean) expression.evaluateExpression().value(), Matchers.is(true));\n\n }",
"class_method_signature":... | {
"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_22 | {
"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_inverted_allMatching() {\n\n ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>> unit =\n new ImplicitFilter<Element, ImplicitValidator<Element, ImplicitMatcher<Element>>>(TestCoreMatcherFactory.createElementBasedImpl... | {
"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_213 | {
"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_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/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_141 | {
"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_getStringRepresentation() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.asser... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeMirrorMatcher.java",
"identifier": "ByParameterTypeMirrorMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, TypeMirror[]>",
"methods": [
{
"class... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(TypeMirror[] toGetStringRepresentationFor) {\n\n if (toGetStringRepresentationFor != null) {\n StringBuilder stringBuilder = new StringBuilder(\"[\");\n boolean isFirst = true;\n for (TypeMirr... | {
"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_59 | {
"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 shouldExecuteSuccessfullyGetterAnnotatedClass() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n\n ... | {
"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_268 | {
"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_isFloat() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtils.getAn... | {
"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 isFloat(AnnotationValue annotationValue) {\n return hasAnnotationValueOneOfPassedTypes(annotationValue, Float.class);\n }",
"class_method_signature": "AnnotationValueUtils.isFloat(AnnotationValue annotationValue)",
"constructor": false,
"full_signature": "public static... | {
"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_287 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/UtilitiesTest.java",
"identifier": "UtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void convertArrayToSet_nullValue() {\n\n MatcherAssert.assertThat(Utilities.convertArrayToSet(null), Matchers.nullValue());\n\n }",
"class_method_signature": "UtilitiesTest.convertArrayToSet_nullValue()",
"constructor": false,
"full_signature": "@Test public void convertAr... | {
"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": "public static <T> Set<T> convertArrayToSet(T[] array) {\n\n if (array == null) {\n return null;\n }\n\n Set<T> set = new HashSet<>(array.length);\n\n for (T element : array) {\n\n // don't add null values to set\n if (element != null) {\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_116 | {
"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 checkMismatchingPackageElement_class() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for n... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsPackageMatcher.java",
"identifier": "IsPackageMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsPackageMatcher.check(ELEM... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isPackage(element);\n }",
"class_method_signature": "IsPackageMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element)",
"identi... | {
"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"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.