id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
10230369_86 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"de... | {
"body": "@Test\n public void testIsConversionFromObjectUnchecked_yes() {\n Elements elements = compilationRule.getElements();\n TypeElement unchecked = elements.getTypeElement(Unchecked.class.getCanonicalName());\n for (VariableElement field : ElementFilter.fieldsIn(unchecked.getEnclosedElements())) {\n ... | {
"fields": [
{
"declarator": "HASH_SEED = 17",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 17;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "HASH_MULTIPLIER = 31",
"modifier": "private static final",... | {
"body": "public static boolean isConversionFromObjectUnchecked(TypeMirror type) {\n return new CastingUncheckedVisitor().visit(type, null);\n }",
"class_method_signature": "MoreTypes.isConversionFromObjectUnchecked(TypeMirror type)",
"constructor": false,
"full_signature": "public static boolean isConvers... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_69 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void asType() {\n assertThat(MoreElements.asType(stringElement)).isEqualTo(stringElement);\n }",
"class_method_signature": "MoreElementsTest.asType()",
"constructor": false,
"full_signature": "@Test public void asType()",
"identifier": "asType",
"invocations": [
"isEqualTo... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static TypeElement asType(Element element) {\n return element.accept(TypeElementVisitor.INSTANCE, null);\n }",
"class_method_signature": "MoreElements.asType(Element element)",
"constructor": false,
"full_signature": "public static TypeElement asType(Element element)",
"identifier": "asT... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_6 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void fromProxy() {\n TypeMirror typeMirror = declaredTypeOf(ImmutableList.class, Integer.class);\n\n Serializer serializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n CodeBlock actualCodeBlock = serializer.fromProxy(Code... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableListSerializerExtension.java",
"identifier": "ImmutableListSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableListS... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableList(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the T of ImmutableList<T>.\n TypeMirror containedType ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_90 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void parameterizedType() {\n try {\n SimpleTypeAnnotationValue.of(\n types.getDeclaredType(\n elements.getTypeElement(List.class.getCanonicalName()), objectType));\n fail(\"Expected an exception\");\n } catch (IllegalArgumentException expected) {\n }... | {
"fields": [
{
"declarator": "value",
"modifier": "private final",
"original_string": "private final TypeMirror value;",
"type": "TypeMirror",
"var_name": "value"
}
],
"file": "common/src/main/java/com/google/auto/common/SimpleTypeAnnotationValue.java",
"identifier": "Simp... | {
"body": "public static AnnotationValue of(TypeMirror value) {\n return new SimpleTypeAnnotationValue(value);\n }",
"class_method_signature": "SimpleTypeAnnotationValue.of(TypeMirror value)",
"constructor": false,
"full_signature": "public static AnnotationValue of(TypeMirror value)",
"identifier": "of",... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_28 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/SimpleServiceLoaderTest.java",
"identifier": "SimpleServiceLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void blankLinesAndComments() throws Exception {\n ClassLoader loader =\n loaderForJarWithEntries(\n CharSequence.class.getName(),\n \"\",\n \"# this is a comment\",\n \" # this is also a comment\",\n \" java.lang.String # ... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/SimpleServiceLoader.java",
"identifier": "SimpleServiceLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleServiceLoader.SimpleServiceLoader()",
"constructor": true,
"full_signature": "pri... | {
"body": "public static <T> ImmutableList<T> load(Class<? extends T> service, ClassLoader loader) {\n String resourceName = \"META-INF/services/\" + service.getName();\n List<URL> resourceUrls;\n try {\n resourceUrls = Collections.list(loader.getResources(resourceName));\n } catch (IOException e) {\... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_29 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/SimpleServiceLoaderTest.java",
"identifier": "SimpleServiceLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void loadTwiceFromSameLoader() throws Exception {\n ClassLoader loader =\n loaderForJarWithEntries(\n CharSequence.class.getName(), String.class.getName(), StringBuilder.class.getName());\n\n ImmutableList<CharSequence> providers1 = SimpleServiceLoader.load(CharSeque... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/SimpleServiceLoader.java",
"identifier": "SimpleServiceLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleServiceLoader.SimpleServiceLoader()",
"constructor": true,
"full_signature": "pri... | {
"body": "public static <T> ImmutableList<T> load(Class<? extends T> service, ClassLoader loader) {\n String resourceName = \"META-INF/services/\" + service.getName();\n List<URL> resourceUrls;\n try {\n resourceUrls = Collections.list(loader.getResources(resourceName));\n } catch (IOException e) {\... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_91 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
}
],
"file": "common/src/t... | {
"body": "@Test\n public void extraValues() {\n TypeElement multipleValues = getTypeElement(MultipleValues.class);\n Map<String, AnnotationValue> values = new HashMap<>();\n values.put(\"value1\", intValue(1));\n values.put(\"value2\", intValue(2));\n values.put(\"value3\", intValue(3));\n expectT... | {
"fields": [
{
"declarator": "annotationType",
"modifier": "private final",
"original_string": "private final TypeElement annotationType;",
"type": "TypeElement",
"var_name": "annotationType"
},
{
"declarator": "namedValues",
"modifier": "private final",
"o... | {
"body": "public static AnnotationMirror of(TypeElement annotationType) {\n return of(annotationType, ImmutableMap.of());\n }",
"class_method_signature": "SimpleAnnotationMirror.of(TypeElement annotationType)",
"constructor": false,
"full_signature": "public static AnnotationMirror of(TypeElement annotatio... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_7 | {
"fields": [
{
"declarator": "extension",
"modifier": "private",
"original_string": "private OptionalSerializerExtension extension;",
"type": "OptionalSerializerExtension",
"var_name": "extension"
},
{
"declarator": "fakeSerializerFactory",
"modifier": "private",... | {
"body": "@Test\n public void getSerializer_nonOptional_emptyReturned() {\n TypeMirror typeMirror = typeMirrorOf(String.class);\n\n Optional<Serializer> actualSerializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment);\n\n assertThat(actualSerializer).isEmpt... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/OptionalSerializerExtension.java",
"identifier": "OptionalSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "OptionalSerializerExtens... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isOptional(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the T of Optional<T>.\n TypeMirror containedType = getConta... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_87 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"de... | {
"body": "@Test\n public void testIsConversionFromObjectUnchecked_no() {\n Elements elements = compilationRule.getElements();\n TypeElement notUnchecked = elements.getTypeElement(NotUnchecked.class.getCanonicalName());\n for (VariableElement field : ElementFilter.fieldsIn(notUnchecked.getEnclosedElements()... | {
"fields": [
{
"declarator": "HASH_SEED = 17",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 17;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "HASH_MULTIPLIER = 31",
"modifier": "private static final",... | {
"body": "public static boolean isConversionFromObjectUnchecked(TypeMirror type) {\n return new CastingUncheckedVisitor().visit(type, null);\n }",
"class_method_signature": "MoreTypes.isConversionFromObjectUnchecked(TypeMirror type)",
"constructor": false,
"full_signature": "public static boolean isConvers... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_68 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void asTypeParameterElement_illegalArgument() {\n try {\n MoreElements.asTypeParameter(javaLangPackageElement);\n fail();\n } catch (IllegalArgumentException expected) {\n }\n }",
"class_method_signature": "MoreElementsTest.asTypeParameterElement_illegalArgument()",
... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static TypeParameterElement asTypeParameter(Element element) {\n return element.accept(TypeParameterElementVisitor.INSTANCE, null);\n }",
"class_method_signature": "MoreElements.asTypeParameter(Element element)",
"constructor": false,
"full_signature": "public static TypeParameterElement a... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_44 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@ClassRule public static final",
"original_string": "@ClassRule public static final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule... | {
"body": "@Test\n public void canAssignStaticMethodResult() {\n TypeElement immutableMap = elementUtils.getTypeElement(ImmutableMap.class.getCanonicalName());\n TypeElement string = elementUtils.getTypeElement(String.class.getCanonicalName());\n TypeElement integer = elementUtils.getTypeElement(Integer.cla... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/TypeVariables.java",
"identifier": "TypeVariables",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeVariables.TypeVariables()",
"constructor": true,
"full_signature": "private TypeVariables()",
... | {
"body": "static boolean canAssignStaticMethodResult(\n ExecutableElement method,\n TypeMirror actualParameterType,\n TypeMirror targetType,\n Types typeUtils) {\n if (!targetType.getKind().equals(TypeKind.DECLARED)\n || !method.getModifiers().contains(Modifier.STATIC)\n || metho... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_109 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getInts() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"intValues\");\n assertThat(AnnotationValues.getInts(value)).containsExactly(1, 2).inOrder();\n }",
"class_method_signature": "AnnotationValuesTest.getInts()",
"constructor": false,... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<Integer> getInts(AnnotationValue value) {\n return INTS_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getInts(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<Integer> getInts(AnnotationValue value)... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_13 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/extension/serializable/serializer/impl/SerializerFactoryImplTest.java",
"identifier": "SerializerFactoryImplTest",
"interfaces": "",
"superclass": "extends CompilationAbstractTest"
} | {
"body": "@Test\n public void getSerializer_factoriesProvided_factoryReturned() throws Exception {\n SerializerFactoryImpl factory =\n new SerializerFactoryImpl(\n ImmutableList.of(new TestStringSerializerFactory()), mockProcessingEnvironment);\n\n Serializer actualSerializer = factory.getSe... | {
"fields": [
{
"declarator": "extensions",
"modifier": "private final",
"original_string": "private final ImmutableList<SerializerExtension> extensions;",
"type": "ImmutableList<SerializerExtension>",
"var_name": "extensions"
},
{
"declarator": "env",
"modifier":... | {
"body": "@Override\n public Serializer getSerializer(TypeMirror typeMirror) {\n for (SerializerExtension extension : extensions) {\n Optional<Serializer> serializer = extension.getSerializer(typeMirror, this, env);\n if (serializer.isPresent()) {\n return serializer.get();\n }\n }\n ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_52 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void missingReturnType() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"abstract class TestClass {\",\n \" abstract MissingType blah();\",\n \"}\");\n assertAbout(jav... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_25 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/ReformatterTest.java",
"identifier": "ReformatterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSpecialSpaces() {\n String input =\n \"\\n\"\n + \"package com.example.whatever;\\n\"\n + \"\\n\"\n + \"public class SomeClass {\\n\"\n + \" static final String STRING = \\\" hello world \\\\n\\\"; \\n\"\n + \" ... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/Reformatter.java",
"identifier": "Reformatter",
"interfaces": "",
"methods": [
{
"class_method_signature": "Reformatter.fixup(String s)",
"constructor": false,
"full_signature": "static String fixup(String s)",
... | {
"body": "static String fixup(String s) {\n StringBuilder out = new StringBuilder();\n JavaScanner scanner = new JavaScanner(s);\n s = scanner.string();\n int len = s.length();\n for (int start = 0, previous = 0, braces = 0, parens = 0, end = 0;\n start < len;\n previous = start, start =... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_72 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void asExecutable() {\n for (Element methodElement : ElementFilter.methodsIn(stringElement.getEnclosedElements())) {\n assertThat(MoreElements.asExecutable(methodElement)).isEqualTo(methodElement);\n }\n for (Element methodElement\n : ElementFilter.constructorsIn(string... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static ExecutableElement asExecutable(Element element) {\n return element.accept(ExecutableElementVisitor.INSTANCE, null);\n }",
"class_method_signature": "MoreElements.asExecutable(Element element)",
"constructor": false,
"full_signature": "public static ExecutableElement asExecutable(Ele... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_64 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void getPackage() {\n assertThat(MoreElements.getPackage(stringElement)).isEqualTo(javaLangPackageElement);\n for (Element childElement : stringElement.getEnclosedElements()) {\n assertThat(MoreElements.getPackage(childElement)).isEqualTo(javaLangPackageElement);\n }\n }",
... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static PackageElement getPackage(Element element) {\n while (element.getKind() != PACKAGE) {\n element = element.getEnclosingElement();\n }\n return (PackageElement) element;\n }",
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_33 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/SimpleServiceLoaderTest.java",
"identifier": "SimpleServiceLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void wrongTypeClass() throws Exception {\n ClassLoader loader = loaderForJarWithEntries(CharSequence.class.getName(), \"java.lang.Thread\");\n\n try {\n SimpleServiceLoader.load(CharSequence.class, loader);\n fail();\n } catch (ServiceConfigurationError expected) {\n ... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/SimpleServiceLoader.java",
"identifier": "SimpleServiceLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleServiceLoader.SimpleServiceLoader()",
"constructor": true,
"full_signature": "pri... | {
"body": "public static <T> ImmutableList<T> load(Class<? extends T> service, ClassLoader loader) {\n String resourceName = \"META-INF/services/\" + service.getName();\n List<URL> resourceUrls;\n try {\n resourceUrls = Collections.list(loader.getResources(resourceName));\n } catch (IOException e) {\... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_48 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"de... | {
"body": "@Test\n public void testPackageNameOfMapEntry() {\n assertThat(TypeSimplifier.packageNameOf(typeElementOf(java.util.Map.Entry.class)))\n .isEqualTo(\"java.util\");\n }",
"class_method_signature": "TypeSimplifierTest.testPackageNameOfMapEntry()",
"constructor": false,
"full_signature": "@T... | {
"fields": [
{
"declarator": "imports",
"modifier": "private final",
"original_string": "private final Map<String, Spelling> imports;",
"type": "Map<String, Spelling>",
"var_name": "imports"
},
{
"declarator": "CASTING_UNCHECKED_VISITOR =\n new SimpleTypeVisitor8<... | {
"body": "static String packageNameOf(TypeElement type) {\n return MoreElements.getPackage(type).getQualifiedName().toString();\n }",
"class_method_signature": "TypeSimplifier.packageNameOf(TypeElement type)",
"constructor": false,
"full_signature": "static String packageNameOf(TypeElement type)",
"ident... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_105 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getEnum() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"enumValue\");\n assertThat(AnnotationValues.getEnum(value)).isEqualTo(value.getValue());\n }",
"class_method_signature": "AnnotationValuesTest.getEnum()",
"constructor": false,
"... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static VariableElement getEnum(AnnotationValue value) {\n return EnumVisitor.INSTANCE.visit(value);\n }",
"class_method_signature": "AnnotationValues.getEnum(AnnotationValue value)",
"constructor": false,
"full_signature": "public static VariableElement getEnum(AnnotationValue value)",
"... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_113 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getBytes() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"byteValues\");\n assertThat(AnnotationValues.getBytes(value)).containsExactly((byte) 8, (byte) 9).inOrder();\n }",
"class_method_signature": "AnnotationValuesTest.getBytes()",
"co... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<Byte> getBytes(AnnotationValue value) {\n return BYTES_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getBytes(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<Byte> getBytes(AnnotationValue value)",... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_55 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void missingTypeParameter() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"class TestClass<T extends MissingType> {}\");\n assertAbout(javaSource())\n .that(javaFileObject)\n... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_118 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getDouble() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"doubleValue\");\n assertThat(AnnotationValues.getDouble(value)).isEqualTo(16D);\n }",
"class_method_signature": "AnnotationValuesTest.getDouble()",
"constructor": false,
"full_... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static double getDouble(AnnotationValue value) {\n return valueOfType(value, Double.class);\n }",
"class_method_signature": "AnnotationValues.getDouble(AnnotationValue value)",
"constructor": false,
"full_signature": "public static double getDouble(AnnotationValue value)",
"identifier": ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_14 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void getSerializer_nonImmutableMap_emptyReturned() {\n TypeMirror typeMirror = typeMirrorOf(String.class);\n\n Optional<Serializer> actualSerializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment);\n\n assertThat(actualSerializer).is... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableMapSerializerExtension.java",
"identifier": "ImmutableMapSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableMapSeri... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableMap(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the K, V of ImmutableMap<K, V>.\n TypeMirror keyType = ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_43 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@ClassRule public static final",
"original_string": "@ClassRule public static final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule... | {
"body": "@Test\n public void nestedClasses() {\n TypeElement outer = elementUtils.getTypeElement(Outer.class.getCanonicalName());\n TypeElement inner = elementUtils.getTypeElement(Outer.Inner.class.getCanonicalName());\n List<ExecutableElement> outerMethods = ElementFilter.methodsIn(outer.getEnclosedEleme... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/TypeVariables.java",
"identifier": "TypeVariables",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeVariables.TypeVariables()",
"constructor": true,
"full_signature": "private TypeVariables()",
... | {
"body": "static ImmutableMap<ExecutableElement, TypeMirror> rewriteReturnTypes(\n Elements elementUtils,\n Types typeUtils,\n Collection<ExecutableElement> methods,\n TypeElement sourceType,\n TypeElement targetType) {\n List<? extends TypeParameterElement> sourceTypeParameters = sourceT... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_38 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/TemplateVarsTest.java",
"identifier": "TemplateVarsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSubSub() {\n SubHappyVars vars = new SubHappyVars();\n vars.integer = 23;\n vars.string = \"wibble\";\n vars.list = ImmutableList.of(5, 17, 23);\n vars.character = 'ß';\n String expectedText = \"integer=23 string=wibble list=[5, 17, 23] character=ß\";\n String ... | {
"fields": [
{
"declarator": "fields",
"modifier": "private final",
"original_string": "private final ImmutableList<Field> fields;",
"type": "ImmutableList<Field>",
"var_name": "fields"
}
],
"file": "value/src/main/java/com/google/auto/value/processor/TemplateVars.java",
"... | {
"body": "String toText() {\n Map<String, Object> vars = toVars();\n return parsedTemplate().evaluate(vars);\n }",
"class_method_signature": "TemplateVars.toText()",
"constructor": false,
"full_signature": " String toText()",
"identifier": "toText",
"invocations": [
"toVars",
"evaluate",
... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_122 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getChar() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"charValue\");\n assertThat(AnnotationValues.getChar(value)).isEqualTo('a');\n }",
"class_method_signature": "AnnotationValuesTest.getChar()",
"constructor": false,
"full_signatur... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static char getChar(AnnotationValue value) {\n return valueOfType(value, Character.class);\n }",
"class_method_signature": "AnnotationValues.getChar(AnnotationValue value)",
"constructor": false,
"full_signature": "public static char getChar(AnnotationValue value)",
"identifier": "getCha... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_80 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void getLocalAndInheritedMethods_AbstractList() {\n Elements elements = compilation.getElements();\n\n TypeElement abstractType =\n elements.getTypeElement(AbstractAbstractList.class.getCanonicalName());\n Set<ExecutableElement> abstractTypeMethods =\n MoreElements.ge... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "@Deprecated\n public static ImmutableSet<ExecutableElement> getLocalAndInheritedMethods(\n TypeElement type, Elements elementUtils) {\n Overrides overrides = new Overrides.NativeOverrides(elementUtils);\n return getLocalAndInheritedMethods(type, overrides);\n }",
"class_method_signature": "M... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_0 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/extension/serializable/serializer/SerializerFactoryLoaderTest.java",
"identifier": "SerializerFactoryLoaderTest",
"interfaces": "",
"superclass": "extends CompilationAbstractTest"
} | {
"body": "@Test\n public void getFactory_extensionsLoaded() throws Exception {\n SerializerFactory factory = SerializerFactoryLoader.getFactory(mockProcessingEnvironment);\n\n Serializer actualSerializer = factory.getSerializer(typeMirrorOf(String.class));\n\n assertThat(actualSerializer.getClass().getName... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/SerializerFactoryLoader.java",
"identifier": "SerializerFactoryLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "SerializerFactoryLoader.getFactory(ProcessingEnvironment processing... | {
"body": "public static SerializerFactory getFactory(ProcessingEnvironment processingEnv) {\n return new SerializerFactoryImpl(loadExtensions(processingEnv), processingEnv);\n }",
"class_method_signature": "SerializerFactoryLoader.getFactory(ProcessingEnvironment processingEnv)",
"constructor": false,
"ful... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_96 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"declarator": "... | {
"body": "@Test public void testGetDefaultValuesSet() {\n Iterable<AnnotationValue> values = AnnotationMirrors.getAnnotationValuesWithDefaults(\n annotationOn(StringySet.class)).values();\n String value = getOnlyElement(values).accept(new SimpleAnnotationValueVisitor6<String, Void>() {\n @Overr... | {
"fields": [
{
"declarator": "ANNOTATION_MIRROR_EQUIVALENCE =\n new Equivalence<AnnotationMirror>() {\n @Override\n protected boolean doEquivalent(AnnotationMirror left, AnnotationMirror right) {\n return MoreTypes.equivalence().equivalent(left.getAnnotationType(),\n ... | {
"body": "public static ImmutableMap<ExecutableElement, AnnotationValue> getAnnotationValuesWithDefaults(\n AnnotationMirror annotation) {\n ImmutableMap.Builder<ExecutableElement, AnnotationValue> values = ImmutableMap.builder();\n Map<? extends ExecutableElement, ? extends AnnotationValue> declaredValue... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_79 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void getLocalAndInheritedMethods_DaggerBug() {\n Elements elementUtils = compilation.getElements();\n TypeElement main = elementUtils.getTypeElement(Main.ParentComponent.class.getCanonicalName());\n Set<ExecutableElement> methods = MoreElements.getLocalAndInheritedMethods(\n ... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "@Deprecated\n public static ImmutableSet<ExecutableElement> getLocalAndInheritedMethods(\n TypeElement type, Elements elementUtils) {\n Overrides overrides = new Overrides.NativeOverrides(elementUtils);\n return getLocalAndInheritedMethods(type, overrides);\n }",
"class_method_signature": "M... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_59 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void handlesRecursiveType() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"abstract class TestClass {\",\n \" abstract TestClass foo(TestClass x);\",\n \"}\");\n asse... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_114 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getShort() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"shortValue\");\n assertThat(AnnotationValues.getShort(value)).isEqualTo((short) 10);\n }",
"class_method_signature": "AnnotationValuesTest.getShort()",
"constructor": false,
"fu... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static short getShort(AnnotationValue value) {\n return valueOfType(value, Short.class);\n }",
"class_method_signature": "AnnotationValues.getShort(AnnotationValue value)",
"constructor": false,
"full_signature": "public static short getShort(AnnotationValue value)",
"identifier": "getSh... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_102 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getAnnotationMirrors() {\n TypeElement insideAnnotation = getTypeElement(InsideAnnotation.class);\n AnnotationValue value =\n AnnotationMirrors.getAnnotationValue(annotationMirror, \"insideAnnotationValues\");\n ImmutableList<AnnotationMirror> annotationMirrors =\n ... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<AnnotationMirror> getAnnotationMirrors(AnnotationValue value) {\n return ANNOTATION_MIRRORS_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getAnnotationMirrors(AnnotationValue value)",
"constructor": false,
"full_signature": "public static Immu... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_18 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void toProxy() {\n TypeMirror typeMirror = declaredTypeOf(ImmutableMap.class, Integer.class, String.class);\n\n Serializer serializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n CodeBlock actualCodeBlock = serializer.toP... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableMapSerializerExtension.java",
"identifier": "ImmutableMapSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableMapSeri... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableMap(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the K, V of ImmutableMap<K, V>.\n TypeMirror keyType = ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_34 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/SimpleServiceLoaderTest.java",
"identifier": "SimpleServiceLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void couldNotConstruct() throws Exception {\n ClassLoader loader = loaderForJarWithEntries(\"java.lang.System\", \"java.lang.System\");\n\n try {\n SimpleServiceLoader.load(System.class, loader);\n fail();\n } catch (ServiceConfigurationError expected) {\n assertThat... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/SimpleServiceLoader.java",
"identifier": "SimpleServiceLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleServiceLoader.SimpleServiceLoader()",
"constructor": true,
"full_signature": "pri... | {
"body": "public static <T> ImmutableList<T> load(Class<? extends T> service, ClassLoader loader) {\n String resourceName = \"META-INF/services/\" + service.getName();\n List<URL> resourceUrls;\n try {\n resourceUrls = Collections.list(loader.getResources(resourceName));\n } catch (IOException e) {\... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_63 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
}
],
"file": "common/src/test/java/com... | {
"body": "@Test\n public void processingStepAsStepAnnotationsNamesMatchClasses() {\n Step step = BasicAnnotationProcessor.asStep(new MultiAnnotationProcessingStep());\n\n assertThat(step.annotations())\n .containsExactly(\n AnAnnotation.class.getCanonicalName(), ReferencesAClass.class.getCan... | {
"fields": [
{
"declarator": "deferredElementNames = new LinkedHashSet<>()",
"modifier": "private final",
"original_string": "private final Set<ElementName> deferredElementNames = new LinkedHashSet<>();",
"type": "Set<ElementName>",
"var_name": "deferredElementNames"
},
{
... | {
"body": "protected static Step asStep(ProcessingStep processingStep) {\n return new ProcessingStepAsStep(processingStep);\n }",
"class_method_signature": "BasicAnnotationProcessor.asStep(ProcessingStep processingStep)",
"constructor": false,
"full_signature": "protected static Step asStep(ProcessingStep p... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_75 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void getAnnotationMirror() {\n TypeElement element =\n compilation.getElements().getTypeElement(AnnotatedAnnotation.class.getCanonicalName());\n\n Optional<AnnotationMirror> documented =\n MoreElements.getAnnotationMirror(element, Documented.class);\n Optional<Annotat... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static Optional<AnnotationMirror> getAnnotationMirror(Element element,\n Class<? extends Annotation> annotationClass) {\n String annotationClassName = annotationClass.getCanonicalName();\n for (AnnotationMirror annotationMirror : element.getAnnotationMirrors()) {\n TypeElement annota... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_22 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/extension/serializable/serializer/impl/IdentitySerializerFactoryTest.java",
"identifier": "IdentitySerializerFactoryTest",
"interfaces": "",
"superclass": "extends CompilationAbstractTest"
} | {
"body": "@Test\n public void fromProxy_isUnchanged() throws Exception {\n TypeMirror typeMirror = typeMirrorOf(String.class);\n CodeBlock inputExpression = CodeBlock.of(\"x\");\n\n CodeBlock outputExpression =\n IdentitySerializerFactory.getSerializer(typeMirror).fromProxy(inputExpression);\n\n ... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/IdentitySerializerFactory.java",
"identifier": "IdentitySerializerFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "IdentitySerializerFactory.getSerializer(TypeMirror typeMir... | {
"body": "public static Serializer getSerializer(TypeMirror typeMirror) {\n return new IdentitySerializer(typeMirror);\n }",
"class_method_signature": "IdentitySerializerFactory.getSerializer(TypeMirror typeMirror)",
"constructor": false,
"full_signature": "public static Serializer getSerializer(TypeMirror... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_23 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/extension/serializable/serializer/impl/IdentitySerializerFactoryTest.java",
"identifier": "IdentitySerializerFactoryTest",
"interfaces": "",
"superclass": "extends CompilationAbstractTest"
} | {
"body": "@Test\n public void isIdentity() throws Exception {\n TypeMirror typeMirror = typeMirrorOf(String.class);\n\n boolean actualIsIdentity = IdentitySerializerFactory.getSerializer(typeMirror).isIdentity();\n\n assertThat(actualIsIdentity).isTrue();\n }",
"class_method_signature": "IdentitySeriali... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/IdentitySerializerFactory.java",
"identifier": "IdentitySerializerFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "IdentitySerializerFactory.getSerializer(TypeMirror typeMir... | {
"body": "public static Serializer getSerializer(TypeMirror typeMirror) {\n return new IdentitySerializer(typeMirror);\n }",
"class_method_signature": "IdentitySerializerFactory.getSerializer(TypeMirror typeMirror)",
"constructor": false,
"full_signature": "public static Serializer getSerializer(TypeMirror... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_74 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void isAnnotationPresent() {\n TypeElement annotatedAnnotationElement =\n compilation.getElements().getTypeElement(AnnotatedAnnotation.class.getCanonicalName());\n assertThat(MoreElements.isAnnotationPresent(annotatedAnnotationElement, Documented.class))\n .isTrue();\n ... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static boolean isAnnotationPresent(Element element,\n Class<? extends Annotation> annotationClass) {\n return getAnnotationMirror(element, annotationClass).isPresent();\n }",
"class_method_signature": "MoreElements.isAnnotationPresent(Element element,\n Class<? extends Annotation> an... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_62 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void invalidAnnotationValue() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\"test.Outer\",\n \"package test;\",\n \"\",\n \"final class Outer {\",\n \" @interface TestAnnotation {\",\n \" Class[] classes();\",\n \" }\",... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_35 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/SimpleServiceLoaderTest.java",
"identifier": "SimpleServiceLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void brokenLoader() {\n ClassLoader loader =\n new URLClassLoader(new URL[0]) {\n @Override\n public Enumeration<URL> getResources(String name) throws IOException {\n throw new IOException(\"bang\");\n }\n };\n\n try {\n SimpleS... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/SimpleServiceLoader.java",
"identifier": "SimpleServiceLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleServiceLoader.SimpleServiceLoader()",
"constructor": true,
"full_signature": "pri... | {
"body": "public static <T> ImmutableList<T> load(Class<? extends T> service, ClassLoader loader) {\n String resourceName = \"META-INF/services/\" + service.getName();\n List<URL> resourceUrls;\n try {\n resourceUrls = Collections.list(loader.getResources(resourceName));\n } catch (IOException e) {\... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_19 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void fromProxy() {\n TypeMirror typeMirror = declaredTypeOf(ImmutableMap.class, Integer.class, String.class);\n\n Serializer serializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n CodeBlock actualCodeBlock = serializer.f... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableMapSerializerExtension.java",
"identifier": "ImmutableMapSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableMapSeri... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableMap(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the K, V of ImmutableMap<K, V>.\n TypeMirror keyType = ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_103 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getString() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"stringValue\");\n assertThat(AnnotationValues.getString(value)).isEqualTo(\"hello\");\n }",
"class_method_signature": "AnnotationValuesTest.getString()",
"constructor": false,
... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static String getString(AnnotationValue value) {\n return valueOfType(value, String.class);\n }",
"class_method_signature": "AnnotationValues.getString(AnnotationValue value)",
"constructor": false,
"full_signature": "public static String getString(AnnotationValue value)",
"identifier": ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_115 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getShorts() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"shortValues\");\n assertThat(AnnotationValues.getShorts(value)).containsExactly((short) 11, (short) 12).inOrder();\n }",
"class_method_signature": "AnnotationValuesTest.getShorts()... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<Short> getShorts(AnnotationValue value) {\n return SHORTS_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getShorts(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<Short> getShorts(AnnotationValue va... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_58 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void handlesRecursiveTypeParams() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"class TestClass<T extends Comparable<T>> {}\");\n assertAbout(javaSource())\n .that(javaFileO... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_97 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"declarator": "... | {
"body": "@Test public void testGetValueEntryFailure() {\n try {\n AnnotationMirrors.getAnnotationValue(annotationOn(TestClassBlah.class), \"a\");\n } catch (IllegalArgumentException e) {\n assertThat(e)\n .hasMessageThat()\n .isEqualTo(\n \"@com.google.auto.common.Anno... | {
"fields": [
{
"declarator": "ANNOTATION_MIRROR_EQUIVALENCE =\n new Equivalence<AnnotationMirror>() {\n @Override\n protected boolean doEquivalent(AnnotationMirror left, AnnotationMirror right) {\n return MoreTypes.equivalence().equivalent(left.getAnnotationType(),\n ... | {
"body": "public static AnnotationValue getAnnotationValue(\n AnnotationMirror annotationMirror, String elementName) {\n return getAnnotationElementAndValue(annotationMirror, elementName).getValue();\n }",
"class_method_signature": "AnnotationMirrors.getAnnotationValue(\n AnnotationMirror annotationM... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_78 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void getAllMethods() {\n Elements elements = compilation.getElements();\n Types types = compilation.getTypes();\n TypeMirror intMirror = types.getPrimitiveType(TypeKind.INT);\n TypeMirror longMirror = types.getPrimitiveType(TypeKind.LONG);\n TypeElement childType = elements.g... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static ImmutableSet<ExecutableElement> getAllMethods(\n TypeElement type, Types typeUtils, Elements elementUtils) {\n return getAllMethods(type, new ExplicitOverrides(typeUtils));\n }",
"class_method_signature": "MoreElements.getAllMethods(\n TypeElement type, Types typeUtils, Elemen... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_1 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void getSerializer_nonImmutableList_emptyReturned() {\n TypeMirror typeMirror = typeMirrorOf(String.class);\n\n Optional<Serializer> actualSerializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment);\n\n assertThat(actualSerializer).i... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableListSerializerExtension.java",
"identifier": "ImmutableListSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableListS... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableList(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the T of ImmutableList<T>.\n TypeMirror containedType ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_81 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"de... | {
"body": "@Test\n public void equivalence() {\n Types types = compilationRule.getTypes();\n Elements elements = compilationRule.getElements();\n TypeMirror objectType = elements.getTypeElement(Object.class.getCanonicalName()).asType();\n TypeMirror stringType = elements.getTypeElement(String.class.getCa... | {
"fields": [
{
"declarator": "HASH_SEED = 17",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 17;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "HASH_MULTIPLIER = 31",
"modifier": "private static final",... | {
"body": "public static Equivalence<TypeMirror> equivalence() {\n return TypeEquivalence.INSTANCE;\n }",
"class_method_signature": "MoreTypes.equivalence()",
"constructor": false,
"full_signature": "public static Equivalence<TypeMirror> equivalence()",
"identifier": "equivalence",
"invocations": [],
... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_123 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getChars() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"charValues\");\n assertThat(AnnotationValues.getChars(value)).containsExactly('b', 'c').inOrder();\n }",
"class_method_signature": "AnnotationValuesTest.getChars()",
"constructor"... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<Character> getChars(AnnotationValue value) {\n return CHARS_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getChars(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<Character> getChars(AnnotationValu... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_39 | {
"fields": [
{
"declarator": "TOKENS =\n ImmutableList.of(\n \" \",\n \"\\\"hello \\\\\\\" world\\\\n\\\"\",\n \"'a'\",\n \" \",\n \"'\\\\t'\",\n \" \",\n \"`com.google.Foo`\",\n \" \",\n \"\\n \",\n \"/* c... | {
"body": "@Test\n public void testScanner() {\n String input = Joiner.on(\"\").join(TOKENS);\n ImmutableList.Builder<String> tokensBuilder = ImmutableList.builder();\n JavaScanner tokenizer = new JavaScanner(input);\n int end;\n for (int i = 0; i < input.length(); i = end) {\n end = tokenizer.to... | {
"fields": [
{
"declarator": "s",
"modifier": "private final",
"original_string": "private final String s;",
"type": "String",
"var_name": "s"
}
],
"file": "value/src/main/java/com/google/auto/value/processor/JavaScanner.java",
"identifier": "JavaScanner",
"interfaces": ... | {
"body": "int tokenEnd(int start) {\n if (start >= s.length()) {\n return s.length();\n }\n switch (s.charAt(start)) {\n case ' ':\n case '\\n':\n return spaceEnd(start);\n case '/':\n if (s.charAt(start + 1) == '*') {\n return blockCommentEnd(start);\n } el... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_42 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@ClassRule public static final",
"original_string": "@ClassRule public static final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule... | {
"body": "@Test\n public void hairyTypeParameters() {\n TypeElement source3 = elementUtils.getTypeElement(Source3.class.getCanonicalName());\n TypeElement target3 = elementUtils.getTypeElement(Target3.class.getCanonicalName());\n List<ExecutableElement> sourceMethods = ElementFilter.methodsIn(source3.getEn... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/TypeVariables.java",
"identifier": "TypeVariables",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeVariables.TypeVariables()",
"constructor": true,
"full_signature": "private TypeVariables()",
... | {
"body": "static ImmutableMap<ExecutableElement, TypeMirror> rewriteReturnTypes(\n Elements elementUtils,\n Types typeUtils,\n Collection<ExecutableElement> methods,\n TypeElement sourceType,\n TypeElement targetType) {\n List<? extends TypeParameterElement> sourceTypeParameters = sourceT... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_15 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void getSerializer_immutableMapWithSerializableContainedTypes_emptyReturned() {\n fakeSerializerFactory.setReturnIdentitySerializer(true);\n TypeMirror typeMirror = typeMirrorOf(ImmutableMap.class);\n\n Optional<Serializer> actualSerializer =\n extension.getSerializer(typeMi... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableMapSerializerExtension.java",
"identifier": "ImmutableMapSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableMapSeri... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableMap(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the K, V of ImmutableMap<K, V>.\n TypeMirror keyType = ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_119 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getDoubles() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"doubleValues\");\n assertThat(AnnotationValues.getDoubles(value)).containsExactly(17D, 18D).inOrder();\n }",
"class_method_signature": "AnnotationValuesTest.getDoubles()",
"cons... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<Double> getDoubles(AnnotationValue value) {\n return DOUBLES_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getDoubles(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<Double> getDoubles(AnnotationVa... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_54 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void missingReturnTypeTypeParameter() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"import java.util.Map;\",\n \"import java.util.Set;\",\n \"\",\n \"abstract cla... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_94 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"declarator": "... | {
"body": "@Test public void testEquivalences() {\n EquivalenceTester<AnnotationMirror> tester =\n EquivalenceTester.of(AnnotationMirrors.equivalence());\n\n tester.addEquivalenceGroup(\n annotationOn(SimplyAnnotated.class),\n annotationOn(AlsoSimplyAnnotated.class));\n\n tester.addEquiv... | {
"fields": [
{
"declarator": "ANNOTATION_MIRROR_EQUIVALENCE =\n new Equivalence<AnnotationMirror>() {\n @Override\n protected boolean doEquivalent(AnnotationMirror left, AnnotationMirror right) {\n return MoreTypes.equivalence().equivalent(left.getAnnotationType(),\n ... | {
"body": "public static Equivalence<AnnotationMirror> equivalence() {\n return ANNOTATION_MIRROR_EQUIVALENCE;\n }",
"class_method_signature": "AnnotationMirrors.equivalence()",
"constructor": false,
"full_signature": "public static Equivalence<AnnotationMirror> equivalence()",
"identifier": "equivalence"... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_2 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void getSerializer_immutableListWithSerializableContainedType_emptyReturned() {\n fakeSerializerFactory.setReturnIdentitySerializer(true);\n TypeMirror typeMirror = typeMirrorOf(ImmutableList.class);\n\n Optional<Serializer> actualSerializer =\n extension.getSerializer(typeM... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableListSerializerExtension.java",
"identifier": "ImmutableListSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableListS... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableList(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the T of ImmutableList<T>.\n TypeMirror containedType ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_82 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"de... | {
"body": "@Test public void testReferencedTypes() {\n Elements elements = compilationRule.getElements();\n TypeElement testDataElement = elements\n .getTypeElement(ReferencedTypesTestData.class.getCanonicalName());\n ImmutableMap<String, VariableElement> fieldIndex =\n FluentIterable.from(Elem... | {
"fields": [
{
"declarator": "HASH_SEED = 17",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 17;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "HASH_MULTIPLIER = 31",
"modifier": "private static final",... | {
"body": "public static ImmutableSet<TypeElement> referencedTypes(TypeMirror type) {\n checkNotNull(type);\n ImmutableSet.Builder<TypeElement> elements = ImmutableSet.builder();\n type.accept(ReferencedTypes.INSTANCE, elements);\n return elements.build();\n }",
"class_method_signature": "MoreTypes.ref... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_120 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getBoolean() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"booleanValue\");\n assertThat(AnnotationValues.getBoolean(value)).isTrue();\n }",
"class_method_signature": "AnnotationValuesTest.getBoolean()",
"constructor": false,
"full_si... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static boolean getBoolean(AnnotationValue value) {\n return valueOfType(value, Boolean.class);\n }",
"class_method_signature": "AnnotationValues.getBoolean(AnnotationValue value)",
"constructor": false,
"full_signature": "public static boolean getBoolean(AnnotationValue value)",
"identif... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_41 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@ClassRule public static final",
"original_string": "@ClassRule public static final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule... | {
"body": "@Test\n public void simpleTypeParameter() {\n TypeElement source2 = elementUtils.getTypeElement(Source2.class.getCanonicalName());\n TypeElement target2 = elementUtils.getTypeElement(Target2.class.getCanonicalName());\n List<ExecutableElement> sourceMethods = ElementFilter.methodsIn(source2.getEn... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/TypeVariables.java",
"identifier": "TypeVariables",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeVariables.TypeVariables()",
"constructor": true,
"full_signature": "private TypeVariables()",
... | {
"body": "static ImmutableMap<ExecutableElement, TypeMirror> rewriteReturnTypes(\n Elements elementUtils,\n Types typeUtils,\n Collection<ExecutableElement> methods,\n TypeElement sourceType,\n TypeElement targetType) {\n List<? extends TypeParameterElement> sourceTypeParameters = sourceT... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_16 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void getSerializer_immutableMap_serializerReturned() {\n TypeMirror typeMirror = typeMirrorOf(ImmutableMap.class);\n\n Serializer actualSerializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n\n assertThat(actualSerializer... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableMapSerializerExtension.java",
"identifier": "ImmutableMapSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableMapSeri... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableMap(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the K, V of ImmutableMap<K, V>.\n TypeMirror keyType = ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_57 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void missingAnnotation() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"@MissingAnnotation\",\n \"class TestClass {}\");\n assertAbout(javaSource())\n .that(javaFileOb... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_20 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/extension/serializable/serializer/impl/IdentitySerializerFactoryTest.java",
"identifier": "IdentitySerializerFactoryTest",
"interfaces": "",
"superclass": "extends CompilationAbstractTest"
} | {
"body": "@Test\n public void proxyFieldType_isUnchanged() throws Exception {\n TypeMirror typeMirror = typeMirrorOf(String.class);\n\n TypeMirror actualTypeMirror =\n IdentitySerializerFactory.getSerializer(typeMirror).proxyFieldType();\n\n assertThat(actualTypeMirror).isSameInstanceAs(typeMirror);... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/IdentitySerializerFactory.java",
"identifier": "IdentitySerializerFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "IdentitySerializerFactory.getSerializer(TypeMirror typeMir... | {
"body": "public static Serializer getSerializer(TypeMirror typeMirror) {\n return new IdentitySerializer(typeMirror);\n }",
"class_method_signature": "IdentitySerializerFactory.getSerializer(TypeMirror typeMirror)",
"constructor": false,
"full_signature": "public static Serializer getSerializer(TypeMirror... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_77 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void getLocalAndInheritedMethods() {\n Elements elements = compilation.getElements();\n Types types = compilation.getTypes();\n TypeMirror intMirror = types.getPrimitiveType(TypeKind.INT);\n TypeMirror longMirror = types.getPrimitiveType(TypeKind.LONG);\n TypeElement childTyp... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "@Deprecated\n public static ImmutableSet<ExecutableElement> getLocalAndInheritedMethods(\n TypeElement type, Elements elementUtils) {\n Overrides overrides = new Overrides.NativeOverrides(elementUtils);\n return getLocalAndInheritedMethods(type, overrides);\n }",
"class_method_signature": "M... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_98 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getTypeMirror() {\n TypeElement insideClassA = getTypeElement(InsideClassA.class);\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"classValue\");\n assertThat(AnnotationValues.getTypeMirror(value).asElement()).isEqualTo(insideClassA);\n }",
... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static DeclaredType getTypeMirror(AnnotationValue value) {\n return TypeMirrorVisitor.INSTANCE.visit(value);\n }",
"class_method_signature": "AnnotationValues.getTypeMirror(AnnotationValue value)",
"constructor": false,
"full_signature": "public static DeclaredType getTypeMirror(Annotation... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_61 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void missingIntersection() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"class TestClass<T extends Number & Missing> {}\");\n assertAbout(javaSource())\n .that(javaFileObjec... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_36 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/TemplateVarsTest.java",
"identifier": "TemplateVarsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHappy() {\n HappyVars happy = new HappyVars();\n happy.integer = 23;\n happy.string = \"wibble\";\n happy.list = ImmutableList.of(5, 17, 23);\n assertThat(HappyVars.IGNORED_STATIC_FINAL).isEqualTo(\"hatstand\"); // avoids unused warning\n String expectedText = \"i... | {
"fields": [
{
"declarator": "fields",
"modifier": "private final",
"original_string": "private final ImmutableList<Field> fields;",
"type": "ImmutableList<Field>",
"var_name": "fields"
}
],
"file": "value/src/main/java/com/google/auto/value/processor/TemplateVars.java",
"... | {
"body": "String toText() {\n Map<String, Object> vars = toVars();\n return parsedTemplate().evaluate(vars);\n }",
"class_method_signature": "TemplateVars.toText()",
"constructor": false,
"full_signature": " String toText()",
"identifier": "toText",
"invocations": [
"toVars",
"evaluate",
... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_100 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getTypeMirrors() {\n TypeMirror insideClassA = getTypeElement(InsideClassA.class).asType();\n TypeMirror insideClassB = getTypeElement(InsideClassB.class).asType();\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"classValues\");\n Immutabl... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<DeclaredType> getTypeMirrors(AnnotationValue value) {\n return TYPE_MIRRORS_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getTypeMirrors(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<DeclaredType... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_116 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getFloat() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"floatValue\");\n assertThat(AnnotationValues.getFloat(value)).isEqualTo(13F);\n }",
"class_method_signature": "AnnotationValuesTest.getFloat()",
"constructor": false,
"full_sign... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static float getFloat(AnnotationValue value) {\n return valueOfType(value, Float.class);\n }",
"class_method_signature": "AnnotationValues.getFloat(AnnotationValue value)",
"constructor": false,
"full_signature": "public static float getFloat(AnnotationValue value)",
"identifier": "getFl... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_117 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getFloats() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"floatValues\");\n assertThat(AnnotationValues.getFloats(value)).containsExactly(14F, 15F).inOrder();\n }",
"class_method_signature": "AnnotationValuesTest.getFloats()",
"construc... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<Float> getFloats(AnnotationValue value) {\n return FLOATS_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getFloats(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<Float> getFloats(AnnotationValue va... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_101 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getAnnotationMirror() {\n TypeElement insideAnnotation = getTypeElement(InsideAnnotation.class);\n AnnotationValue value =\n AnnotationMirrors.getAnnotationValue(annotationMirror, \"insideAnnotationValue\");\n AnnotationMirror annotationMirror = AnnotationValues.getAnno... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static AnnotationMirror getAnnotationMirror(AnnotationValue value) {\n return AnnotationMirrorVisitor.INSTANCE.visit(value);\n }",
"class_method_signature": "AnnotationValues.getAnnotationMirror(AnnotationValue value)",
"constructor": false,
"full_signature": "public static AnnotationMirro... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_37 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/TemplateVarsTest.java",
"identifier": "TemplateVarsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnset() {\n HappyVars sad = new HappyVars();\n sad.integer = 23;\n sad.list = ImmutableList.of(23);\n try {\n sad.toText();\n fail(\"Did not get expected exception\");\n } catch (IllegalArgumentException expected) {\n }\n }",
"class_method_signature":... | {
"fields": [
{
"declarator": "fields",
"modifier": "private final",
"original_string": "private final ImmutableList<Field> fields;",
"type": "ImmutableList<Field>",
"var_name": "fields"
}
],
"file": "value/src/main/java/com/google/auto/value/processor/TemplateVars.java",
"... | {
"body": "String toText() {\n Map<String, Object> vars = toVars();\n return parsedTemplate().evaluate(vars);\n }",
"class_method_signature": "TemplateVars.toText()",
"constructor": false,
"full_signature": " String toText()",
"identifier": "toText",
"invocations": [
"toVars",
"evaluate",
... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_60 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void missingWildcardBound() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"import java.util.Set;\",\n \"\",\n \"class TestClass {\",\n \" Set<? extends MissingTyp... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_76 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void getLocalAndInheritedMethods_Old() {\n Elements elements = compilation.getElements();\n Types types = compilation.getTypes();\n TypeMirror intMirror = types.getPrimitiveType(TypeKind.INT);\n TypeMirror longMirror = types.getPrimitiveType(TypeKind.LONG);\n TypeElement chil... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "@Deprecated\n public static ImmutableSet<ExecutableElement> getLocalAndInheritedMethods(\n TypeElement type, Elements elementUtils) {\n Overrides overrides = new Overrides.NativeOverrides(elementUtils);\n return getLocalAndInheritedMethods(type, overrides);\n }",
"class_method_signature": "M... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_99 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getTypeMirrorGenericClass() {\n TypeElement genericClass = getTypeElement(GenericClass.class);\n AnnotationValue gvalue =\n AnnotationMirrors.getAnnotationValue(annotationMirror, \"genericClassValue\");\n assertThat(AnnotationValues.getTypeMirror(gvalue).asElement()).is... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static DeclaredType getTypeMirror(AnnotationValue value) {\n return TypeMirrorVisitor.INSTANCE.visit(value);\n }",
"class_method_signature": "AnnotationValues.getTypeMirror(AnnotationValue value)",
"constructor": false,
"full_signature": "public static DeclaredType getTypeMirror(Annotation... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_21 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/extension/serializable/serializer/impl/IdentitySerializerFactoryTest.java",
"identifier": "IdentitySerializerFactoryTest",
"interfaces": "",
"superclass": "extends CompilationAbstractTest"
} | {
"body": "@Test\n public void toProxy_isUnchanged() throws Exception {\n TypeMirror typeMirror = typeMirrorOf(String.class);\n CodeBlock inputExpression = CodeBlock.of(\"x\");\n\n CodeBlock outputExpression =\n IdentitySerializerFactory.getSerializer(typeMirror).toProxy(inputExpression);\n\n asse... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/IdentitySerializerFactory.java",
"identifier": "IdentitySerializerFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "IdentitySerializerFactory.getSerializer(TypeMirror typeMir... | {
"body": "public static Serializer getSerializer(TypeMirror typeMirror) {\n return new IdentitySerializer(typeMirror);\n }",
"class_method_signature": "IdentitySerializerFactory.getSerializer(TypeMirror typeMirror)",
"constructor": false,
"full_signature": "public static Serializer getSerializer(TypeMirror... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_56 | {
"fields": [],
"file": "common/src/test/java/com/google/auto/common/SuperficialValidationTest.java",
"identifier": "SuperficialValidationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void missingParameterType() {\n JavaFileObject javaFileObject = JavaFileObjects.forSourceLines(\n \"test.TestClass\",\n \"package test;\",\n \"\",\n \"abstract class TestClass {\",\n \" abstract void foo(MissingType x);\",\n \"}\");\n assertA... | {
"fields": [
{
"declarator": "ELEMENT_VALIDATING_VISITOR =\n new AbstractElementVisitor8<Boolean, Void>() {\n @Override public Boolean visitPackage(PackageElement e, Void p) {\n // don't validate enclosed elements because it will return types in the package\n return validateAn... | {
"body": "public static boolean validateElement(Element element) {\n return element.accept(ELEMENT_VALIDATING_VISITOR, null);\n }",
"class_method_signature": "SuperficialValidation.validateElement(Element element)",
"constructor": false,
"full_signature": "public static boolean validateElement(Element elem... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_17 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void proxyFieldType() {\n TypeMirror typeMirror = declaredTypeOf(ImmutableMap.class, Integer.class, String.class);\n\n Serializer serializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n TypeMirror actualTypeMirror = seria... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableMapSerializerExtension.java",
"identifier": "ImmutableMapSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableMapSeri... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableMap(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the K, V of ImmutableMap<K, V>.\n TypeMirror keyType = ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_40 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@ClassRule public static final",
"original_string": "@ClassRule public static final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule... | {
"body": "@Test\n public void noTypeParameters() {\n TypeElement source1 = elementUtils.getTypeElement(Source1.class.getCanonicalName());\n TypeElement target1 = elementUtils.getTypeElement(Target1.class.getCanonicalName());\n List<ExecutableElement> sourceMethods = ElementFilter.methodsIn(source1.getEnclo... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/TypeVariables.java",
"identifier": "TypeVariables",
"interfaces": "",
"methods": [
{
"class_method_signature": "TypeVariables.TypeVariables()",
"constructor": true,
"full_signature": "private TypeVariables()",
... | {
"body": "static ImmutableMap<ExecutableElement, TypeMirror> rewriteReturnTypes(\n Elements elementUtils,\n Types typeUtils,\n Collection<ExecutableElement> methods,\n TypeElement sourceType,\n TypeElement targetType) {\n List<? extends TypeParameterElement> sourceTypeParameters = sourceT... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_121 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getBooleans() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"booleanValues\");\n assertThat(AnnotationValues.getBooleans(value)).containsExactly(true, false).inOrder();\n }",
"class_method_signature": "AnnotationValuesTest.getBooleans()",
... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<Boolean> getBooleans(AnnotationValue value) {\n return BOOLEANS_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getBooleans(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<Boolean> getBooleans(Annota... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_83 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"de... | {
"body": "@Test\n public void asElement_throws() {\n TypeMirror javaDotLang =\n compilationRule.getElements().getPackageElement(\"java.lang\").asType();\n try {\n MoreTypes.asElement(javaDotLang);\n fail();\n } catch (IllegalArgumentException expected) {}\n\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "HASH_SEED = 17",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 17;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "HASH_MULTIPLIER = 31",
"modifier": "private static final",... | {
"body": "public static Element asElement(TypeMirror typeMirror) {\n return typeMirror.accept(AsElementVisitor.INSTANCE, null);\n }",
"class_method_signature": "MoreTypes.asElement(TypeMirror typeMirror)",
"constructor": false,
"full_signature": "public static Element asElement(TypeMirror typeMirror)",
"... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_3 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void getSerializer_immutableList_serializerReturned() {\n TypeMirror typeMirror = typeMirrorOf(ImmutableList.class);\n\n Serializer actualSerializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n\n assertThat(actualSerializ... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableListSerializerExtension.java",
"identifier": "ImmutableListSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableListS... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableList(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the T of ImmutableList<T>.\n TypeMirror containedType ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_95 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"declarator": "... | {
"body": "@Test public void testGetDefaultValuesUnset() {\n assertThat(annotationOn(StringyUnset.class).getElementValues()).isEmpty();\n Iterable<AnnotationValue> values = AnnotationMirrors.getAnnotationValuesWithDefaults(\n annotationOn(StringyUnset.class)).values();\n String value = getOnlyElement(... | {
"fields": [
{
"declarator": "ANNOTATION_MIRROR_EQUIVALENCE =\n new Equivalence<AnnotationMirror>() {\n @Override\n protected boolean doEquivalent(AnnotationMirror left, AnnotationMirror right) {\n return MoreTypes.equivalence().equivalent(left.getAnnotationType(),\n ... | {
"body": "public static ImmutableMap<ExecutableElement, AnnotationValue> getAnnotationValuesWithDefaults(\n AnnotationMirror annotation) {\n ImmutableMap.Builder<ExecutableElement, AnnotationValue> values = ImmutableMap.builder();\n Map<? extends ExecutableElement, ? extends AnnotationValue> declaredValue... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_26 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/ReformatterTest.java",
"identifier": "ReformatterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void noTrailingNewline() {\n String input = \"package com.example.whatever;\\n\\npublic class SomeClass {}\";\n String output = input + \"\\n\";\n assertEquals(output, Reformatter.fixup(input));\n }",
"class_method_signature": "ReformatterTest.noTrailingNewline()",
"constructo... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/Reformatter.java",
"identifier": "Reformatter",
"interfaces": "",
"methods": [
{
"class_method_signature": "Reformatter.fixup(String s)",
"constructor": false,
"full_signature": "static String fixup(String s)",
... | {
"body": "static String fixup(String s) {\n StringBuilder out = new StringBuilder();\n JavaScanner scanner = new JavaScanner(s);\n s = scanner.string();\n int len = s.length();\n for (int start = 0, previous = 0, braces = 0, parens = 0, end = 0;\n start < len;\n previous = start, start =... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_71 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void asVariable_illegalArgument() {\n try {\n MoreElements.asVariable(javaLangPackageElement);\n fail();\n } catch (IllegalArgumentException expected) {}\n }",
"class_method_signature": "MoreElementsTest.asVariable_illegalArgument()",
"constructor": false,
"full_signa... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static VariableElement asVariable(Element element) {\n return element.accept(VariableElementVisitor.INSTANCE, null);\n }",
"class_method_signature": "MoreElements.asVariable(Element element)",
"constructor": false,
"full_signature": "public static VariableElement asVariable(Element element... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_67 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public",
"original_string": "@Rule public CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "expect = Exp... | {
"body": "@Test\n public void asTypeParameterElement() {\n Element typeParameterElement =\n getOnlyElement(\n compilation\n .getElements()\n .getTypeElement(List.class.getCanonicalName())\n .getTypeParameters());\n assertThat(MoreElements.asTypePa... | {
"fields": [],
"file": "common/src/main/java/com/google/auto/common/MoreElements.java",
"identifier": "MoreElements",
"interfaces": "",
"methods": [
{
"class_method_signature": "MoreElements.getPackage(Element element)",
"constructor": false,
"full_signature": "public static PackageElem... | {
"body": "public static TypeParameterElement asTypeParameter(Element element) {\n return element.accept(TypeParameterElementVisitor.INSTANCE, null);\n }",
"class_method_signature": "MoreElements.asTypeParameter(Element element)",
"constructor": false,
"full_signature": "public static TypeParameterElement a... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_88 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void arrays() {\n SimpleTypeAnnotationValue.of(types.getArrayType(objectType));\n SimpleTypeAnnotationValue.of(types.getArrayType(primitiveType));\n }",
"class_method_signature": "SimpleTypeAnnotationValueTest.arrays()",
"constructor": false,
"full_signature": "@Test public voi... | {
"fields": [
{
"declarator": "value",
"modifier": "private final",
"original_string": "private final TypeMirror value;",
"type": "TypeMirror",
"var_name": "value"
}
],
"file": "common/src/main/java/com/google/auto/common/SimpleTypeAnnotationValue.java",
"identifier": "Simp... | {
"body": "public static AnnotationValue of(TypeMirror value) {\n return new SimpleTypeAnnotationValue(value);\n }",
"class_method_signature": "SimpleTypeAnnotationValue.of(TypeMirror value)",
"constructor": false,
"full_signature": "public static AnnotationValue of(TypeMirror value)",
"identifier": "of",... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_8 | {
"fields": [
{
"declarator": "extension",
"modifier": "private",
"original_string": "private OptionalSerializerExtension extension;",
"type": "OptionalSerializerExtension",
"var_name": "extension"
},
{
"declarator": "fakeSerializerFactory",
"modifier": "private",... | {
"body": "@Test\n public void getSerializer_optional_serializerReturned() {\n TypeMirror typeMirror = typeMirrorOf(Optional.class);\n\n Serializer actualSerializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n\n assertThat(actualSerializer.getClas... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/OptionalSerializerExtension.java",
"identifier": "OptionalSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "OptionalSerializerExtens... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isOptional(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the T of Optional<T>.\n TypeMirror containedType = getConta... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_30 | {
"fields": [],
"file": "value/src/test/java/com/google/auto/value/processor/SimpleServiceLoaderTest.java",
"identifier": "SimpleServiceLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void loadTwiceFromDifferentLoaders() throws Exception {\n URL jarUrl =\n urlForJarWithEntries(\n CharSequence.class.getName(), String.class.getName(), StringBuilder.class.getName());\n ClassLoader loader1 = new URLClassLoader(new URL[] {jarUrl});\n\n ImmutableList... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/processor/SimpleServiceLoader.java",
"identifier": "SimpleServiceLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleServiceLoader.SimpleServiceLoader()",
"constructor": true,
"full_signature": "pri... | {
"body": "public static <T> ImmutableList<T> load(Class<? extends T> service, ClassLoader loader) {\n String resourceName = \"META-INF/services/\" + service.getName();\n List<URL> resourceUrls;\n try {\n resourceUrls = Collections.list(loader.getResources(resourceName));\n } catch (IOException e) {\... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_106 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getEnums() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"enumValues\");\n assertThat(getEnumNames(AnnotationValues.getEnums(value)))\n .containsExactly(Foo.BAZ.name(), Foo.BAH.name())\n .inOrder();\n }",
"class_method_signat... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static ImmutableList<VariableElement> getEnums(AnnotationValue value) {\n return ENUMS_VISITOR.visit(value);\n }",
"class_method_signature": "AnnotationValues.getEnums(AnnotationValue value)",
"constructor": false,
"full_signature": "public static ImmutableList<VariableElement> getEnums(An... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_110 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
},
{
"declarator": "... | {
"body": "@Test\n public void getLong() {\n AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, \"longValue\");\n assertThat(AnnotationValues.getLong(value)).isEqualTo(6L);\n }",
"class_method_signature": "AnnotationValuesTest.getLong()",
"constructor": false,
"full_signature... | {
"fields": [
{
"declarator": "ANNOTATION_VALUE_EQUIVALENCE =\n new Equivalence<AnnotationValue>() {\n @Override protected boolean doEquivalent(AnnotationValue left, AnnotationValue right) {\n return left.accept(new SimpleAnnotationValueVisitor8<Boolean, AnnotationValue>() {\n ... | {
"body": "public static long getLong(AnnotationValue value) {\n return valueOfType(value, Long.class);\n }",
"class_method_signature": "AnnotationValues.getLong(AnnotationValue value)",
"constructor": false,
"full_signature": "public static long getLong(AnnotationValue value)",
"identifier": "getLong",
... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_92 | {
"fields": [
{
"declarator": "compilation = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilation = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilation"
}
],
"file": "common/src/t... | {
"body": "@Test\n public void missingValues() {\n TypeElement multipleValues = getTypeElement(MultipleValues.class);\n expectThrows(() -> SimpleAnnotationMirror.of(multipleValues));\n }",
"class_method_signature": "SimpleAnnotationMirrorTest.missingValues()",
"constructor": false,
"full_signature": "@T... | {
"fields": [
{
"declarator": "annotationType",
"modifier": "private final",
"original_string": "private final TypeElement annotationType;",
"type": "TypeElement",
"var_name": "annotationType"
},
{
"declarator": "namedValues",
"modifier": "private final",
"o... | {
"body": "public static AnnotationMirror of(TypeElement annotationType) {\n return of(annotationType, ImmutableMap.of());\n }",
"class_method_signature": "SimpleAnnotationMirror.of(TypeElement annotationType)",
"constructor": false,
"full_signature": "public static AnnotationMirror of(TypeElement annotatio... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_4 | {
"fields": [
{
"declarator": "FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_WITH_EXCEPTIONS =\n \"com.google.auto.va... | {
"body": "@Test\n public void proxyFieldType() {\n TypeMirror typeMirror = declaredTypeOf(ImmutableList.class, Integer.class);\n\n Serializer serializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n TypeMirror actualTypeMirror = serializer.proxyFi... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/ImmutableListSerializerExtension.java",
"identifier": "ImmutableListSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "ImmutableListS... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isImmutableList(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the T of ImmutableList<T>.\n TypeMirror containedType ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_84 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"de... | {
"body": "@Test\n public void asElement() {\n Elements elements = compilationRule.getElements();\n TypeElement stringElement = elements.getTypeElement(\"java.lang.String\");\n assertThat(MoreTypes.asElement(stringElement.asType())).isEqualTo(stringElement);\n TypeParameterElement setParameterElement = I... | {
"fields": [
{
"declarator": "HASH_SEED = 17",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 17;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "HASH_MULTIPLIER = 31",
"modifier": "private static final",... | {
"body": "public static Element asElement(TypeMirror typeMirror) {\n return typeMirror.accept(AsElementVisitor.INSTANCE, null);\n }",
"class_method_signature": "MoreTypes.asElement(TypeMirror typeMirror)",
"constructor": false,
"full_signature": "public static Element asElement(TypeMirror typeMirror)",
"... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_47 | {
"fields": [
{
"declarator": "compilationRule = new CompilationRule()",
"modifier": "@Rule public final",
"original_string": "@Rule public final CompilationRule compilationRule = new CompilationRule();",
"type": "CompilationRule",
"var_name": "compilationRule"
},
{
"de... | {
"body": "@Test\n public void testPackageNameOfString() {\n assertThat(TypeSimplifier.packageNameOf(typeElementOf(java.lang.String.class)))\n .isEqualTo(\"java.lang\");\n }",
"class_method_signature": "TypeSimplifierTest.testPackageNameOfString()",
"constructor": false,
"full_signature": "@Test pub... | {
"fields": [
{
"declarator": "imports",
"modifier": "private final",
"original_string": "private final Map<String, Spelling> imports;",
"type": "Map<String, Spelling>",
"var_name": "imports"
},
{
"declarator": "CASTING_UNCHECKED_VISITOR =\n new SimpleTypeVisitor8<... | {
"body": "static String packageNameOf(TypeElement type) {\n return MoreElements.getPackage(type).getQualifiedName().toString();\n }",
"class_method_signature": "TypeSimplifier.packageNameOf(TypeElement type)",
"constructor": false,
"full_signature": "static String packageNameOf(TypeElement type)",
"ident... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_10 | {
"fields": [
{
"declarator": "extension",
"modifier": "private",
"original_string": "private OptionalSerializerExtension extension;",
"type": "OptionalSerializerExtension",
"var_name": "extension"
},
{
"declarator": "fakeSerializerFactory",
"modifier": "private",... | {
"body": "@Test\n public void toProxy() {\n TypeMirror typeMirror = declaredTypeOf(Optional.class, Integer.class);\n\n Serializer serializer =\n extension.getSerializer(typeMirror, fakeSerializerFactory, mockProcessingEnvironment).get();\n CodeBlock actualCodeBlock = serializer.toProxy(CodeBlock.of(... | {
"fields": [],
"file": "value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/OptionalSerializerExtension.java",
"identifier": "OptionalSerializerExtension",
"interfaces": "implements SerializerExtension",
"methods": [
{
"class_method_signature": "OptionalSerializerExtens... | {
"body": "@Override\n public Optional<Serializer> getSerializer(\n TypeMirror typeMirror, SerializerFactory factory, ProcessingEnvironment processingEnv) {\n if (!isOptional(typeMirror)) {\n return Optional.empty();\n }\n\n // Extract the T of Optional<T>.\n TypeMirror containedType = getConta... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_51 | {
"fields": [],
"file": "value/src/it/functional/src/test/java/PackagelessValueTypeTest.java",
"identifier": "PackagelessValueTypeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNestedValueType() {\n ImmutableMap<Integer, String> numberNames = ImmutableMap.of(1, \"un\", 2, \"deux\");\n PackagelessNestedValueType.Nested nested =\n PackagelessNestedValueType.Nested.create(numberNames);\n assertEquals(numberNames, nested.numberNames());\n }",... | {
"fields": [],
"file": "value/src/it/functional/src/main/java/PackagelessValueType.java",
"identifier": "PackagelessValueType",
"interfaces": "",
"methods": [
{
"class_method_signature": "PackagelessValueType.string()",
"constructor": false,
"full_signature": "@Nullable public abstract ... | {
"body": "public static PackagelessValueType create(\n @Nullable String string, int integer, Map<String, Long> map) {\n // The subclass AutoValue_PackagelessValueType is created by the annotation processor that is\n // triggered by the presence of the @AutoValue annotation. It has a constructor for each\n... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
10230369_50 | {
"fields": [],
"file": "value/src/it/functional/src/test/java/com/google/auto/value/SimpleValueTypeTest.java",
"identifier": "SimpleValueTypeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNestedValueType() {\n ImmutableMap<Integer, String> numberNames = ImmutableMap.of(1, \"un\", 2, \"deux\");\n NestedValueType.Nested nested = NestedValueType.Nested.create(numberNames);\n assertEquals(numberNames, nested.numberNames());\n }",
"class_method_signature": "S... | {
"fields": [],
"file": "value/src/it/functional/src/main/java/com/google/auto/value/SimpleValueType.java",
"identifier": "SimpleValueType",
"interfaces": "",
"methods": [
{
"class_method_signature": "SimpleValueType.string()",
"constructor": false,
"full_signature": "@Nullable public ab... | {
"body": "public static SimpleValueType create(\n @Nullable String string, int integer, Map<String, Long> map) {\n // The subclass AutoValue_SimpleValueType is created by the annotation processor that is\n // triggered by the presence of the @AutoValue annotation. It has a constructor for each\n // of ... | {
"created": "5/22/2013 9:41:56 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 10230369,
"size": null,
"stargazer_count": null,
"stars": 8408,
"updates": "2020-01-27T16:25:00+00:00",
"url": "https://github.com/google/auto"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.