id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
86808110_179 | {
"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 checkMismatchingAssignableToCase() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for misma... | {
"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 boolean checkForMatchingCharacteristic(Element element, Class toCheckFor) {\n return element != null && toCheckFor != null && TypeUtils.getTypes()\n .isAssignable(\n element.asType(),\n TypeUtils.TypeRetrieval.getType... | {
"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_207 | {
"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 unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n\n MatcherAssert.asser... | {
"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 String getStringRepresentationOfPassedCharacteristic(Integer toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.toString() : null;\n }",
"class_method_signature": "ByNumberOfParametersMatcher.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_36 | {
"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_checkHasLombokGetterOnClass() {\n\n unitTestBuilder\n .useSource(JavaFileObjectUtils.readFromResource(\"testcases.beanutils/LombokGetterOnClass.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_342 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void parseExpression_parseNegation_bracesA_Test() {\n\n MatcherAssert.assertThat((Boolean) ExpressionParser.parseExpression(\"'' + (40 * (2+3)) == '200'\").evaluateExpression().value(), Matchers.is(true));\n\n\n MatcherAssert.assertThat((Boolean) ExpressionParser.parseExpres... | {
"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_159 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild... | {
"body": "@Test\n public void byReturnTypeMirrorMatcher_match() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n\n // find field\n List<? extends Element> ... | {
"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_335 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/DoubleOperandTest.java",
"identifier": "DoubleOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void test_passedNullValue() {\n new DoubleOperand(null).value();\n }",
"class_method_signature": "DoubleOperandTest.test_passedNullValue()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.class)... | {
"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 Double value() {\n return Double.valueOf(getExpressionString());\n }",
"class_method_signature": "DoubleOperand.value()",
"constructor": false,
"full_signature": "@Override public Double value()",
"identifier": "value",
"invocations": [
"valueOf",
"getExpre... | {
"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_41 | {
"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_fieldWithBothGetterAndSetter() {\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 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_270 | {
"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_isBoolean() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtils.get... | {
"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 isBoolean(AnnotationValue annotationValue) {\n return hasAnnotationValueOneOfPassedTypes(annotationValue, Boolean.class);\n }",
"class_method_signature": "AnnotationValueUtils.isBoolean(AnnotationValue annotationValue)",
"constructor": false,
"full_signature": "public ... | {
"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_362 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ParseUtilitiesTest.java",
"identifier": "ParseUtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void extractModelFromString_correctUsage() {\n\n\n // PREPARE INPUT\n Map<String, Object> outerModel = new HashMap<>();\n Map<String, Object> outerModelModel = new HashMap<>();\n outerModel.put(\"model\", outerModelModel);\n outerModelModel.put(\"value1\... | {
"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, Object> extractModelFromString(Map<String, Object> outerModel, String modelString) {\n\n if (outerModel == null) {\n throw new IllegalArgumentException(\"passed outerModel must not be null\");\n }\n if (modelString == null) {\n throw new ... | {
"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_227 | {
"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_nullValuedElement() {\n\n MatcherAssert.assertThat(\"Should return false in case of null valued element\", !unit.checkForMatchingCharacteristic(null, NAME));\n\n }",
"class_method_signature": "ByQualifiedNameRegexMatcherTest.test_checkF... | {
"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_16 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/generators/SimpleResourceReaderTest.java",
"identifier": "SimpleResourceReaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReadAsString() throws IOException {\n\n final String RESOURCE_STRING = \"abc\\ndef\\nhij\";\n\n FileObject fileObject = Mockito.mock(FileObject.class);\n StringReader stringReader = Mockito.spy(new StringReader(RESOURCE_STRING));\n Mockito.when(fileObj... | {
"fields": [
{
"declarator": "fileObject",
"modifier": "private final",
"original_string": "private final FileObject fileObject;",
"type": "FileObject",
"var_name": "fileObject"
},
{
"declarator": "foReader",
"modifier": "private final",
"original_string": ... | {
"body": "public String readAsString() throws IOException {\n\n char[] buffer = new char[10000];\n CharArrayWriter writer = new CharArrayWriter();\n\n int line = 0;\n // read bytes from stream, and store them in buffer\n while ((line = foReader.read(buffer)) != -1) {\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_118 | {
"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/IsSetterMethodMatcher.java",
"identifier": "IsSetterMethodMatcher",
"interfaces": "implements ImplicitMatcher<ExecutableElement>",
"methods": [
{
"class_method_signature": "IsSette... | {
"body": "@Override\n public boolean check(ExecutableElement element) {\n\n if (element == null) {\n return false;\n }\n\n return 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_374 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/PlainTextTemplateBlockTest.java",
"identifier": "PlainTextTemplateBlockTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getTemplateBlockType() {\n MatcherAssert.assertThat(new PlainTextTemplateBlock(\"\").getTemplateBlockType(), Matchers.is(TemplateBlockType.PLAIN_TEXT));\n }",
"class_method_signature": "PlainTextTemplateBlockTest.test_getTemplateBlockType()",
"constructor": false,
... | {
"fields": [
{
"declarator": "content",
"modifier": "private final",
"original_string": "private final String content;",
"type": "String",
"var_name": "content"
}
],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/PlainTe... | {
"body": "@Override\n public TemplateBlockType getTemplateBlockType() {\n return TemplateBlockType.PLAIN_TEXT;\n }",
"class_method_signature": "PlainTextTemplateBlock.getTemplateBlockType()",
"constructor": false,
"full_signature": "@Override public TemplateBlockType getTemplateBlockType()",
"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_231 | {
"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_passedNullValue_shouldReturnNull() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAss... | {
"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 String getStringRepresentationOfPassedCharacteristic(Class toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.getCanonicalName() : null;\n }",
"class_method_signature": "ByRawTypeMatcher.getStringRepresentationOfPas... | {
"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_323 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/BooleanOperandTest.java",
"identifier": "BooleanOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getOperandsJavaType() {\n\n MatcherAssert.assertThat(new BooleanOperand(\"true\").getOperandsJavaType(), Matchers.equalTo((Class) Boolean.class));\n\n }",
"class_method_signature": "BooleanOperandTest.test_getOperandsJavaType()",
"constructor": false,
"full_signa... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/BooleanOperand.java",
"identifier": "BooleanOperand",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanOperand.BooleanOperand(String expressionString)",
... | {
"body": "@Override\n public Class<Boolean> getOperandsJavaType() {\n return Boolean.class;\n }",
"class_method_signature": "BooleanOperand.getOperandsJavaType()",
"constructor": false,
"full_signature": "@Override public Class<Boolean> 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_289 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/UtilitiesTest.java",
"identifier": "UtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void convertVarargsToSet_noValues_shouldReturnEmptySet() {\n\n MatcherAssert.assertThat(Utilities.convertVarargsToSet(), Matchers.empty());\n\n }",
"class_method_signature": "UtilitiesTest.convertVarargsToSet_noValues_shouldReturnEmptySet()",
"constructor": false,
"full_si... | {
"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_266 | {
"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_isLong() {\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 isLong(AnnotationValue annotationValue) {\n return hasAnnotationValueOneOfPassedTypes(annotationValue, Long.class);\n }",
"class_method_signature": "AnnotationValueUtils.isLong(AnnotationValue annotationValue)",
"constructor": false,
"full_signature": "public static bo... | {
"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_57 | {
"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 shouldExecuteSuccessfullyGetterAndSetterAnnotatedMethodWithInvalidParameterType() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement eleme... | {
"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_134 | {
"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\n MatcherAssert.assertThat(\"Shou... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeMatcher.java",
"identifier": "ByParameterTypeMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, Class[]>",
"methods": [
{
"class_method_signature... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(Class[] toGetStringRepresentationFor) {\n if (toGetStringRepresentationFor != null) {\n StringBuilder stringBuilder = new StringBuilder(\"[\");\n boolean isFirst = true;\n for (Class<?> 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_358 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_testInbetweenWhitespaces2() {\n\n Expression expression = ExpressionParser.parseExpression(\"5 ==5\");\n MatcherAssert.assertThat((Boolean) expression.evaluateExpression().value(), Matchers.is(true));\n\n }",
"class_method_signature": "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_163 | {
"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/ByReturnTypeFqnMatcher.java",
"identifier": "ByReturnTypeFqnMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, String>",
"methods": [
{
"class_method_signature"... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor : \"\";\n }",
"class_method_signature": "ByReturnTypeFqnMatcher.getStringRepresentationOfPassedCharacter... | {
"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_94 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild... | {
"body": "@Test\n public void byParameterTypeMatcher_nullValues() {\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/ByParameterTypeFqnMatcher.java",
"identifier": "ByParameterTypeFqnMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, String[]>",
"methods": [
{
"class_method_si... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, String[] 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().size() ... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_1 | {
"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_classAttribute_StringClassValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n List<? extends Element> result = Flue... | {
"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_175 | {
"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 checkMatchingConstructor() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n TypeElement typeElement = TypeUtils.TypeRetrieval.getTypeElement... | {
"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_319 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/NullValueOperandTest.java",
"identifier": "NullValueOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void test_passedNullValue() {\n new BooleanOperand(null).value();\n }",
"class_method_signature": "NullValueOperandTest.test_passedNullValue()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.cl... | {
"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 Object value() {\n return null;\n }",
"class_method_signature": "NullValueOperand.value()",
"constructor": false,
"full_signature": "@Override public Object value()",
"identifier": "value",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_82 | {
"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 checkMatchingMethod() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n TypeElement typeElement = TypeUtils.TypeRetrieval.getTypeElement(IsPa... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsMethodMatcher.java",
"identifier": "IsMethodMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsMethodMatcher.check(ELEMENT... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isMethod(element);\n }",
"class_method_signature": "IsMethodMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element)",
"identifi... | {
"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_122 | {
"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\n MatcherAssert.assertThat(\"Shou... | {
"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 String getStringRepresentationOfPassedCharacteristic(TypeMirror toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.toString() : \"\";\n }",
"class_method_signature": "ByReturnTypeMirrorMatcher.getStringRepresentatio... | {
"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_129 | {
"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/IsExecutableElementMatcher.java",
"identifier": "IsExecutableElementMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsExecu... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CastElement.isExecutableElement(element);\n }",
"class_method_signature": "IsExecutableElementMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_31 | {
"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_checkHasSetter() {\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 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_200 | {
"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_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/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_345 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_withModel_equalOneDynamicNullValue2() {\n\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"value1\", null);\n model.put(\"value2\", 5L);\n\n Expression expression = ExpressionParser.parseExpression(\"value1 ==... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParser.java",
"identifier": "ExpressionParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "ExpressionParser.parseExpression(String expressionString, Map<Strin... | {
"body": "public static Expression parseExpression(String expressionString, Map<String, Object> model) {\n\n ModelPathResolver.modelMapThreadLocal.set(model);\n return parseExpression(expressionString);\n\n }",
"class_method_signature": "ExpressionParser.parseExpression(String expressionString, Ma... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_191 | {
"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_withNullValue() {\n\n MatcherAssert.assertThat(CoreMatchers.HAS_VOID_RETURN_TYPE.getMatcher().check(null), Matchers.is(false));\n\n }",
"class_method_signature": "HasVoidReturnTypeMatcherTest.test_check_withNullValue()",
"constructor": false,
"full_signatur... | {
"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_257 | {
"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_noParameters() {\n\n MatcherAssert.assertThat(MessagerUtils.createMessage(\"TEST ${0}, ${2}, ${1}\"), Matchers.is(\"TEST ${0}, ${2}, ${1}\"));\n\n }",
"class_method_signature": "MessagerUtilsTest.createMessage_noParameters()",
"constructor": false,
"full... | {
"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_66 | {
"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 shouldExecuteSuccessfullyGetterAndSetterAnnotatedField() {\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_89 | {
"fields": [
{
"declarator": "unit = new ByAnnotationMatcher()",
"modifier": "private",
"original_string": "private ByAnnotationMatcher unit = new ByAnnotationMatcher();",
"type": "ByAnnotationMatcher",
"var_name": "unit"
}
],
"file": "annotationprocessor/src/test/java/io/to... | {
"body": "@Test\n public void test_checkForMatchingCharacteristic_nullValuedElement() {\n\n MatcherAssert.assertThat(\"Should retrun false in case of null valued element\", !unit.checkForMatchingCharacteristic(null, TestAnnotation.class));\n\n }",
"class_method_signature": "ByAnnotationMatcherTest.tes... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByAnnotationMatcher.java",
"identifier": "ByAnnotationMatcher",
"interfaces": "implements CriteriaMatcher<Element, Class<? extends Annotation>>",
"methods": [
{
"class_method_signa... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, Class<? extends Annotation> toCheckFor) {\n return element != null && toCheckFor != null && element.getAnnotation(toCheckFor) != null;\n }",
"class_method_signature": "ByAnnotationMatcher.checkForMatchingCharacteristi... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_312 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/OperandTest.java",
"identifier": "OperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void OperandType_getOperand_testNullValue() {\n OperandType.getOperandType(null);\n }",
"class_method_signature": "OperandTest.OperandType_getOperand_testNullValue()",
"constructor": false,
"full_signature": "@Test(expected = Ille... | {
"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_187 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsAttributeFieldMatcherTest.java",
"identifier": "IsAttributeFieldMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_isNoAttributeField_noGetter_shouldReturnFalse() {\n\n CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorUnitTestClassInternal.java\"))\n .useProcessor(new AbstractUnitTestA... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsAttributeFieldMatcher.java",
"identifier": "IsAttributeFieldMatcher",
"interfaces": "implements ImplicitMatcher<VariableElement>",
"methods": [
{
"class_method_signature": "IsAtt... | {
"body": "@Override\n public boolean check(VariableElement element) {\n\n if (element == null || element.getKind() != ElementKind.FIELD) {\n return false;\n }\n\n\n return BeanUtils.isAttribute(element);\n }",
"class_method_signature": "IsAttributeFieldMatcher.check(VariableEl... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_168 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByQualifiedNameMatcher()",
"modifier": "priv... | {
"body": "@Test\n public void test_checkForMatchingCharacteristic_match_method() {\n\n Element element = Mockito.mock(Element.class);\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(NAME);\n\n Mockito.when(element.getKind()).thenRe... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameMatcher.java",
"identifier": "ByQualifiedNameMatcher",
"interfaces": "implements CriteriaMatcher<Element, String>",
"methods": [
{
"class_method_signature": "ByQuali... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n switch (element.getKind()) {\n case ENUM:\n case INTERFACE:\n case ANN... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_70 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/fluentfilter/FluentElementFilterTest.java",
"identifier": "FluentElementFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExecuteCommand() {\n\n final Element element = Mockito.mock(Element.class);\n final ExecutionCounter executionCounter = new ExecutionCounter();\n\n FluentElementFilter.createFluentElementFilter(element).executeCommand(new Command<Element>() {\n @Ov... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final List<ELEMENT> elements;",
"type": "List<ELEMENT>",
"var_name": "elements"
}
],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/f... | {
"body": "public void executeCommand(Command<ELEMENT> command) {\n\n if (command != null) {\n\n for (ELEMENT element : elements) {\n\n command.execute(element);\n\n }\n\n }\n\n }",
"class_method_signature": "FluentElementFilter.executeCommand(Command<ELEMENT> c... | {
"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_241 | {
"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_nullValuedElement() {\n\n MatcherAssert.assertThat(\"Should return false in case of null valued element\", !unit.checkForMatchingCharacteristic(null, Modifier.ABSTRACT));\n\n }",
"class_method_signature": "ByModifierMatcherTest.test_che... | {
"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_304 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/UnaryOperationWrapperOperandTest.java",
"identifier": "UnaryOperationWrapperOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_unaryOperationType_successfulPath_getValue() {\n\n UnaryOperationWrapperOperand unit = new UnaryOperationWrapperOperand(new BooleanOperand(\"true\"), OperationType.NEGATE);\n MatcherAssert.assertThat((Boolean) unit.value(), Matchers.is(false));\n\n unit = ne... | {
"fields": [
{
"declarator": "operand",
"modifier": "private final",
"original_string": "private final Operand operand;",
"type": "Operand",
"var_name": "operand"
},
{
"declarator": "unaryOperationType",
"modifier": "private final",
"original_string": "priv... | {
"body": "@Override\n public Object value() {\n\n if (resultOperand == null) {\n calculateResultOperand();\n }\n\n return resultOperand.value();\n }",
"class_method_signature": "UnaryOperationWrapperOperand.value()",
"constructor": false,
"full_signature": "@Override publi... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_216 | {
"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 checkMismatchingVariableElement_class() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for ... | {
"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_27 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/filter/InclusiveCriteriaElementFilterTest.java",
"identifier": "InclusiveCriteriaElementFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void findByAll_happyPath() {\n\n CompileTestBuilder\n .unitTest()\n .useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n\n @Override\n protected void testCase(TypeElement element) {\n\n ... | {
"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": "@SafeVarargs\n public final <PARAM_ELEMENT extends ELEMENT> List<PARAM_ELEMENT> filterByAllOf(List<PARAM_ELEMENT> elements, CRITERIA... criteriaToCheck) {\n\n return filterByAllOf(elements, false, criteriaToCheck);\n\n }",
"class_method_signature": "InclusiveCriteriaElementFilter.filterByAll... | {
"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_353 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_testLeadingWhitespaces() {\n\n Expression expression = ExpressionParser.parseExpression(\" 5==5\");\n MatcherAssert.assertThat((Boolean) expression.evaluateExpression().value(), Matchers.is(true));\n\n }",
"class_method_signature": "Expression... | {
"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_144 | {
"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/IsPackageElementMatcher.java",
"identifier": "IsPackageElementMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsPackageElem... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CastElement.isPackageElement(element);\n }",
"class_method_signature": "IsPackageElementMatcher.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_282 | {
"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_getStringValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtil... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationValueUtils.java",
"identifier": "AnnotationValueUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "AnnotationValueUtils.AnnotationValueUtils()",
"constructor": ... | {
"body": "public static String getStringValue(AnnotationValue annotationValue) {\n return !isString(annotationValue) ? null : (String) annotationValue.getValue();\n }",
"class_method_signature": "AnnotationValueUtils.getStringValue(AnnotationValue annotationValue)",
"constructor": false,
"full_signat... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_328 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/StringOperandTest.java",
"identifier": "StringOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStringWithEscapedQuotes() {\n\n MatcherAssert.assertThat(new StringOperand(\"'ABC\\\\' DEF'\").value(), Matchers.is(\"ABC' DEF\"));\n MatcherAssert.assertThat(new StringOperand(\"'//%\\\\'&§\\\\'/'\").value(), Matchers.is(\"//%'&§'/\"));\n\n\n }",
"class_method... | {
"fields": [
{
"declarator": "internalValue",
"modifier": "private final",
"original_string": "private final String internalValue;",
"type": "String",
"var_name": "internalValue"
}
],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expr... | {
"body": "@Override\n public String value() {\n return internalValue;\n }",
"class_method_signature": "StringOperand.value()",
"constructor": false,
"full_signature": "@Override public String value()",
"identifier": "value",
"invocations": [],
"modifiers": "@Override public",
"parameters":... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_113 | {
"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 checkMismatchingAnnotationType() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for non ann... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsAnnotationTypeMatcher.java",
"identifier": "IsAnnotationTypeMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsAnnotationT... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isAnnotation(element);\n }",
"class_method_signature": "IsAnnotationTypeMatcher.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_390 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ModelPathResolverTest.java",
"identifier": "ModelPathResolverTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getGetter_testDifferentKindOfGetterPrefixes() {\n\n MatcherAssert.assertThat(ModelPathResolver.getGetter(new GetGetterTestClass(), \"isGetter\"), Matchers.is(\"isIsGetter\"));\n MatcherAssert.assertThat(ModelPathResolver.getGetter(new GetGetterTestClass(), \"getGetter\"... | {
"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_105 | {
"fields": [
{
"declarator": "testField = \"XXX\"",
"modifier": "public",
"original_string": "public String testField = \"XXX\";",
"type": "String",
"var_name": "testField"
},
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .... | {
"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/IsFieldMatcher.java",
"identifier": "IsFieldMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsFieldMatcher.check(ELEMENT el... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isField(element);\n }",
"class_method_signature": "IsFieldMatcher.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_369 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/ForTemplateBlockTest.java",
"identifier": "ForTemplateBlockTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = InvalidPathException.class)\n public void test_getContent_invalidPath() {\n ForTemplateBlock unit = new ForTemplateBlock(\" abc : def \", \"${abc}\");\n\n Map<String, Object> model = new HashMap<String, Object>();\n\n unit.getContent(model);\n\n }",
"class_meth... | {
"fields": [
{
"declarator": "ATTRIBUTE_PATTERN = Pattern.compile(\"\\\\s*(\\\\w+?)\\\\s*[:]\\\\s*((?:\\\\w|[.])+?)\\\\s*\")",
"modifier": "private final static",
"original_string": "private final static Pattern ATTRIBUTE_PATTERN = Pattern.compile(\"\\\\s*(\\\\w+?)\\\\s*[:]\\\\s*((?:\\\\w|[.])+... | {
"body": "@Override\n public String getContent(Map<String, Object> outerVariables) {\n\n Map<String, Object> variables = new HashMap<>();\n variables.putAll(outerVariables);\n\n // get array or List\n Object values = ModelPathResolver.resolveModelPath(outerVariables, accessPath).getVal... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_386 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ModelPathResolverTest.java",
"identifier": "ModelPathResolverTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getGetter_checkNullSafety() {\n\n MatcherAssert.assertThat(ModelPathResolver.getGetter(null, \"abc\"), Matchers.nullValue());\n MatcherAssert.assertThat(ModelPathResolver.getGetter(this, null), Matchers.nullValue());\n MatcherAssert.assertThat(ModelPathResolver.g... | {
"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_152 | {
"fields": [
{
"declarator": "testField",
"modifier": "private",
"original_string": "private PublicNoargConstructorNextToOtherConstructors testField;",
"type": "PublicNoargConstructorNextToOtherConstructors",
"var_name": "testField"
},
{
"declarator": "unitTestBuilder ... | {
"body": "@Test\n public void checkDefaultConstructor() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n TypeElement typeElement = TypeUtils.TypeRetrieval.getTypeElement(... | {
"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_294 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/tools/UtilitiesTest.java",
"identifier": "UtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void convertVarargsToList_withValues() {\n\n\n MatcherAssert.assertThat(Utilities.convertVarargsToList(\"A\",\"B\", (String)null, \"C\"), Matchers.contains(\"A\",\"B\", (String)null,\"C\"));\n\n }",
"class_method_signature": "UtilitiesTest.convertVarargsToList_withValues()",
... | {
"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> List<T> convertVarargsToList(T... varargs) {\n\n return varargs != null ? Arrays.asList(varargs) : new ArrayList<T>();\n\n }",
"class_method_signature": "Utilities.convertVarargsToList(T... varargs)",
"constructor": false,
"full_signature": "@SafeVarargs ... | {
"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_349 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_withModel_moreComplexMixedExpression() {\n\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"value1\", 5L);\n model.put(\"value2\", 6L);\n\n Expression expression = ExpressionParser.parseExpression(\"(value1 ==... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParser.java",
"identifier": "ExpressionParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "ExpressionParser.parseExpression(String expressionString, Map<Strin... | {
"body": "public static Expression parseExpression(String expressionString, Map<String, Object> model) {\n\n ModelPathResolver.modelMapThreadLocal.set(model);\n return parseExpression(expressionString);\n\n }",
"class_method_signature": "ExpressionParser.parseExpression(String expressionString, Ma... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_125 | {
"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 checkMismatchingTypeElement_class() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // find field\n Element result = Element... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsTypeElementMatcher.java",
"identifier": "IsTypeElementMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsTypeElementMatche... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CastElement.isTypeElement(element);\n }",
"class_method_signature": "IsTypeElementMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element)",
"ident... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_85 | {
"fields": [
{
"declarator": "unit = new ByAnnotationMatcher()",
"modifier": "private",
"original_string": "private ByAnnotationMatcher unit = new ByAnnotationMatcher();",
"type": "ByAnnotationMatcher",
"var_name": "unit"
}
],
"file": "annotationprocessor/src/test/java/io/to... | {
"body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_happyPath() {\n\n MatcherAssert.assertThat(\"Should return cannonical class name of annotation class\", unit.getStringRepresentationOfPassedCharacteristic(TestAnnotation.class).equals(TestAnnotation.class.getCanonicalName()));... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByAnnotationMatcher.java",
"identifier": "ByAnnotationMatcher",
"interfaces": "implements CriteriaMatcher<Element, Class<? extends Annotation>>",
"methods": [
{
"class_method_signa... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(Class<? extends Annotation> toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.getCanonicalName() : null;\n }",
"class_method_signature": "ByAnnotationMatcher.get... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_6 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationClassAttributeTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBuilder.UnitTestBuilder unitTest... | {
"body": "@Test\n public void annotationUtilsTest_arrayClassAttributeWithExplicitAttributeName_LongIntegerAnnotationClassAttributeTestClassValues() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement ele... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationUtils.java",
"identifier": "AnnotationUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "AnnotationUtils.AnnotationUtils()",
"constructor": true,
"full_si... | {
"body": "public static String[] getClassArrayAttributeFromAnnotationAsFqn(Element element, Class<? extends Annotation> annotationType) {\n\n return getClassArrayAttributeFromAnnotationAsFqn(element, annotationType, \"value\");\n }",
"class_method_signature": "AnnotationUtils.getClassArrayAttributeFromAn... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_172 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByQualifiedNameMatcher()",
"modifier": "priv... | {
"body": "@Test\n public void test_checkForMatchingCharacteristic_nullValuedElement() {\n\n MatcherAssert.assertThat(\"Should return false in case of null valued element\", !unit.checkForMatchingCharacteristic(null, NAME));\n\n }",
"class_method_signature": "ByQualifiedNameMatcherTest.test_checkForMat... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameMatcher.java",
"identifier": "ByQualifiedNameMatcher",
"interfaces": "implements CriteriaMatcher<Element, String>",
"methods": [
{
"class_method_signature": "ByQuali... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n switch (element.getKind()) {\n case ENUM:\n case INTERFACE:\n case ANN... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_93 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild... | {
"body": "@Test\n public void byParameterTypeMatcher_noMatch() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n List<? extends Element> result = ElementUtils.AccessEnclos... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeFqnMatcher.java",
"identifier": "ByParameterTypeFqnMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, String[]>",
"methods": [
{
"class_method_si... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, String[] 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().size() ... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_308 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/LongOperandTest.java",
"identifier": "LongOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getOperandsJavaType() {\n\n MatcherAssert.assertThat(new LongOperand(\"6\").getOperandsJavaType(), Matchers.equalTo((Class) Long.class));\n\n }",
"class_method_signature": "LongOperandTest.test_getOperandsJavaType()",
"constructor": false,
"full_signature": "@Tes... | {
"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 Class<Long> getOperandsJavaType() {\n return Long.class;\n }",
"class_method_signature": "LongOperand.getOperandsJavaType()",
"constructor": false,
"full_signature": "@Override public Class<Long> getOperandsJavaType()",
"identifier": "getOperandsJavaType",
"invocat... | {
"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_164 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByQualifiedNameMatcher()",
"modifier": "priv... | {
"body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_happyPath() {\n\n MatcherAssert.assertThat(\"Should return enum name\", unit.getStringRepresentationOfPassedCharacteristic(NAME).equals(NAME));\n\n }",
"class_method_signature": "ByQualifiedNameMatcherTest.test_getStringR... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameMatcher.java",
"identifier": "ByQualifiedNameMatcher",
"interfaces": "implements CriteriaMatcher<Element, String>",
"methods": [
{
"class_method_signature": "ByQuali... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor) {\n return toGetStringRepresentationFor;\n }",
"class_method_signature": "ByQualifiedNameMatcher.getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor)",
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_133 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild... | {
"body": "@Test\n public void byParameterTypeMatcher_nullValues() {\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/ByParameterTypeMatcher.java",
"identifier": "ByParameterTypeMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, Class[]>",
"methods": [
{
"class_method_signature... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, Class[] toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // check if number of parameters is the same\n if (element.getParameters().size() != ... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_324 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/BooleanOperandTest.java",
"identifier": "BooleanOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_createBooleanOperand() {\n\n MatcherAssert.assertThat((Boolean) new BooleanOperand(\"true\").value(), Matchers.is(true));\n MatcherAssert.assertThat((Boolean) new BooleanOperand(\"false\").value(), Matchers.is(false));\n\n }",
"class_method_signature": "Boolea... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/BooleanOperand.java",
"identifier": "BooleanOperand",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanOperand.BooleanOperand(String expressionString)",
... | {
"body": "@Override\n public Boolean value() {\n return Boolean.valueOf(getExpressionString());\n }",
"class_method_signature": "BooleanOperand.value()",
"constructor": false,
"full_signature": "@Override public Boolean value()",
"identifier": "value",
"invocations": [
"valueOf",
"getE... | {
"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_50 | {
"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 shouldExecuteSuccessfullyGetterAndSetterAnnotatedClass() {\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_261 | {
"fields": [
{
"declarator": "MESSSAGE = \"message ${0} : ${1}\"",
"modifier": "final static",
"original_string": "final static String MESSSAGE = \"message ${0} : ${1}\";",
"type": "String",
"var_name": "MESSSAGE"
},
{
"declarator": "MESSAGE_ARG_1 = \"A\"",
"modi... | {
"body": "@Test\n public void argToString_otherValue() {\n\n MatcherAssert.assertThat(MessagerUtils.argToString(1), Matchers.is(\"1\"));\n\n }",
"class_method_signature": "MessagerUtilsTest.argToString_otherValue()",
"constructor": false,
"full_signature": "@Test public void argToString_otherValue... | {
"fields": [
{
"declarator": "printMessageCodes = false",
"modifier": "private static",
"original_string": "private static boolean printMessageCodes = false;",
"type": "boolean",
"var_name": "printMessageCodes"
}
],
"file": "annotationprocessor/src/main/java/io/toolisticon/a... | {
"body": "protected static String argToString(Object arg){\n\n if(arg == null) {\n\n return \"<NULL>\";\n\n } else if (arg.getClass().isArray()) {\n\n StringBuilder stringBuilder = new StringBuilder(\"[\");\n boolean first = true;\n\n for (Object argument : (... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_148 | {
"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_mismatch() {\n\n Element element = Mockito.mock(Element.class);\n\n Mockito.when(element.getKind()).thenReturn(ElementKind.CLASS);\n\n MatcherAssert.assertThat(\"Should find mismatch correctly\", !unit.checkForMatchingCharacter... | {
"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_373 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/StaticTemplateBlockTest.java",
"identifier": "StaticTemplateBlockTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getTemplateBlockType() {\n MatcherAssert.assertThat(new StaticTemplateBlock(\"\").getTemplateBlockType(), Matchers.is(TemplateBlockType.STATIC));\n }",
"class_method_signature": "StaticTemplateBlockTest.test_getTemplateBlockType()",
"constructor": false,
"full_si... | {
"fields": [
{
"declarator": "content",
"modifier": "private final",
"original_string": "private final String content;",
"type": "String",
"var_name": "content"
}
],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/StaticT... | {
"body": "@Override\n public TemplateBlockType getTemplateBlockType() {\n return TemplateBlockType.STATIC;\n }",
"class_method_signature": "StaticTemplateBlock.getTemplateBlockType()",
"constructor": false,
"full_signature": "@Override public TemplateBlockType getTemplateBlockType()",
"identifie... | {
"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_236 | {
"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_nullValuedElementAndRawType() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Sho... | {
"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_365 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ParseUtilitiesTest.java",
"identifier": "ParseUtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void addKeyValuePair_correctUsage() {\n\n // PREPARE INPUT\n Map<String, Object> outerModel = new HashMap<>();\n Map<String, Object> outerModelModel = new HashMap<>();\n outerModel.put(\"model\", outerModelModel);\n outerModelModel.put(\"abc\", \"yes\");... | {
"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_11 | {
"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 checkErrorElementMessage() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n FluentValidatorMessage... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final Element element;",
"type": "Element",
"var_name": "element"
},
{
"declarator": "kind",
"modifier": "private final",
"original_string": "private final Diag... | {
"body": "public void issueMessage() {\n\n if (annotationMirror != null && annotationValue != null) {\n MessagerUtils.printMessage(element, annotationMirror, annotationValue, kind, message, args);\n } else if (annotationMirror != null) {\n MessagerUtils.printMessage(element, annot... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_220 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByQualifiedNameRegexMatcher()",
"modifier": ... | {
"body": "@Test\n public void test_checkForMatchingCharacteristic_match_class() {\n\n TypeElement element = Mockito.mock(TypeElement.class);\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(NAME);\n\n Mockito.when(element.getKind())... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/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_109 | {
"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 List<? extends Element> result = ElementUtils.Access... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByReturnTypeMatcher.java",
"identifier": "ByReturnTypeMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, Class>",
"methods": [
{
"class_method_signature": "ByRe... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, Class toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // check if number of parameters is the same\n return TypeUtils.TypeComparison.isTypeEq... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_298 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/AbstractAnnotationProcessorTest.java",
"identifier": "AbstractAnnotationProcessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createSupportedAnnotationSet_withoutParameters() {\n\n MatcherAssert.assertThat(AbstractAnnotationProcessor.createSupportedAnnotationSet(), Matchers.<String>empty());\n\n }",
"class_method_signature": "AbstractAnnotationProcessorTest.createSupportedAnnotationSet_withoutPa... | {
"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_332 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/DynamicOperandTest.java",
"identifier": "DynamicOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testResolveModelValue() {\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"longKey\", 5L);\n model.put(\"integerKey\", 5);\n model.put(\"doubleKey\", 5.0);\n model.put(\"floatKey\", 5.0f);\n model.put(\"stringKey\"... | {
"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_277 | {
"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_getLongValue() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n AnnotationMirror annotationMirror = AnnotationUtils.... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationValueUtils.java",
"identifier": "AnnotationValueUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "AnnotationValueUtils.AnnotationValueUtils()",
"constructor": ... | {
"body": "public static Long getLongValue(AnnotationValue annotationValue) {\n return !isLong(annotationValue) ? null : (Long) annotationValue.getValue();\n }",
"class_method_signature": "AnnotationValueUtils.getLongValue(AnnotationValue annotationValue)",
"constructor": false,
"full_signature": "pub... | {
"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_46 | {
"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 shouldExecuteSuccessfullyDataAnnotatedClass() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n Typ... | {
"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_299 | {
"fields": [],
"file": "annotationprocessor/src/test/java/io/toolisticon/annotationprocessortoolkit/AbstractAnnotationProcessorTest.java",
"identifier": "AbstractAnnotationProcessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void createSupportedAnnotationSet_withParameters() {\n\n MatcherAssert.assertThat(AbstractAnnotationProcessor.createSupportedAnnotationSet(Override.class, Ignore.class), Matchers.containsInAnyOrder(Override.class.getCanonicalName(), Ignore.class.getCanonicalName()));\n\n }",
"... | {
"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_333 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/DynamicOperandTest.java",
"identifier": "DynamicOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = InvalidPathException.class)\n public void test_nonExistingPath() {\n\n Map<String, Object> model = new HashMap<String, Object>();\n\n // apply model to thread local\n ModelPathResolver.modelMapThreadLocal.set(model);\n\n new DynamicOperand(\"nonExistingKey\")... | {
"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_276 | {
"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_isArray() {\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 isArray(AnnotationValue annotationValue) {\n return hasAnnotationValueOneOfPassedTypes(annotationValue, List.class);\n }",
"class_method_signature": "AnnotationValueUtils.isArray(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_47 | {
"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 shouldExecuteSuccessfullyInheritedDataAnnotatedClass() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n ... | {
"fields": [
{
"declarator": "INSTANCE = new GetAttributesCommandWithInheritance()",
"modifier": "public final static",
"original_string": "public final static GetAttributesCommandWithInheritance INSTANCE = new GetAttributesCommandWithInheritance();",
"type": "GetAttributesCommandWithInhe... | {
"body": "@Override\n public AttributeResult[] execute(TypeElement element) {\n\n return BeanUtils.getAttributesWithInheritance(element);\n }",
"class_method_signature": "GetAttributesCommandWithInheritance.execute(TypeElement element)",
"constructor": false,
"full_signature": "@Override public At... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_108 | {
"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/ByReturnTypeMatcher.java",
"identifier": "ByReturnTypeMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, Class>",
"methods": [
{
"class_method_signature": "ByRe... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, Class toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // check if number of parameters is the same\n return TypeUtils.TypeComparison.isTypeEq... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_364 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/ParseUtilitiesTest.java",
"identifier": "ParseUtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = InvalidIncludeModelExpression.class)\n public void extractModelFromString_invalidUsage_invalidValueExpression() {\n\n\n // PREPARE INPUT\n Map<String, Object> outerModel = new HashMap<>();\n Map<String, Object> outerModelModel = new HashMap<>();\n outerModel.... | {
"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, Object> extractModelFromString(Map<String, Object> outerModel, String modelString) {\n\n if (outerModel == null) {\n throw new IllegalArgumentException(\"passed outerModel must not be null\");\n }\n if (modelString == null) {\n throw new ... | {
"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_10 | {
"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_shouldReturnNullForNonMatchingClassAttributes() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // pre... | {
"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_221 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByQualifiedNameRegexMatcher()",
"modifier": ... | {
"body": "@Test\n public void test_checkForMatchingCharacteristic_match_package() {\n\n PackageElement element = Mockito.mock(PackageElement.class);\n\n Name nameOfElement = Mockito.mock(Name.class);\n Mockito.when(nameOfElement.toString()).thenReturn(NAME);\n\n Mockito.when(element.ge... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/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_372 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/templateblocks/IfTemplateBlockTest.java",
"identifier": "IfTemplateBlockTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_getTemplateBlockType() {\n MatcherAssert.assertThat(new IfTemplateBlock(\"abc\", \"\").getTemplateBlockType(), Matchers.is(TemplateBlockType.IF));\n }",
"class_method_signature": "IfTemplateBlockTest.test_getTemplateBlockType()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "accessPath",
"modifier": "private final",
"original_string": "private final String accessPath;",
"type": "String",
"var_name": "accessPath"
},
{
"declarator": "templateString",
"modifier": "private final",
"original_string": "p... | {
"body": "@Override\n public TemplateBlockType getTemplateBlockType() {\n return TemplateBlockType.IF;\n }",
"class_method_signature": "IfTemplateBlock.getTemplateBlockType()",
"constructor": false,
"full_signature": "@Override public TemplateBlockType getTemplateBlockType()",
"identifier": "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_237 | {
"fields": [
{
"declarator": "unit = new ByModifierMatcher()",
"modifier": "private",
"original_string": "private ByModifierMatcher unit = new ByModifierMatcher();",
"type": "ByModifierMatcher",
"var_name": "unit"
}
],
"file": "annotationprocessor/src/test/java/io/toolistico... | {
"body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_happyPath() {\n\n MatcherAssert.assertThat(\"Should return enum name\", unit.getStringRepresentationOfPassedCharacteristic(Modifier.FINAL).equals(Modifier.FINAL.name()));\n\n }",
"class_method_signature": "ByModifierMatch... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByModifierMatcher.java",
"identifier": "ByModifierMatcher",
"interfaces": "implements CriteriaMatcher<Element, Modifier>",
"methods": [
{
"class_method_signature": "ByModifierMatch... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(Modifier toGetStringRepresentationFor) {\n return toGetStringRepresentationFor != null ? toGetStringRepresentationFor.name() : null;\n }",
"class_method_signature": "ByModifierMatcher.getStringRepresentationOfPassedChara... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_149 | {
"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_nullValuedElement() {\n\n MatcherAssert.assertThat(\"Should return false in case of null valued element\", !unit.checkForMatchingCharacteristic(null, ElementKind.CLASS));\n\n }",
"class_method_signature": "ByElementKindMatcherTest.test_... | {
"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_325 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/BooleanOperandTest.java",
"identifier": "BooleanOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_nonBooleanValue() {\n MatcherAssert.assertThat((Boolean) new BooleanOperand(\"XYZ\").value(), Matchers.is(false));\n }",
"class_method_signature": "BooleanOperandTest.test_nonBooleanValue()",
"constructor": false,
"full_signature": "@Test public void test_nonBool... | {
"fields": [],
"file": "templating/src/main/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/BooleanOperand.java",
"identifier": "BooleanOperand",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanOperand.BooleanOperand(String expressionString)",
... | {
"body": "@Override\n public Boolean value() {\n return Boolean.valueOf(getExpressionString());\n }",
"class_method_signature": "BooleanOperand.value()",
"constructor": false,
"full_signature": "@Override public Boolean value()",
"identifier": "value",
"invocations": [
"valueOf",
"getE... | {
"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_51 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/testcases.commands/GetAttributesCommandWithInheritanceTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBu... | {
"body": "@Test\n public void shouldExecuteSuccessfullyMixedGetterAndSetterAnnotatedClassAndField2() {\n\n unitTestBuilder.useProcessor(\n new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n ... | {
"fields": [
{
"declarator": "INSTANCE = new GetAttributesCommandWithInheritance()",
"modifier": "public final static",
"original_string": "public final static GetAttributesCommandWithInheritance INSTANCE = new GetAttributesCommandWithInheritance();",
"type": "GetAttributesCommandWithInhe... | {
"body": "@Override\n public AttributeResult[] execute(TypeElement element) {\n\n return BeanUtils.getAttributesWithInheritance(element);\n }",
"class_method_signature": "GetAttributesCommandWithInheritance.execute(TypeElement element)",
"constructor": false,
"full_signature": "@Override public At... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_260 | {
"fields": [
{
"declarator": "MESSSAGE = \"message ${0} : ${1}\"",
"modifier": "final static",
"original_string": "final static String MESSSAGE = \"message ${0} : ${1}\";",
"type": "String",
"var_name": "MESSSAGE"
},
{
"declarator": "MESSAGE_ARG_1 = \"A\"",
"modi... | {
"body": "@Test\n public void argToString_collectionValue() {\n\n String[] array = {\"A\", \"B\", \"C\"};\n\n MatcherAssert.assertThat(MessagerUtils.argToString(Arrays.asList(array)), Matchers.is(\"[A, B, C]\"));\n\n }",
"class_method_signature": "MessagerUtilsTest.argToString_collectionValue()... | {
"fields": [
{
"declarator": "printMessageCodes = false",
"modifier": "private static",
"original_string": "private static boolean printMessageCodes = false;",
"type": "boolean",
"var_name": "printMessageCodes"
}
],
"file": "annotationprocessor/src/main/java/io/toolisticon/a... | {
"body": "protected static String argToString(Object arg){\n\n if(arg == null) {\n\n return \"<NULL>\";\n\n } else if (arg.getClass().isArray()) {\n\n StringBuilder stringBuilder = new StringBuilder(\"[\");\n boolean first = true;\n\n for (Object argument : (... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_132 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild... | {
"body": "@Test\n public void byParameterTypeMatcher_noMatch() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n List<? extends Element> result = ElementUtils.AccessEnclos... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeMatcher.java",
"identifier": "ByParameterTypeMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, Class[]>",
"methods": [
{
"class_method_signature... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, Class[] toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n // check if number of parameters is the same\n if (element.getParameters().size() != ... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_165 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByQualifiedNameMatcher()",
"modifier": "priv... | {
"body": "@Test\n public void test_getStringRepresentationOfPassedCharacteristic_passedNullValue() {\n\n MatcherAssert.assertThat(\"Should return null for null valued parameter\", unit.getStringRepresentationOfPassedCharacteristic(null) == null);\n\n }",
"class_method_signature": "ByQualifiedNameMatch... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByQualifiedNameMatcher.java",
"identifier": "ByQualifiedNameMatcher",
"interfaces": "implements CriteriaMatcher<Element, String>",
"methods": [
{
"class_method_signature": "ByQuali... | {
"body": "@Override\n public String getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor) {\n return toGetStringRepresentationFor;\n }",
"class_method_signature": "ByQualifiedNameMatcher.getStringRepresentationOfPassedCharacteristic(String toGetStringRepresentationFor)",
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_92 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationProcessorTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBuilder.UnitTestBuilder unitTestBuild... | {
"body": "@Test\n public void byParameterTypeMatcher_match() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // find field\n List<? extends Element> resul... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/ByParameterTypeFqnMatcher.java",
"identifier": "ByParameterTypeFqnMatcher",
"interfaces": "implements CriteriaMatcher<ExecutableElement, String[]>",
"methods": [
{
"class_method_si... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(ExecutableElement element, String[] 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().size() ... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_309 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/operands/LongOperandTest.java",
"identifier": "LongOperandTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_createLongOperand() {\n\n MatcherAssert.assertThat((Long) new LongOperand(\"6\").value(), Matchers.is(6L));\n MatcherAssert.assertThat((Long) new LongOperand(\"-6\").value(), Matchers.is(-6L));\n\n }",
"class_method_signature": "LongOperandTest.test_createLong... | {
"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_7 | {
"fields": [
{
"declarator": "unitTestBuilder = CompileTestBuilder\n .unitTest()\n .useSource(JavaFileObjectUtils.readFromResource(\"/AnnotationClassAttributeTestClass.java\"))",
"modifier": "private",
"original_string": "private CompileTestBuilder.UnitTestBuilder unitTest... | {
"body": "@Test\n public void getClassAttributeFromAnnotationAsTypeMirror_shouldGetClassAttributeSuccefully() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n // precondi... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/AnnotationUtils.java",
"identifier": "AnnotationUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "AnnotationUtils.AnnotationUtils()",
"constructor": true,
"full_si... | {
"body": "public static TypeMirror getClassAttributeFromAnnotationAsTypeMirror(Element element, Class<? extends Annotation> annotationType) {\n return getClassAttributeFromAnnotationAsTypeMirror(element, annotationType, \"value\");\n }",
"class_method_signature": "AnnotationUtils.getClassAttributeFromAnn... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_173 | {
"fields": [
{
"declarator": "NAME = \"NAME\"",
"modifier": "private final static",
"original_string": "private final static String NAME = \"NAME\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "unit = new ByQualifiedNameMatcher()",
"modifier": "priv... | {
"body": "@Test\n public void test_checkForMatchingCharacteristic_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/ByQualifiedNameMatcher.java",
"identifier": "ByQualifiedNameMatcher",
"interfaces": "implements CriteriaMatcher<Element, String>",
"methods": [
{
"class_method_signature": "ByQuali... | {
"body": "@Override\n public boolean checkForMatchingCharacteristic(Element element, String toCheckFor) {\n\n if (element == null || toCheckFor == null) {\n return false;\n }\n\n switch (element.getKind()) {\n case ENUM:\n case INTERFACE:\n case ANN... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_84 | {
"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/IsMethodMatcher.java",
"identifier": "IsMethodMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsMethodMatcher.check(ELEMENT... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CheckKindOfElement.isMethod(element);\n }",
"class_method_signature": "IsMethodMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element)",
"identifi... | {
"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_124 | {
"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 checkMatchingTypeElement() {\n\n unitTestBuilder.useProcessor(new AbstractUnitTestAnnotationProcessorClass() {\n @Override\n protected void testCase(TypeElement element) {\n\n MatcherAssert.assertThat(\"Should return false for non TypeEleme... | {
"fields": [],
"file": "annotationprocessor/src/main/java/io/toolisticon/annotationprocessortoolkit/tools/matcher/impl/IsTypeElementMatcher.java",
"identifier": "IsTypeElementMatcher",
"interfaces": "implements ImplicitMatcher<ELEMENT>",
"methods": [
{
"class_method_signature": "IsTypeElementMatche... | {
"body": "@Override\n public boolean check(ELEMENT element) {\n return ElementUtils.CastElement.isTypeElement(element);\n }",
"class_method_signature": "IsTypeElementMatcher.check(ELEMENT element)",
"constructor": false,
"full_signature": "@Override public boolean check(ELEMENT element)",
"ident... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 86808110,
"size": 2194,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/toolisticon/annotation-processor-toolkit"
} |
86808110_348 | {
"fields": [],
"file": "templating/src/test/java/io/toolisticon/annotationprocessortoolkit/templating/expressions/ExpressionParserTest.java",
"identifier": "ExpressionParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void evaluateExpression_withModel_notEqualOperands() {\n\n\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"value1\", 5L);\n model.put(\"value2\", 6L);\n\n Expression expression = ExpressionParser.parseExpression(\"value1 == value2\", ... | {
"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"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.