id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
17288475_24
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldGetRendererFromViewHolderAndRenderItOnBind() {\n when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT);\n when(mockedRendererViewHolder.getRenderer()).thenReturn(mockedRenderer);\n\n adapter.onBindViewHolder(mockedRendererViewHolder, ANY_POSITION);\n\n verify(m...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public void onBindViewHolder(RendererViewHolder viewHolder, int position) {\n T content = getItem(position);\n Renderer<T> renderer = viewHolder.getRenderer();\n if (renderer == null) {\n throw new NullRendererBuiltException(\"RendererBuilder have to return a not null renderer\");\n...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_32
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldBuildRendererUsingAllNeededDependencies() {\n when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT);\n when(mockedRendererBuilder.build()).thenReturn(mockedRenderer);\n\n rendererAdapter.getView(ANY_POSITION, mockedConvertView, mockedParent);\n\n verify(mockedR...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public View getView(int position, View convertView, ViewGroup parent) {\n T content = getItem(position);\n rendererBuilder.withContent(content);\n rendererBuilder.withConvertView(convertView);\n rendererBuilder.withParent(parent);\n rendererBuilder.withLayoutInflater(LayoutInflater...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_65
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldClearElementsFromAdapteeCollection() {\n adapter.clear();\n\n verify(mockedCollection).clear();\n }", "class_method_signature": "RVListRendererAdapterTest.shouldClearElementsFromAdapteeCollection()", "constructor": false, "full_signature": "@Test public v...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void clear() {\n collection.clear();\n }", "class_method_signature": "RVListRendererAdapter.clear()", "constructor": false, "full_signature": "public void clear()", "identifier": "clear", "invocations": [ "clear" ], "modifiers": "public", "parameters": "()", "return":...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_7
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldRemoveAllElementsFromAdapteeCollection() {\n adapter.removeAll(ANY_OBJECT_COLLECTION);\n\n verify(mockedCollection).removeAll(ANY_OBJECT_COLLECTION);\n }", "class_method_signature": "VPRendererAdapterTest.shouldRemoveAllElementsFromAdapteeCollection()", "constructor": fal...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public boolean removeAll(Collection<?> elements) {\n return collection.removeAll(elements);\n }", "class_method_signature": "VPRendererAdapter.removeAll(Collection<?> elements)", "constructor": false, "full_signature": "public boolean removeAll(Collection<?> elements)", "identifier": "rem...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_49
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private", "original_string": "private ObjectRendererBuilder rendererBuilder;", "type": "ObjectRendererBuilder", "var_name": "rendererBuilder" }, { "declarator": "prototypes", "modifier": "private", ...
{ "body": "@Test public void shouldAddPrototyeAndconfigureBindingOnConstruction() {\n RendererBuilder<Object> rendererBuilder = new RendererBuilder<Object>(new ObjectRenderer());\n\n assertEquals(ObjectRenderer.class, rendererBuilder.getPrototypeClass(new Object()));\n }", "class_method_signature": "Renderer...
{ "fields": [ { "declarator": "prototypes", "modifier": "private", "original_string": "private List<Renderer<? extends T>> prototypes;", "type": "List<Renderer<? extends T>>", "var_name": "prototypes" }, { "declarator": "content", "modifier": "private", "ori...
{ "body": "protected Class getPrototypeClass(T content) {\n if (prototypes.size() == 1) {\n return prototypes.get(0).getClass();\n } else {\n return binding.get(content.getClass());\n }\n }", "class_method_signature": "RendererBuilder.getPrototypeClass(T content)", "constructor": false, "ful...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_28
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldReturnCollectionSizeOnGetCount() {\n when(mockedCollection.size()).thenReturn(ANY_SIZE);\n\n assertEquals(ANY_SIZE, rendererAdapter.getCount());\n }", "class_method_signature": "RendererAdapterTest.shouldReturnCollectionSizeOnGetCount()", "constructor": false, "full_sig...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public int getCount() {\n return collection.size();\n }", "class_method_signature": "RendererAdapter.getCount()", "constructor": false, "full_signature": "@Override public int getCount()", "identifier": "getCount", "invocations": [ "size" ], "modifiers": "@Override public", ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_69
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldThrowExceptionWhenSetNullCollection() {\n RVListRendererAdapter<Object> adapter = new RVListRendererAdapter<Object>(mockedRendererBuilder,\n mockedDiffItemCallback);\n\n adapter.setCollection(null);\n }"...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void setCollection(AdapteeCollection<T> collection) {\n if (collection == null) {\n throw new IllegalArgumentException(\"The AdapteeCollection configured can't be null\");\n }\n\n this.collection = collection;\n }", "class_method_signature": "RVListRendererAdapte...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_12
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldReturnTheAdapteeCollection() {\n assertEquals(mockedCollection, adapter.getCollection());\n }", "class_method_signature": "RVRendererAdapterTest.shouldReturnTheAdapteeCollection()", "constructor": false, "full_signature": "@Test public void shouldReturnTheAdapteeCollection...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "protected AdapteeCollection<T> getCollection() {\n return collection;\n }", "class_method_signature": "RVRendererAdapter.getCollection()", "constructor": false, "full_signature": "protected AdapteeCollection<T> getCollection()", "identifier": "getCollection", "invocations": [], "modifiers":...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_45
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private", "original_string": "private ObjectRendererBuilder rendererBuilder;", "type": "ObjectRendererBuilder", "var_name": "rendererBuilder" }, { "declarator": "prototypes", "modifier": "private", ...
{ "body": "@Test public void shouldCreateRendererEvenIfTagInConvertViewIsNotNull() {\n when(rendererBuilder.getPrototypeClass(mockedContent)).thenReturn(ObjectRenderer.class);\n when(mockedConvertView.getTag()).thenReturn(subObjectRenderer);\n\n Renderer<Object> renderer =\n buildRenderer(mockedConten...
{ "fields": [ { "declarator": "prototypes", "modifier": "private", "original_string": "private List<Renderer<? extends T>> prototypes;", "type": "List<Renderer<? extends T>>", "var_name": "prototypes" }, { "declarator": "content", "modifier": "private", "ori...
{ "body": "protected Class getPrototypeClass(T content) {\n if (prototypes.size() == 1) {\n return prototypes.get(0).getClass();\n } else {\n return binding.get(content.getClass());\n }\n }", "class_method_signature": "RendererBuilder.getPrototypeClass(T content)", "constructor": false, "ful...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_53
{ "fields": [ { "declarator": "renderer", "modifier": "@Spy private", "original_string": "@Spy private ObjectRenderer renderer;", "type": "ObjectRenderer", "var_name": "renderer" }, { "declarator": "mockedContent", "modifier": "@Mock private", "original_stri...
{ "body": "@Test public void shouldHookListenersViewWithTheInflatedViewAfterOnCreateCall() {\n givenARendererInflatingView(mockedView);\n\n onCreateRenderer();\n\n verify(renderer).hookListeners(mockedView);\n }", "class_method_signature": "RendererTest.shouldHookListenersViewWithTheInflatedViewAfterOnCre...
{ "fields": [ { "declarator": "rootView", "modifier": "private", "original_string": "private View rootView;", "type": "View", "var_name": "rootView" }, { "declarator": "content", "modifier": "private", "original_string": "private T content;", "type": "...
{ "body": "protected void hookListeners(View rootView) { }", "class_method_signature": "Renderer.hookListeners(View rootView)", "constructor": false, "full_signature": "protected void hookListeners(View rootView)", "identifier": "hookListeners", "invocations": [], "modifiers": "protected", "parameters":...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_52
{ "fields": [ { "declarator": "renderer", "modifier": "@Spy private", "original_string": "@Spy private ObjectRenderer renderer;", "type": "ObjectRenderer", "var_name": "renderer" }, { "declarator": "mockedContent", "modifier": "@Mock private", "original_stri...
{ "body": "@Test public void shouldSetUpViewWithTheInflatedViewAfterOnCreateCall() {\n givenARendererInflatingView(mockedView);\n\n onCreateRenderer();\n\n verify(renderer).setUpView(mockedView);\n }", "class_method_signature": "RendererTest.shouldSetUpViewWithTheInflatedViewAfterOnCreateCall()", "const...
{ "fields": [ { "declarator": "rootView", "modifier": "private", "original_string": "private View rootView;", "type": "View", "var_name": "rootView" }, { "declarator": "content", "modifier": "private", "original_string": "private T content;", "type": "...
{ "body": "protected void setUpView(View rootView) { }", "class_method_signature": "Renderer.setUpView(View rootView)", "constructor": false, "full_signature": "protected void setUpView(View rootView)", "identifier": "setUpView", "invocations": [], "modifiers": "protected", "parameters": "(View rootView...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_44
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private", "original_string": "private ObjectRendererBuilder rendererBuilder;", "type": "ObjectRendererBuilder", "var_name": "rendererBuilder" }, { "declarator": "prototypes", "modifier": "private", ...
{ "body": "@Test public void shouldReturnRecycledRenderer() {\n when(rendererBuilder.getPrototypeClass(mockedContent)).thenReturn(ObjectRenderer.class);\n when(mockedConvertView.getTag()).thenReturn(objectRenderer);\n\n Renderer<Object> renderer =\n buildRenderer(mockedContent, mockedConvertView, mock...
{ "fields": [ { "declarator": "prototypes", "modifier": "private", "original_string": "private List<Renderer<? extends T>> prototypes;", "type": "List<Renderer<? extends T>>", "var_name": "prototypes" }, { "declarator": "content", "modifier": "private", "ori...
{ "body": "protected Class getPrototypeClass(T content) {\n if (prototypes.size() == 1) {\n return prototypes.get(0).getClass();\n } else {\n return binding.get(content.getClass());\n }\n }", "class_method_signature": "RendererBuilder.getPrototypeClass(T content)", "constructor": false, "ful...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_13
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldReturnCollectionSizeOnGetCount() {\n when(mockedCollection.size()).thenReturn(ANY_SIZE);\n\n assertEquals(ANY_SIZE, adapter.getItemCount());\n }", "class_method_signature": "RVRendererAdapterTest.shouldReturnCollectionSizeOnGetCount()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public int getItemCount() {\n return collection.size();\n }", "class_method_signature": "RVRendererAdapter.getItemCount()", "constructor": false, "full_signature": "@Override public int getItemCount()", "identifier": "getItemCount", "invocations": [ "size" ], "modifiers": "@...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_68
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldBeEmptyWhenItsCreatedWithJustARendererBuilder() {\n RVListRendererAdapter<Object> adapter = new RVListRendererAdapter<Object>(mockedRendererBuilder,\n mockedDiffItemCallback);\n\n assertEquals(0, adapter.getItemCount());\n }", "class_method_sig...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override\n public int getItemCount() {\n return collection.size();\n }", "class_method_signature": "RVListRendererAdapter.getItemCount()", "constructor": false, "full_signature": "@Override public int getItemCount()", "identifier": "getItemCount", "invocations": [ "size" ], ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_29
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldReturnPositionAsItemId() {\n assertEquals(ANY_POSITION, rendererAdapter.getItemId(ANY_POSITION));\n }", "class_method_signature": "RendererAdapterTest.shouldReturnPositionAsItemId()", "constructor": false, "full_signature": "@Test public void shouldReturnPositionAsItemId()...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public long getItemId(int position) {\n return position;\n }", "class_method_signature": "RendererAdapter.getItemId(int position)", "constructor": false, "full_signature": "@Override public long getItemId(int position)", "identifier": "getItemId", "invocations": [], "modifiers": "...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_48
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private", "original_string": "private ObjectRendererBuilder rendererBuilder;", "type": "ObjectRendererBuilder", "var_name": "rendererBuilder" }, { "declarator": "prototypes", "modifier": "private", ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldNotAcceptNullKeysBindingAPrototype() {\n RendererBuilder<Object> rendererBuilder = new RendererBuilder<Object>();\n\n rendererBuilder.bind(null, new ObjectRenderer());\n }", "class_method_signature": "RendererBuilderTest.shouldN...
{ "fields": [ { "declarator": "prototypes", "modifier": "private", "original_string": "private List<Renderer<? extends T>> prototypes;", "type": "List<Renderer<? extends T>>", "var_name": "prototypes" }, { "declarator": "content", "modifier": "private", "ori...
{ "body": "public <G extends T> RendererBuilder<T> bind(Class<G> clazz, Renderer<? extends G> prototype) {\n if (clazz == null || prototype == null) {\n throw new IllegalArgumentException(\n \"The binding RecyclerView binding can't be configured using null instances\");\n }\n prototypes.add(pro...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_6
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldRemoveElementFromAdapteeCollection() {\n adapter.remove(ANY_OBJECT);\n\n verify(mockedCollection).remove(ANY_OBJECT);\n }", "class_method_signature": "VPRendererAdapterTest.shouldRemoveElementFromAdapteeCollection()", "constructor": false, "full_signature": "@Test publi...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public boolean remove(Object element) {\n return collection.remove(element);\n }", "class_method_signature": "VPRendererAdapter.remove(Object element)", "constructor": false, "full_signature": "public boolean remove(Object element)", "identifier": "remove", "invocations": [ "remove"...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_64
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldRemoveAllElementsFromAdapteeCollection() {\n adapter.removeAll(ANY_OBJECT_COLLECTION);\n\n verify(mockedCollection).removeAll(ANY_OBJECT_COLLECTION);\n }", "class_method_signature": "RVListRendererAdapterTest.shouldRemoveAllElementsFromAdapteeCollection()", ...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public boolean removeAll(Collection<?> elements) {\n return collection.removeAll(elements);\n }", "class_method_signature": "RVListRendererAdapter.removeAll(Collection<?> elements)", "constructor": false, "full_signature": "public boolean removeAll(Collection<?> elements)", "identifier": ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_33
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test(expected = NullRendererBuiltException.class)\n public void shouldThrowNullRendererBuiltException() {\n rendererAdapter.getView(ANY_POSITION, mockedConvertView, mockedParent);\n }", "class_method_signature": "RendererAdapterTest.shouldThrowNullRendererBuiltException()", "constructor": false, ...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public View getView(int position, View convertView, ViewGroup parent) {\n T content = getItem(position);\n rendererBuilder.withContent(content);\n rendererBuilder.withConvertView(convertView);\n rendererBuilder.withParent(parent);\n rendererBuilder.withLayoutInflater(LayoutInflater...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_25
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldBeEmptyWhenItsCreatedWithJustARendererBuilder() {\n RVRendererAdapter<Object> adapter = new RVRendererAdapter<Object>(mockedRendererBuilder);\n\n assertEquals(0, adapter.getItemCount());\n }", "class_method_signature": "RVRendererAdapterTest.shouldBeEmptyWhenItsCreatedWithJ...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public int getItemCount() {\n return collection.size();\n }", "class_method_signature": "RVRendererAdapter.getItemCount()", "constructor": false, "full_signature": "@Override public int getItemCount()", "identifier": "getItemCount", "invocations": [ "size" ], "modifiers": "@...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_5
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldAddAllElementsToAdapteeCollection() {\n adapter.addAll(ANY_OBJECT_COLLECTION);\n\n verify(mockedCollection).addAll(ANY_OBJECT_COLLECTION);\n }", "class_method_signature": "VPRendererAdapterTest.shouldAddAllElementsToAdapteeCollection()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void addAll(Collection<? extends T> elements) {\n collection.addAll(elements);\n }", "class_method_signature": "VPRendererAdapter.addAll(Collection<? extends T> elements)", "constructor": false, "full_signature": "public void addAll(Collection<? extends T> elements)", "identifier":...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_67
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldGetRendererFromViewHolderAndRenderItOnBind() {\n when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT);\n when(mockedRendererViewHolder.getRenderer()).thenReturn(mockedRenderer);\n\n adapter.onBindViewHolder(mockedRendererViewHolder, ANY_POSITION)...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override\n public void onBindViewHolder(RendererViewHolder viewHolder, int position) {\n T content = getItem(position);\n Renderer<T> renderer = viewHolder.getRenderer();\n if (renderer == null) {\n throw new NullRendererBuiltException(\"RendererBuilder have to return a ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_30
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldDelegateIntoRendererBuilderToGetItemViewType() {\n when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT);\n when(mockedRendererBuilder.getItemViewType(ANY_OBJECT)).thenReturn(ANY_ITEM_VIEW_TYPE);\n\n assertEquals(ANY_ITEM_VIEW_TYPE, rendererAdapter.getItemViewType...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public int getItemViewType(int position) {\n T content = getItem(position);\n return rendererBuilder.getItemViewType(content);\n }", "class_method_signature": "RendererAdapter.getItemViewType(int position)", "constructor": false, "full_signature": "@Override public int getItemViewTyp...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_26
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldThrowExceptionWhenSetNullCollection() {\n RVRendererAdapter<Object> adapter = new RVRendererAdapter<Object>(mockedRendererBuilder);\n\n adapter.setCollection(null);\n }", "class_method_signature": "RVRendererAdapterTest.shouldTh...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void setCollection(AdapteeCollection<T> collection) {\n if (collection == null) {\n throw new IllegalArgumentException(\"The AdapteeCollection configured can't be null\");\n }\n\n this.collection = collection;\n }", "class_method_signature": "RVRendererAdapter.setCollection(AdapteeC...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_51
{ "fields": [ { "declarator": "renderer", "modifier": "@Spy private", "original_string": "@Spy private ObjectRenderer renderer;", "type": "ObjectRenderer", "var_name": "renderer" }, { "declarator": "mockedContent", "modifier": "@Mock private", "original_stri...
{ "body": "@Test public void shouldInflateViewUsingLayoutInflaterAndParentAfterOnCreateCall() {\n givenARendererInflatingView(mockedView);\n\n onCreateRenderer();\n\n verify(renderer).inflate(mockedLayoutInflater, mockedParent);\n }", "class_method_signature": "RendererTest.shouldInflateViewUsingLayoutInf...
{ "fields": [ { "declarator": "rootView", "modifier": "private", "original_string": "private View rootView;", "type": "View", "var_name": "rootView" }, { "declarator": "content", "modifier": "private", "original_string": "private T content;", "type": "...
{ "body": "protected abstract View inflate(LayoutInflater inflater, ViewGroup parent);", "class_method_signature": "Renderer.inflate(LayoutInflater inflater, ViewGroup parent)", "constructor": false, "full_signature": "protected abstract View inflate(LayoutInflater inflater, ViewGroup parent)", "identifier": ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_47
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private", "original_string": "private ObjectRendererBuilder rendererBuilder;", "type": "ObjectRendererBuilder", "var_name": "rendererBuilder" }, { "declarator": "prototypes", "modifier": "private", ...
{ "body": "@Test(expected = NeedsPrototypesException.class) public void shouldNotAcceptNullPrototypes() {\n RendererBuilder<Object> rendererBuilder = new RendererBuilder<Object>();\n\n rendererBuilder.withPrototypes(null);\n }", "class_method_signature": "RendererBuilderTest.shouldNotAcceptNullPrototypes()",...
{ "fields": [ { "declarator": "prototypes", "modifier": "private", "original_string": "private List<Renderer<? extends T>> prototypes;", "type": "List<Renderer<? extends T>>", "var_name": "prototypes" }, { "declarator": "content", "modifier": "private", "ori...
{ "body": "public RendererBuilder<T> withPrototypes(Collection<? extends Renderer<? extends T>> prototypes) {\n if (prototypes == null) {\n throw new NeedsPrototypesException(\n \"RendererBuilder has to be created with a non null collection of\"\n + \"Collection<Renderer<T> to provide ne...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_10
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldBeEmptyWhenItsCreatedWithJustARendererBuilder() {\n VPRendererAdapter<Object> adapter = new VPRendererAdapter<Object>(mockedRendererBuilder);\n\n assertEquals(0, adapter.getCount());\n }", "class_method_signature": "VPRendererAdapterTest.shouldBeEmptyWhenItsCreatedWithJustA...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public int getCount() {\n return collection.size();\n }", "class_method_signature": "VPRendererAdapter.getCount()", "constructor": false, "full_signature": "@Override public int getCount()", "identifier": "getCount", "invocations": [ "size" ], "modifiers": "@Override p...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_9
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldGetRendererAndRenderIt() {\n when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT);\n when(mockedRendererBuilder.build()).thenReturn(mockedRenderer);\n\n adapter.instantiateItem(mockedParent, ANY_POSITION);\n\n verify(mockedRenderer).render();\n }", "class_m...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public Object instantiateItem(ViewGroup parent, int position) {\n T content = getItem(position);\n rendererBuilder.withContent(content);\n rendererBuilder.withParent(parent);\n rendererBuilder.withLayoutInflater(LayoutInflater.from(parent.getContext()));\n Rende...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_8
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldClearElementsFromAdapteeCollection() {\n adapter.clear();\n\n verify(mockedCollection).clear();\n }", "class_method_signature": "VPRendererAdapterTest.shouldClearElementsFromAdapteeCollection()", "constructor": false, "full_signature": "@Test public void shouldClearElem...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void clear() {\n collection.clear();\n }", "class_method_signature": "VPRendererAdapter.clear()", "constructor": false, "full_signature": "public void clear()", "identifier": "clear", "invocations": [ "clear" ], "modifiers": "public", "parameters": "()", "return": "vo...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_11
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldThrowExceptionWhenSetNullCollection() {\n VPRendererAdapter<Object> adapter = new VPRendererAdapter<Object>(mockedRendererBuilder);\n\n adapter.setCollection(null);\n }", "class_method_signature": "VPRendererAdapterTest.shouldTh...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void setCollection(AdapteeCollection<T> collection) {\n if (collection == null) {\n throw new IllegalArgumentException(\"The AdapteeCollection configured can't be null\");\n }\n\n this.collection = collection;\n }", "class_method_signature": "VPRendererAdapter.se...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_46
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private", "original_string": "private ObjectRendererBuilder rendererBuilder;", "type": "ObjectRendererBuilder", "var_name": "rendererBuilder" }, { "declarator": "prototypes", "modifier": "private", ...
{ "body": "@Test public void shouldReturnPrototypeSizeOnGetViewTypeCount() {\n assertEquals(prototypes.size(), rendererBuilder.getViewTypeCount());\n }", "class_method_signature": "RendererBuilderTest.shouldReturnPrototypeSizeOnGetViewTypeCount()", "constructor": false, "full_signature": "@Test public void ...
{ "fields": [ { "declarator": "prototypes", "modifier": "private", "original_string": "private List<Renderer<? extends T>> prototypes;", "type": "List<Renderer<? extends T>>", "var_name": "prototypes" }, { "declarator": "content", "modifier": "private", "ori...
{ "body": "int getViewTypeCount() {\n return prototypes.size();\n }", "class_method_signature": "RendererBuilder.getViewTypeCount()", "constructor": false, "full_signature": " int getViewTypeCount()", "identifier": "getViewTypeCount", "invocations": [ "size" ], "modifiers": "", "parameters": "...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_50
{ "fields": [ { "declarator": "renderer", "modifier": "@Spy private", "original_string": "@Spy private ObjectRenderer renderer;", "type": "ObjectRenderer", "var_name": "renderer" }, { "declarator": "mockedContent", "modifier": "@Mock private", "original_stri...
{ "body": "@Test public void shouldKeepTheContentAfterOnCreateCall() {\n givenARendererInflatingView(mockedView);\n\n onCreateRenderer();\n\n assertEquals(mockedContent, renderer.getContent());\n }", "class_method_signature": "RendererTest.shouldKeepTheContentAfterOnCreateCall()", "constructor": false, ...
{ "fields": [ { "declarator": "rootView", "modifier": "private", "original_string": "private View rootView;", "type": "View", "var_name": "rootView" }, { "declarator": "content", "modifier": "private", "original_string": "private T content;", "type": "...
{ "body": "protected final T getContent() {\n return content;\n }", "class_method_signature": "Renderer.getContent()", "constructor": false, "full_signature": "protected final T getContent()", "identifier": "getContent", "invocations": [], "modifiers": "protected final", "parameters": "()", "retur...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_27
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldReturnTheAdapteeCollection() {\n assertEquals(mockedCollection, rendererAdapter.getCollection());\n }", "class_method_signature": "RendererAdapterTest.shouldReturnTheAdapteeCollection()", "constructor": false, "full_signature": "@Test public void shouldReturnTheAdapteeColl...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "protected AdapteeCollection<T> getCollection() {\n return collection;\n }", "class_method_signature": "RendererAdapter.getCollection()", "constructor": false, "full_signature": "protected AdapteeCollection<T> getCollection()", "identifier": "getCollection", "invocations": [], "modifiers": "...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_31
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldDelegateIntoRendererBuilderToGetViewTypeCount() {\n when(mockedRendererBuilder.getViewTypeCount()).thenReturn(ANY_VIEW_TYPE_COUNT);\n\n assertEquals(ANY_VIEW_TYPE_COUNT, rendererAdapter.getViewTypeCount());\n }", "class_method_signature": "RendererAdapterTest.shouldDelegate...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public int getViewTypeCount() {\n return rendererBuilder.getViewTypeCount();\n }", "class_method_signature": "RendererAdapter.getViewTypeCount()", "constructor": false, "full_signature": "@Override public int getViewTypeCount()", "identifier": "getViewTypeCount", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_66
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldGetRendererFromViewHolderAndUpdateContentOnBind() {\n when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT);\n when(mockedRendererViewHolder.getRenderer()).thenReturn(mockedRenderer);\n\n adapter.onBindViewHolder(mockedRendererViewHolder, ANY_POSI...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override\n public void onBindViewHolder(RendererViewHolder viewHolder, int position) {\n T content = getItem(position);\n Renderer<T> renderer = viewHolder.getRenderer();\n if (renderer == null) {\n throw new NullRendererBuiltException(\"RendererBuilder have to return a ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_4
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldAddElementToAdapteeCollection() {\n adapter.add(ANY_OBJECT);\n\n verify(mockedCollection).add(ANY_OBJECT);\n }", "class_method_signature": "VPRendererAdapterTest.shouldAddElementToAdapteeCollection()", "constructor": false, "full_signature": "@Test public void shouldAdd...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public boolean add(T element) {\n return collection.add(element);\n }", "class_method_signature": "VPRendererAdapter.add(T element)", "constructor": false, "full_signature": "public boolean add(T element)", "identifier": "add", "invocations": [ "add" ], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_57
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldReturnPositionAsItemId() {\n assertEquals(ANY_POSITION, adapter.getItemId(ANY_POSITION));\n }", "class_method_signature": "RVListRendererAdapterTest.shouldReturnPositionAsItemId()", "constructor": false, "full_signature": "@Test public void shouldReturnPositionA...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override\n public long getItemId(int position) {\n return position;\n }", "class_method_signature": "RVListRendererAdapter.getItemId(int position)", "constructor": false, "full_signature": "@Override public long getItemId(int position)", "identifier": "getItemId", "invocations": [],...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_41
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldBeEmptyWhenItsCreatedWithJustARendererBuilder() {\n RendererAdapter<Object> adapter = new RendererAdapter<Object>(mockedRendererBuilder);\n\n assertEquals(0, adapter.getCount());\n }", "class_method_signature": "RendererAdapterTest.shouldBeEmptyWhenItsCreatedWithJustARender...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public int getCount() {\n return collection.size();\n }", "class_method_signature": "RendererAdapter.getCount()", "constructor": false, "full_signature": "@Override public int getCount()", "identifier": "getCount", "invocations": [ "size" ], "modifiers": "@Override public", ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_16
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldBuildRendererUsingAllNeededDependencies() {\n when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT);\n when(mockedRendererBuilder.buildRendererViewHolder()).thenReturn(mockedRendererViewHolder);\n\n adapter.onCreateViewHolder(mockedParent, ANY_ITEM_VIEW_TYPE);\n\n...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public RendererViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {\n rendererBuilder.withParent(viewGroup);\n rendererBuilder.withLayoutInflater(LayoutInflater.from(viewGroup.getContext()));\n rendererBuilder.withViewType(viewType);\n RendererViewHolder viewHolder = ren...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_3
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test(expected = NullRendererBuiltException.class)\n public void shouldThrowNullRendererBuiltException() {\n adapter.instantiateItem(mockedParent, ANY_ITEM_VIEW_TYPE);\n }", "class_method_signature": "VPRendererAdapterTest.shouldThrowNullRendererBuiltException()", "constructor": false, "full_sig...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public Object instantiateItem(ViewGroup parent, int position) {\n T content = getItem(position);\n rendererBuilder.withContent(content);\n rendererBuilder.withParent(parent);\n rendererBuilder.withLayoutInflater(LayoutInflater.from(parent.getContext()));\n Rende...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_61
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldAddElementToAdapteeCollection() {\n adapter.add(ANY_OBJECT);\n\n verify(mockedCollection).add(ANY_OBJECT);\n }", "class_method_signature": "RVListRendererAdapterTest.shouldAddElementToAdapteeCollection()", "constructor": false, "full_signature": "@Test pu...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public boolean add(T element) {\n return collection.add(element);\n }", "class_method_signature": "RVListRendererAdapter.add(T element)", "constructor": false, "full_signature": "public boolean add(T element)", "identifier": "add", "invocations": [ "add" ], "modifiers": "public"...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_36
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldAddElementToAdapteeCollection() {\n rendererAdapter.add(ANY_OBJECT);\n\n verify(mockedCollection).add(ANY_OBJECT);\n }", "class_method_signature": "RendererAdapterTest.shouldAddElementToAdapteeCollection()", "constructor": false, "full_signature": "@Test public void sho...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void add(T element) {\n collection.add(element);\n }", "class_method_signature": "RendererAdapter.add(T element)", "constructor": false, "full_signature": "public void add(T element)", "identifier": "add", "invocations": [ "add" ], "modifiers": "public", "parameters": "(T ele...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_20
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldRemoveElementFromAdapteeCollection() {\n adapter.remove(ANY_OBJECT);\n\n verify(mockedCollection).remove(ANY_OBJECT);\n }", "class_method_signature": "RVRendererAdapterTest.shouldRemoveElementFromAdapteeCollection()", "constructor": false, "full_signature": "@Test publi...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public boolean remove(Object element) {\n return collection.remove(element);\n }", "class_method_signature": "RVRendererAdapter.remove(Object element)", "constructor": false, "full_signature": "public boolean remove(Object element)", "identifier": "remove", "invocations": [ "remove" ], ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_21
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldRemoveAllElementsFromAdapteeCollection() {\n adapter.removeAll(ANY_OBJECT_COLLECTION);\n\n verify(mockedCollection).removeAll(ANY_OBJECT_COLLECTION);\n }", "class_method_signature": "RVRendererAdapterTest.shouldRemoveAllElementsFromAdapteeCollection()", "constructor": fal...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public boolean removeAll(Collection<?> elements) {\n return collection.removeAll(elements);\n }", "class_method_signature": "RVRendererAdapter.removeAll(Collection<?> elements)", "constructor": false, "full_signature": "public boolean removeAll(Collection<?> elements)", "identifier": "removeAll...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_37
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldAddAllElementsToAdapteeCollection() {\n rendererAdapter.addAll(ANY_OBJECT_COLLECTION);\n\n verify(mockedCollection).addAll(ANY_OBJECT_COLLECTION);\n }", "class_method_signature": "RendererAdapterTest.shouldAddAllElementsToAdapteeCollection()", "constructor": false, "ful...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void addAll(Collection<? extends T> elements) {\n collection.addAll(elements);\n }", "class_method_signature": "RendererAdapter.addAll(Collection<? extends T> elements)", "constructor": false, "full_signature": "public void addAll(Collection<? extends T> elements)", "identifier": "addAll...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_60
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test(expected = NullRendererBuiltException.class)\n public void shouldThrowNullRendererBuiltException() {\n adapter.onCreateViewHolder(mockedParent, ANY_ITEM_VIEW_TYPE);\n }", "class_method_signature": "RVListRendererAdapterTest.shouldThrowNullRendererBuiltException()", "constructor": fal...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override\n public RendererViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {\n rendererBuilder.withParent(viewGroup);\n rendererBuilder.withLayoutInflater(LayoutInflater.from(viewGroup.getContext()));\n rendererBuilder.withViewType(viewType);\n RendererViewHo...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_2
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldBuildRendererUsingAllNeededDependencies() {\n when(mockedCollection.get(ANY_POSITION)).thenReturn(ANY_OBJECT);\n when(mockedRendererBuilder.build()).thenReturn(mockedRenderer);\n\n adapter.instantiateItem(mockedParent, ANY_POSITION);\n\n verify(mockedRendererBuilder).wit...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public Object instantiateItem(ViewGroup parent, int position) {\n T content = getItem(position);\n rendererBuilder.withContent(content);\n rendererBuilder.withParent(parent);\n rendererBuilder.withLayoutInflater(LayoutInflater.from(parent.getContext()));\n Rende...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_17
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test(expected = NullRendererBuiltException.class)\n public void shouldThrowNullRendererBuiltException() {\n adapter.onCreateViewHolder(mockedParent, ANY_ITEM_VIEW_TYPE);\n }", "class_method_signature": "RVRendererAdapterTest.shouldThrowNullRendererBuiltException()", "constructor": false, "full_...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override public RendererViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {\n rendererBuilder.withParent(viewGroup);\n rendererBuilder.withLayoutInflater(LayoutInflater.from(viewGroup.getContext()));\n rendererBuilder.withViewType(viewType);\n RendererViewHolder viewHolder = ren...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_40
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test public void shouldClearElementsFromAdapteeCollection() {\n rendererAdapter.clear();\n\n verify(mockedCollection).clear();\n }", "class_method_signature": "RendererAdapterTest.shouldClearElementsFromAdapteeCollection()", "constructor": false, "full_signature": "@Test public void shouldCle...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "public void clear() {\n collection.clear();\n }", "class_method_signature": "RendererAdapter.clear()", "constructor": false, "full_signature": "public void clear()", "identifier": "clear", "invocations": [ "clear" ], "modifiers": "public", "parameters": "()", "return": "void", "...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
17288475_56
{ "fields": [ { "declarator": "ANY_SIZE = 11", "modifier": "private static final", "original_string": "private static final int ANY_SIZE = 11;", "type": "int", "var_name": "ANY_SIZE" }, { "declarator": "ANY_POSITION = 2", "modifier": "private static final", ...
{ "body": "@Test\n public void shouldReturnCollectionSizeOnGetCount() {\n when(mockedCollection.size()).thenReturn(ANY_SIZE);\n\n assertEquals(ANY_SIZE, adapter.getItemCount());\n }", "class_method_signature": "RVListRendererAdapterTest.shouldReturnCollectionSizeOnGetCount()", "constructor": f...
{ "fields": [ { "declarator": "rendererBuilder", "modifier": "private final", "original_string": "private final RendererBuilder<T> rendererBuilder;", "type": "RendererBuilder<T>", "var_name": "rendererBuilder" }, { "declarator": "collection", "modifier": "private"...
{ "body": "@Override\n public int getItemCount() {\n return collection.size();\n }", "class_method_signature": "RVListRendererAdapter.getItemCount()", "constructor": false, "full_signature": "@Override public int getItemCount()", "identifier": "getItemCount", "invocations": [ "size" ], ...
{ "created": null, "fork": null, "fork_count": 175, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17288475, "size": 11064, "stargazer_count": 1212, "stars": null, "updates": null, "url": "https://github.com/pedrovgs/Renderers" }
34520372_3
{ "fields": [ { "declarator": "request", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "@Mock \n\tprivate", "o...
{ "body": "@Test(expected = ServiceBrokerApiVersionException.class)\n\tpublic void versionMismatch() throws IOException, ServletException, ServiceBrokerApiVersionException {\n\t\tString header = \"header\";\n\t\tString version = \"version\";\n\t\tString notVersion = \"not_version\";\n\t\twhen(brokerApiVersion.getBrok...
{ "fields": [ { "declarator": "version", "modifier": "private final", "original_string": "private final BrokerApiVersion version;", "type": "BrokerApiVersion", "var_name": "version" } ], "file": "src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/c...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler) throws ServiceBrokerApiVersionException {\n\t\tif (version != null && !anyVersionAllowed()) {\n\t\t\tString apiVersion = request.getHeader(version.getBrokerApiVersionHeader());\n\t\t\tif (!version.getA...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 34520372, "size": 1054, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/dflick-pivotal/sentimentr-release" }
34520372_2
{ "fields": [ { "declarator": "request", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "@Mock \n\tprivate", "o...
{ "body": "@Test\n\tpublic void versionsMatch() throws IOException, ServletException, ServiceBrokerApiVersionException {\n\t\tString header = \"header\";\n\t\tString version = \"version\";\n\t\twhen(brokerApiVersion.getBrokerApiVersionHeader()).thenReturn(header);\n\t\twhen(brokerApiVersion.getApiVersion()).thenRetur...
{ "fields": [ { "declarator": "version", "modifier": "private final", "original_string": "private final BrokerApiVersion version;", "type": "BrokerApiVersion", "var_name": "version" } ], "file": "src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/c...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler) throws ServiceBrokerApiVersionException {\n\t\tif (version != null && !anyVersionAllowed()) {\n\t\t\tString apiVersion = request.getHeader(version.getBrokerApiVersionHeader());\n\t\t\tif (!version.getA...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 34520372, "size": 1054, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/dflick-pivotal/sentimentr-release" }
34520372_1
{ "fields": [ { "declarator": "request", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "@Mock \n\tprivate", "o...
{ "body": "@Test\n\tpublic void anyVersionAccepted() throws IOException, ServletException, ServiceBrokerApiVersionException {\n\t\tString header = \"header\";\n\t\tString version = BrokerApiVersion.API_VERSION_ANY;\n\t\twhen(brokerApiVersion.getBrokerApiVersionHeader()).thenReturn(header);\n\t\twhen(brokerApiVersion....
{ "fields": [ { "declarator": "version", "modifier": "private final", "original_string": "private final BrokerApiVersion version;", "type": "BrokerApiVersion", "var_name": "version" } ], "file": "src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/c...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler) throws ServiceBrokerApiVersionException {\n\t\tif (version != null && !anyVersionAllowed()) {\n\t\t\tString apiVersion = request.getHeader(version.getBrokerApiVersionHeader());\n\t\t\tif (!version.getA...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 34520372, "size": 1054, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/dflick-pivotal/sentimentr-release" }
34520372_0
{ "fields": [ { "declarator": "request", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "@Mock \n\tprivate", "o...
{ "body": "@Test\n\tpublic void noBrokerApiVersionConfigured() throws IOException, ServletException, ServiceBrokerApiVersionException {\n\t\tBrokerApiVersionInterceptor interceptor = new BrokerApiVersionInterceptor(null);\n\t\tassertTrue(interceptor.preHandle(request, response, null));\n\t}", "class_method_signatur...
{ "fields": [ { "declarator": "version", "modifier": "private final", "original_string": "private final BrokerApiVersion version;", "type": "BrokerApiVersion", "var_name": "version" } ], "file": "src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/c...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler) throws ServiceBrokerApiVersionException {\n\t\tif (version != null && !anyVersionAllowed()) {\n\t\t\tString apiVersion = request.getHeader(version.getBrokerApiVersionHeader());\n\t\t\tif (!version.getA...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 34520372, "size": 1054, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/dflick-pivotal/sentimentr-release" }
95448925_18
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/results/parser/ExpectedResultsParserTest.java", "identifier": "ExpectedResultsParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCache()\n {\n File expected = new File(TableTestUtils.getExpectedDirectory(), ExpectedResultsParserTest.class.getSimpleName() + \".txt\");\n Map<ExpectedResults, String> results = new IdentityHashMap<>();\n for (int i = 0; i < 10; i++)\n {\n ...
{ "fields": [ { "declarator": "SECTION_IDENTIFIER = \"Section\"", "modifier": "static final", "original_string": "static final String SECTION_IDENTIFIER = \"Section\";", "type": "String", "var_name": "SECTION_IDENTIFIER" }, { "declarator": "METADATA_IDENTIFIER = \"Metad...
{ "body": "ExpectedResults getExpectedResults()\n {\n return this.results;\n }", "class_method_signature": "ExpectedResultsParser.getExpectedResults()", "constructor": false, "full_signature": " ExpectedResults getExpectedResults()", "identifier": "getExpectedResults", "invocations": [], "mod...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_34
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/CellFormatterTest.java", "identifier": "CellFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void formatDate()\n {\n CellFormatter formatter = new CellFormatter(0, false);\n Assert.assertEquals(\"2009-02-13 23:31:30\", formatter.format(Timestamp.valueOf(\"2009-02-13 23:31:30.0001\")));\n }", "class_method_signature": "CellFormatterTest.formatDate()", "cons...
{ "fields": [ { "declarator": "DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss\"", "modifier": "private static final", "original_string": "private static final String DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss\";", "type": "String", "var_name": "DATE_FORMAT" }, { "declarator": "numberForm...
{ "body": "public String format(Object value)\n {\n if (isNumber(value))\n {\n if (value.equals(Double.NaN) || value.equals(Float.NaN))\n {\n return \"NaN\";\n }\n String formatted = this.numberFormat.format(value);\n if (isNegativ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_22
{ "fields": [ { "declarator": "tolerance = 0.1d", "modifier": "private final", "original_string": "private final double tolerance = 0.1d;", "type": "double", "var_name": "tolerance" }, { "declarator": "varianceThreshold = 5.0d", "modifier": "private final", ...
{ "body": "@Test\n public void testCompareNumbersOutsideTolerance()\n {\n Assert.assertFalse(\"Results mismatch expected. Actual(20.0) and Expected(20.11) outside Tolerance range(0.1). \", this.toleranceCellComparator.compare(new Double(20.0), new Double(20.11)));\n Assert.assertFalse(\"Results mi...
{ "fields": [ { "declarator": "formatter", "modifier": "private final", "original_string": "private final CellFormatter formatter;", "type": "CellFormatter", "var_name": "formatter" } ], "file": "tablasco-junit/src/main/java/com/gs/tablasco/verify/CellComparator.java", "ide...
{ "body": "protected abstract boolean compare(Object actual, Object expected);", "class_method_signature": "CellComparator.compare(Object actual, Object expected)", "constructor": false, "full_signature": "protected abstract boolean compare(Object actual, Object expected)", "identifier": "compare", "invocat...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_0
{ "fields": [], "file": "tablasco-spark/src/test/java/com/gs/tablasco/spark/avro/AvroHeadersFunctionTest.java", "identifier": "AvroHeadersFunctionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test()\n {\n List<Schema.Field> fields = Arrays.asList(\n new Schema.Field(Schema.Type.ARRAY.getName(), Schema.createArray(Schema.create(Schema.Type.BOOLEAN)), null, null),\n new Schema.Field(Schema.Type.RECORD.getName(), Schema.createRecord(Co...
{ "fields": [], "file": "tablasco-spark/src/main/java/com/gs/tablasco/spark/avro/AvroHeadersFunction.java", "identifier": "AvroHeadersFunction", "interfaces": "implements Function<AvroWrapper, List<String>>", "methods": [ { "class_method_signature": "AvroHeadersFunction.call(AvroWrapper avroWrapper)...
{ "body": "List<String> getColumns(List<Schema.Field> fields)\n {\n List<String> columns = new ArrayList<>(fields.size());\n for (Schema.Field field : fields)\n {\n switch (field.schema().getType())\n {\n case RECORD:\n case MAP:\n ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_14
{ "fields": [ { "declarator": "verifier = new TableVerifier()\n .withExpectedDir(TableTestUtils.getExpectedDirectory())\n .withOutputDir(TableTestUtils.getOutputDirectory())\n .withFilePerClass()\n .withHideMatchedRows(true)\n .withHideMatchedTables(tru...
{ "body": "@Test\n public void testSomeRows()\n {\n VerifiableTable table = TableTestUtils.createTable(1, \"C\", 1, 2, 3, 4, 5);\n this.verify(\n TableTestUtils.createTable(1, \"C\", 2, 4),\n TableAdapters.withRows(table, i -> (Integer) table.getValueAt(i, 0) % 2 == 0...
{ "fields": [], "file": "tablasco-junit/src/main/java/com/gs/tablasco/adapters/TableAdapters.java", "identifier": "TableAdapters", "interfaces": "", "methods": [ { "class_method_signature": "TableAdapters.withRows(VerifiableTable delegate, IntPredicate rowFilter)", "constructor": false, ...
{ "body": "public static VerifiableTable withRows(VerifiableTable delegate, IntPredicate rowFilter)\n {\n return new RowFilterAdapter(delegate, rowFilter);\n }", "class_method_signature": "TableAdapters.withRows(VerifiableTable delegate, IntPredicate rowFilter)", "constructor": false, "full_signatu...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_43
{ "fields": [ { "declarator": "actual", "modifier": "private", "original_string": "private List<String> actual;", "type": "List<String>", "var_name": "actual" }, { "declarator": "expected", "modifier": "private", "original_string": "private List<String> expe...
{ "body": "@Test\n public void compareTo1()\n {\n IndexMap im1 = new IndexMap(1, 2);\n IndexMap im2 = new IndexMap(2, 1);\n Assert.assertTrue(im1.compareTo(im2) > 0);\n Assert.assertTrue(im2.compareTo(im1) < 0);\n }", "class_method_signature": "IndexMapTest.compareTo1()", "con...
{ "fields": [ { "declarator": "expectedIndex", "modifier": "private final", "original_string": "private final int expectedIndex;", "type": "int", "var_name": "expectedIndex" }, { "declarator": "actualIndex", "modifier": "private final", "original_string": "p...
{ "body": "@Override\n public int compareTo(IndexMap that)\n {\n if (this.equals(that))\n {\n return 0;\n }\n if (this.isMatched())\n {\n if (that.actualIndex >= 0)\n {\n return compareUnequals(this.actualIndex, that.actualIndex,...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_38
{ "fields": [ { "declarator": "unmatched = new UnmatchedIndexMap(0, 0)", "modifier": "private", "original_string": "private UnmatchedIndexMap unmatched = new UnmatchedIndexMap(0, 0);", "type": "UnmatchedIndexMap", "var_name": "unmatched" }, { "declarator": "unmatched1 =...
{ "body": "@Test\n public void testInitialState()\n {\n Assert.assertNull(this.unmatched.getBestMutualMatch());\n }", "class_method_signature": "UnmatchedIndexMapTest.testInitialState()", "constructor": false, "full_signature": "@Test public void testInitialState()", "identifier": "testInitial...
{ "fields": [ { "declarator": "partialMatches", "modifier": "private", "original_string": "private SortedSet<Match> partialMatches;", "type": "SortedSet<Match>", "var_name": "partialMatches" }, { "declarator": "bestMutualMatch", "modifier": "private", "origi...
{ "body": "public UnmatchedIndexMap getBestMutualMatch()\n {\n return this.bestMutualMatch;\n }", "class_method_signature": "UnmatchedIndexMap.getBestMutualMatch()", "constructor": false, "full_signature": "public UnmatchedIndexMap getBestMutualMatch()", "identifier": "getBestMutualMatch", "inv...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_39
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/indexmap/TimeBoundPartialMatcherTest.java", "identifier": "TimeBoundPartialMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void executionTimesOut()\n {\n try\n {\n PartialMatcher endlessMatcher = (allMissingRows, allSurplusRows, matchedColumns) -> { while (true); };\n new TimeBoundPartialMatcher(endlessMatcher, 1L).match(null, null, null);\n Assert.fail(\"time...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(TimeBoundPartialMatcher.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(TimeBoundPartialMatcher.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@Override\n public void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns)\n {\n LOGGER.debug(\"Starting partial match\");\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_42
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/indexmap/TimeBoundPartialMatcherTest.java", "identifier": "TimeBoundPartialMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void successfulMatch()\n {\n final AtomicBoolean matched = new AtomicBoolean(false);\n PartialMatcher matcher = (allMissingRows, allSurplusRows, matchedColumns) -> matched.set(true);\n new TimeBoundPartialMatcher(matcher, Long.MAX_VALUE).match(null, null, null);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(TimeBoundPartialMatcher.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(TimeBoundPartialMatcher.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@Override\n public void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns)\n {\n LOGGER.debug(\"Starting partial match\");\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_15
{ "fields": [ { "declarator": "verifier = new TableVerifier()\n .withExpectedDir(TableTestUtils.getExpectedDirectory())\n .withOutputDir(TableTestUtils.getOutputDirectory())\n .withFilePerClass()\n .withHideMatchedRows(true)\n .withHideMatchedTables(tru...
{ "body": "@Test\n public void testAllColumns()\n {\n this.verify(\n TableTestUtils.createTable(5, \"C1\", \"C2\", \"C3\", \"C4\", \"C5\"),\n TableAdapters.withColumns(TableTestUtils.createTable(5, \"C1\", \"C2\", \"C3\", \"C4\", \"C5\"), name -> true));\n }", "class_me...
{ "fields": [], "file": "tablasco-junit/src/main/java/com/gs/tablasco/adapters/TableAdapters.java", "identifier": "TableAdapters", "interfaces": "", "methods": [ { "class_method_signature": "TableAdapters.withRows(VerifiableTable delegate, IntPredicate rowFilter)", "constructor": false, ...
{ "body": "public static VerifiableTable withColumns(VerifiableTable delegate, Predicate<String> columnFilter)\n {\n return new ColumnFilterAdapter(delegate, columnFilter);\n }", "class_method_signature": "TableAdapters.withColumns(VerifiableTable delegate, Predicate<String> columnFilter)", "construc...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_1
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test\n public void runTestFail() throws IOException\n {\n runTest(AVRO, AVRO_X, false, newSparkVerifier(Arrays.asList(\"k2\", \"k1\"))\n .withMaxGroupSize(2));\n }", "class_method_signature": "SparkVerifierTest.runTestFail()", "constructor": false, "full_signature": "@...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public SparkVerifier withMaxGroupSize(int maxGroupSize)\n {\n this.maxGroupSize = maxGroupSize;\n return this;\n }", "class_method_signature": "SparkVerifier.withMaxGroupSize(int maxGroupSize)", "constructor": false, "full_signature": "public SparkVerifier withMaxGroupSize(int max...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_23
{ "fields": [ { "declarator": "tolerance = 0.1d", "modifier": "private final", "original_string": "private final double tolerance = 0.1d;", "type": "double", "var_name": "tolerance" }, { "declarator": "varianceThreshold = 5.0d", "modifier": "private final", ...
{ "body": "@Test\n public void testCompareVarianceStringInputsFail()\n {\n //String inputs not allowed to variance comparator\n Assert.assertFalse(this.varianceCellComparator.compare(\"ActualAndExpected\", \"ActualAndExpected\"));\n Assert.assertFalse(this.varianceCellComparator.compare(\"A...
{ "fields": [ { "declarator": "formatter", "modifier": "private final", "original_string": "private final CellFormatter formatter;", "type": "CellFormatter", "var_name": "formatter" } ], "file": "tablasco-junit/src/main/java/com/gs/tablasco/verify/CellComparator.java", "ide...
{ "body": "protected abstract boolean compare(Object actual, Object expected);", "class_method_signature": "CellComparator.compare(Object actual, Object expected)", "constructor": false, "full_signature": "protected abstract boolean compare(Object actual, Object expected)", "identifier": "compare", "invocat...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_35
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/CellFormatterTest.java", "identifier": "CellFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void formatString()\n {\n CellFormatter formatter = new CellFormatter(0, false);\n Assert.assertEquals(\"\", formatter.format(\"\"));\n Assert.assertEquals(\"foo\", formatter.format(\"foo\"));\n Assert.assertEquals(\"foo\", formatter.format(\" foo \"));\n ...
{ "fields": [ { "declarator": "DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss\"", "modifier": "private static final", "original_string": "private static final String DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss\";", "type": "String", "var_name": "DATE_FORMAT" }, { "declarator": "numberForm...
{ "body": "private String formatString(String untrimmedValue)\n {\n String value = untrimmedValue.trim();\n this.builder.setLength(0);\n boolean changed = false;\n for (int i = 0; i < value.length(); i++)\n {\n char c = value.charAt(i);\n if (Character.isWhi...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_19
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/results/parser/ExpectedResultsParserTest.java", "identifier": "ExpectedResultsParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMissingExpectedResultsFileResultsInClearErrorMessage()\n {\n String missingFileName = \"missing-expected-results.txt\";\n try\n {\n new ExpectedResultsParser(new FileSystemExpectedResultsLoader(), new File(missingFileName)).parse();\n ...
{ "fields": [ { "declarator": "SECTION_IDENTIFIER = \"Section\"", "modifier": "static final", "original_string": "static final String SECTION_IDENTIFIER = \"Section\";", "type": "String", "var_name": "SECTION_IDENTIFIER" }, { "declarator": "METADATA_IDENTIFIER = \"Metad...
{ "body": "public ExpectedResults parse()\n {\n this.results = new ExpectedResults();\n try (InputStream inputStream = this.loader.load(this.file))\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));\n parse(reader...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_6
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test\n public void runManyRowTestWithMissingColumn() throws IOException\n {\n List<GenericRecord> actual = new ArrayList<>();\n for (Integer i = 1230001; i <= 1230100; i++)\n {\n actual.add(row(AVSC_MISSING_COL, i, i.toString(), i));\n }\n List<GenericRe...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public SparkVerifier withMaxGroupSize(int maxGroupSize)\n {\n this.maxGroupSize = maxGroupSize;\n return this;\n }", "class_method_signature": "SparkVerifier.withMaxGroupSize(int maxGroupSize)", "constructor": false, "full_signature": "public SparkVerifier withMaxGroupSize(int max...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_12
{ "fields": [ { "declarator": "verifier = new TableVerifier()\n .withExpectedDir(TableTestUtils.getExpectedDirectory())\n .withOutputDir(TableTestUtils.getOutputDirectory())\n .withFilePerClass()\n .withHideMatchedRows(true)\n .withHideMatchedTables(tru...
{ "body": "@Test\n public void testAllRows()\n {\n this.verify(\n TableTestUtils.createTable(1, \"C\", 1, 2, 3, 4, 5),\n TableAdapters.withRows(TableTestUtils.createTable(1, \"C\", 1, 2, 3, 4, 5), i -> true));\n }", "class_method_signature": "TableAdaptersTest.testAllRo...
{ "fields": [], "file": "tablasco-junit/src/main/java/com/gs/tablasco/adapters/TableAdapters.java", "identifier": "TableAdapters", "interfaces": "", "methods": [ { "class_method_signature": "TableAdapters.withRows(VerifiableTable delegate, IntPredicate rowFilter)", "constructor": false, ...
{ "body": "public static VerifiableTable withRows(VerifiableTable delegate, IntPredicate rowFilter)\n {\n return new RowFilterAdapter(delegate, rowFilter);\n }", "class_method_signature": "TableAdapters.withRows(VerifiableTable delegate, IntPredicate rowFilter)", "constructor": false, "full_signatu...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_45
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/SummaryResultTableTest.java", "identifier": "SummaryResultTableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void merge()\n {\n CellComparator cellComparator = new ToleranceCellComparator(new CellFormatter(1.0, false));\n SummaryResultTable table1 = new SummaryResultTable(new ResultTable(new boolean[2], Arrays.asList(\n Arrays.asList(ResultCell.createMatchedCell(c...
{ "fields": [ { "declarator": "resultsByKey = new TreeMap<>()", "modifier": "private final", "original_string": "private final Map<String, SummaryResult> resultsByKey = new TreeMap<>();", "type": "Map<String, SummaryResult>", "var_name": "resultsByKey" }, { "declarator"...
{ "body": "public SummaryResultTable merge(SummaryResultTable resultTable)\n {\n List<ResultCell> nextHeaders = resultTable.getHeaders();\n if (this.headers == null || nextHeaders.size() > this.headers.size())\n {\n this.headers = nextHeaders;\n }\n this.passedCellCoun...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_28
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/ListVerifiableTableTest.java", "identifier": "ListVerifiableTableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHeaderTypes() throws Exception\n {\n // old usages prior to allowing String headers\n List<Object> headersAsObjects = Collections.singletonList(\"Col\");\n List<List<Object>> headersAndDataAsObjects = Arrays.asList(headersAsObjects, Collections.<Object>sin...
{ "fields": [ { "declarator": "headers", "modifier": "private final", "original_string": "private final List<?> headers;", "type": "List<?>", "var_name": "headers" }, { "declarator": "data", "modifier": "private final", "original_string": "private final List...
{ "body": "@Override\n public int getRowCount()\n {\n return this.data.size();\n }", "class_method_signature": "ListVerifiableTable.getRowCount()", "constructor": false, "full_signature": "@Override public int getRowCount()", "identifier": "getRowCount", "invocations": [ "size" ], "m...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_49
{ "fields": [ { "declarator": "CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false))", "modifier": "private static final", "original_string": "private static final CellComparator CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false));", "type": ...
{ "body": "@Test(expected = IllegalStateException.class)\n public void noExpectedColumns()\n {\n this.verifyTables(\n Collections.singletonMap(\"table\", TableTestUtils.createTable(1, \"Col\")),\n Collections.singletonMap(\"table\", TableTestUtils.createTable(0)));\n }", ...
{ "fields": [ { "declarator": "singleTableVerifier", "modifier": "private final", "original_string": "private final SingleTableVerifier singleTableVerifier;", "type": "SingleTableVerifier", "var_name": "singleTableVerifier" } ], "file": "tablasco-junit/src/main/java/com/gs/ta...
{ "body": "public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults)\n {\n Map<String, ResultTable> results = new LinkedHashMap<>();\n List<String> allTableNames = new ArrayList<>(expectedResults.keySet()...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_32
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/ListVerifiableTableTest.java", "identifier": "ListVerifiableTableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void createHeadersAndIterable_wrongRowSize()\n {\n ListVerifiableTable.create(Arrays.asList(\"A\", \"B\"), new LinkedHashSet<>(Arrays.asList(Arrays.asList(1, 2), Arrays.asList(3, 4, 5))));\n }", "class_method_signature": "ListVerif...
{ "fields": [ { "declarator": "headers", "modifier": "private final", "original_string": "private final List<?> headers;", "type": "List<?>", "var_name": "headers" }, { "declarator": "data", "modifier": "private final", "original_string": "private final List...
{ "body": "public static VerifiableTable create(Iterable<List> headersAndRows)\n {\n Iterator<List> iterator = headersAndRows.iterator();\n List headers = iterator.next();\n headers.forEach(ListVerifiableTable::verifyHeader);\n List rowList = new ArrayList();\n iterator.forEachRe...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_24
{ "fields": [ { "declarator": "tolerance = 0.1d", "modifier": "private final", "original_string": "private final double tolerance = 0.1d;", "type": "double", "var_name": "tolerance" }, { "declarator": "varianceThreshold = 5.0d", "modifier": "private final", ...
{ "body": "@Test\n public void testCompareNumbersWithinVariance()\n {\n Assert.assertTrue(\"Results match expected. Actual(2000.0) and Expected(2100.0) within Variance range(5%).\", this.varianceCellComparator.compare(new Double(2000.0), new Double(2100.0)));\n Assert.assertTrue(\"Results match ex...
{ "fields": [ { "declarator": "formatter", "modifier": "private final", "original_string": "private final CellFormatter formatter;", "type": "CellFormatter", "var_name": "formatter" } ], "file": "tablasco-junit/src/main/java/com/gs/tablasco/verify/CellComparator.java", "ide...
{ "body": "protected abstract boolean compare(Object actual, Object expected);", "class_method_signature": "CellComparator.compare(Object actual, Object expected)", "constructor": false, "full_signature": "protected abstract boolean compare(Object actual, Object expected)", "identifier": "compare", "invocat...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_25
{ "fields": [ { "declarator": "tolerance = 0.1d", "modifier": "private final", "original_string": "private final double tolerance = 0.1d;", "type": "double", "var_name": "tolerance" }, { "declarator": "varianceThreshold = 5.0d", "modifier": "private final", ...
{ "body": "@Test\n public void testCompareNumbersOutsideVariance()\n {\n Assert.assertFalse(\"Results mismatch expected. Actual(2000.0) and Expected(2110.0) outside Variance range(5%).\", this.varianceCellComparator.compare(new Double(2000.0), new Double(2110)));\n Assert.assertFalse(\"Results mis...
{ "fields": [ { "declarator": "formatter", "modifier": "private final", "original_string": "private final CellFormatter formatter;", "type": "CellFormatter", "var_name": "formatter" } ], "file": "tablasco-junit/src/main/java/com/gs/tablasco/verify/CellComparator.java", "ide...
{ "body": "protected abstract boolean compare(Object actual, Object expected);", "class_method_signature": "CellComparator.compare(Object actual, Object expected)", "constructor": false, "full_signature": "protected abstract boolean compare(Object actual, Object expected)", "identifier": "compare", "invocat...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_33
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/CellFormatterTest.java", "identifier": "CellFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void formatNumbers()\n {\n CellFormatter formatter = new CellFormatter(0.01, true);\n Assert.assertEquals(\"1\", formatter.format(1.0d));\n Assert.assertEquals(\"1.1\", formatter.format(1.10d));\n Assert.assertEquals(\"1.11\", formatter.format(1.11d));\n ...
{ "fields": [ { "declarator": "DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss\"", "modifier": "private static final", "original_string": "private static final String DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss\";", "type": "String", "var_name": "DATE_FORMAT" }, { "declarator": "numberForm...
{ "body": "public String format(Object value)\n {\n if (isNumber(value))\n {\n if (value.equals(Double.NaN) || value.equals(Float.NaN))\n {\n return \"NaN\";\n }\n String formatted = this.numberFormat.format(value);\n if (isNegativ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_48
{ "fields": [ { "declarator": "CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false))", "modifier": "private static final", "original_string": "private static final CellComparator CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false));", "type": ...
{ "body": "@Test\n public void misnamedTable()\n {\n Map<String, ResultTable> results = this.verifyTables(createTables(\"assets\", \"liabs\"), createTables(\"assets\", \"liabz\"));\n Assert.assertEquals(newPassTable(), results.get(\"assets\").getVerifiedRows());\n Assert.assertEquals(newSur...
{ "fields": [ { "declarator": "singleTableVerifier", "modifier": "private final", "original_string": "private final SingleTableVerifier singleTableVerifier;", "type": "SingleTableVerifier", "var_name": "singleTableVerifier" } ], "file": "tablasco-junit/src/main/java/com/gs/ta...
{ "body": "public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults)\n {\n Map<String, ResultTable> results = new LinkedHashMap<>();\n List<String> allTableNames = new ArrayList<>(expectedResults.keySet()...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_29
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/ListVerifiableTableTest.java", "identifier": "ListVerifiableTableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void createList_headersNotStrings()\n {\n ListVerifiableTable.create(Arrays.asList(Arrays.asList('A', 'B'), Arrays.asList(1, 2)));\n }", "class_method_signature": "ListVerifiableTableTest.createList_headersNotStrings()", "constru...
{ "fields": [ { "declarator": "headers", "modifier": "private final", "original_string": "private final List<?> headers;", "type": "List<?>", "var_name": "headers" }, { "declarator": "data", "modifier": "private final", "original_string": "private final List...
{ "body": "public static VerifiableTable create(Iterable<List> headersAndRows)\n {\n Iterator<List> iterator = headersAndRows.iterator();\n List headers = iterator.next();\n headers.forEach(ListVerifiableTable::verifyHeader);\n List rowList = new ArrayList();\n iterator.forEachRe...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_44
{ "fields": [ { "declarator": "actual", "modifier": "private", "original_string": "private List<String> actual;", "type": "List<String>", "var_name": "actual" }, { "declarator": "expected", "modifier": "private", "original_string": "private List<String> expe...
{ "body": "@Test\n public void compareTo2()\n {\n IndexMap im1 = new IndexMap(1, 2);\n IndexMap im2 = new IndexMap(2, -1);\n Assert.assertTrue(im1.compareTo(im2) < 0);\n Assert.assertTrue(im2.compareTo(im1) > 0);\n }", "class_method_signature": "IndexMapTest.compareTo2()", "co...
{ "fields": [ { "declarator": "expectedIndex", "modifier": "private final", "original_string": "private final int expectedIndex;", "type": "int", "var_name": "expectedIndex" }, { "declarator": "actualIndex", "modifier": "private final", "original_string": "p...
{ "body": "@Override\n public int compareTo(IndexMap that)\n {\n if (this.equals(that))\n {\n return 0;\n }\n if (this.isMatched())\n {\n if (that.actualIndex >= 0)\n {\n return compareUnequals(this.actualIndex, that.actualIndex,...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_13
{ "fields": [ { "declarator": "verifier = new TableVerifier()\n .withExpectedDir(TableTestUtils.getExpectedDirectory())\n .withOutputDir(TableTestUtils.getOutputDirectory())\n .withFilePerClass()\n .withHideMatchedRows(true)\n .withHideMatchedTables(tru...
{ "body": "@Test\n public void testNoRows()\n {\n VerifiableTable table = TableTestUtils.createTable(1, \"C\", 1, 2, 3, 4, 5);\n this.verify(\n TableTestUtils.createTable(1, \"C\"),\n TableAdapters.withRows(table, i -> false));\n }", "class_method_signature": "Ta...
{ "fields": [], "file": "tablasco-junit/src/main/java/com/gs/tablasco/adapters/TableAdapters.java", "identifier": "TableAdapters", "interfaces": "", "methods": [ { "class_method_signature": "TableAdapters.withRows(VerifiableTable delegate, IntPredicate rowFilter)", "constructor": false, ...
{ "body": "public static VerifiableTable withRows(VerifiableTable delegate, IntPredicate rowFilter)\n {\n return new RowFilterAdapter(delegate, rowFilter);\n }", "class_method_signature": "TableAdapters.withRows(VerifiableTable delegate, IntPredicate rowFilter)", "constructor": false, "full_signatu...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_7
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test\n public void runManyRowTestWithManyBreaks() throws IOException\n {\n List<GenericRecord> actual = new ArrayList<>();\n for (Integer i = 1230001; i <= 1230100; i++)\n {\n actual.add(row(AVSC, (i&8) == 0 ? i : i + 1,\n (i&4) == 0 ? String.valueO...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public SparkVerifier withMaxGroupSize(int maxGroupSize)\n {\n this.maxGroupSize = maxGroupSize;\n return this;\n }", "class_method_signature": "SparkVerifier.withMaxGroupSize(int maxGroupSize)", "constructor": false, "full_signature": "public SparkVerifier withMaxGroupSize(int max...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_47
{ "fields": [ { "declarator": "CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false))", "modifier": "private static final", "original_string": "private static final CellComparator CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false));", "type": ...
{ "body": "@Test\n public void surplusTable()\n {\n Map<String, ResultTable> results = this.verifyTables(createTables(\"assets\", \"liabs\"), createTables(\"liabs\"));\n Assert.assertEquals(newSurplusTable(), results.get(\"assets\").getVerifiedRows());\n Assert.assertEquals(newPassTable(), ...
{ "fields": [ { "declarator": "singleTableVerifier", "modifier": "private final", "original_string": "private final SingleTableVerifier singleTableVerifier;", "type": "SingleTableVerifier", "var_name": "singleTableVerifier" } ], "file": "tablasco-junit/src/main/java/com/gs/ta...
{ "body": "public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults)\n {\n Map<String, ResultTable> results = new LinkedHashMap<>();\n List<String> allTableNames = new ArrayList<>(expectedResults.keySet()...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_10
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test\n public void getMaximumNumberOfGroups()\n {\n Assert.assertEquals(1, SparkVerifier.getMaximumNumberOfGroups(new BoundedDouble(100.0, 50.0, 0.0, 200.0), 10_000));\n Assert.assertEquals(5, SparkVerifier.getMaximumNumberOfGroups(new BoundedDouble(100.0, 50.0, 0.0, 200.0), 20));\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "static int getMaximumNumberOfGroups(BoundedDouble approxCountBoundedDouble, int maxGroupSize)\n {\n long countApprox = Math.round(approxCountBoundedDouble.mean());\n LOGGER.info(\"Approximate count of expected results: \" + countApprox);\n LOGGER.info(\"Maximum group size: \" + maxG...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_4
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void runTestWithInvalidShardColumn() throws IOException\n {\n runTest(AVRO, AVRO_X, false, newSparkVerifier(Collections.singletonList(\"foo\"))\n .withMaxGroupSize(2));\n }", "class_method_signature": "SparkVerifierT...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public SparkVerifier withMaxGroupSize(int maxGroupSize)\n {\n this.maxGroupSize = maxGroupSize;\n return this;\n }", "class_method_signature": "SparkVerifier.withMaxGroupSize(int maxGroupSize)", "constructor": false, "full_signature": "public SparkVerifier withMaxGroupSize(int max...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_26
{ "fields": [ { "declarator": "tolerance = 0.1d", "modifier": "private final", "original_string": "private final double tolerance = 0.1d;", "type": "double", "var_name": "tolerance" }, { "declarator": "varianceThreshold = 5.0d", "modifier": "private final", ...
{ "body": "@Test\n public void testActualExpectedMismatchedTypes()\n {\n Assert.assertFalse(\"Results mismatch expected. Actual(390.0) and Expected(expected) outside Variance range(5%).\", this.varianceCellComparator.compare(new Double(390.0),\"expected\"));\n Assert.assertFalse(\"Results mismatch...
{ "fields": [ { "declarator": "formatter", "modifier": "private final", "original_string": "private final CellFormatter formatter;", "type": "CellFormatter", "var_name": "formatter" } ], "file": "tablasco-junit/src/main/java/com/gs/tablasco/verify/CellComparator.java", "ide...
{ "body": "protected abstract boolean compare(Object actual, Object expected);", "class_method_signature": "CellComparator.compare(Object actual, Object expected)", "constructor": false, "full_signature": "protected abstract boolean compare(Object actual, Object expected)", "identifier": "compare", "invocat...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_30
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/ListVerifiableTableTest.java", "identifier": "ListVerifiableTableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void createList_wrongRowSize()\n {\n ListVerifiableTable.create(Arrays.asList(Arrays.asList(\"A\", \"B\"), Arrays.asList(1, 2), Collections.singletonList(3)));\n }", "class_method_signature": "ListVerifiableTableTest.createList_wro...
{ "fields": [ { "declarator": "headers", "modifier": "private final", "original_string": "private final List<?> headers;", "type": "List<?>", "var_name": "headers" }, { "declarator": "data", "modifier": "private final", "original_string": "private final List...
{ "body": "public static VerifiableTable create(Iterable<List> headersAndRows)\n {\n Iterator<List> iterator = headersAndRows.iterator();\n List headers = iterator.next();\n headers.forEach(ListVerifiableTable::verifyHeader);\n List rowList = new ArrayList();\n iterator.forEachRe...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_8
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test\n public void runManyRowTestWithManyBreaksAndRenamedColumn() throws IOException\n {\n List<GenericRecord> actual = new ArrayList<>();\n Schema schema = new Schema.Parser().parse(\"{\\\"namespace\\\": \\\"verify.avro\\\",\\n\" + \" \\\"type\\\": \\\"record\\\",\\n\" + \" \\\"name\\...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public SparkVerifier withMaxGroupSize(int maxGroupSize)\n {\n this.maxGroupSize = maxGroupSize;\n return this;\n }", "class_method_signature": "SparkVerifier.withMaxGroupSize(int maxGroupSize)", "constructor": false, "full_signature": "public SparkVerifier withMaxGroupSize(int max...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_9
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test\n public void withTolerance() throws IOException\n {\n List<GenericRecord> actual = Arrays.asList(\n row(AVSC, 12301, \"123011\", 12301, 123011.1),\n row(AVSC, 12301, \"123012\", 12302, 123012.2),\n row(AVSC, 12301, \"123013\", 12303, 123012.9...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public SparkVerifier withTolerance(double tolerance)\n {\n this.columnComparatorsBuilder.withTolerance(tolerance);\n return this;\n }", "class_method_signature": "SparkVerifier.withTolerance(double tolerance)", "constructor": false, "full_signature": "public SparkVerifier withTole...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_31
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/ListVerifiableTableTest.java", "identifier": "ListVerifiableTableTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void createHeadersAndList_wrongRowSize()\n {\n ListVerifiableTable.create(Arrays.asList(\"A\", \"B\"), Arrays.asList(Arrays.asList(1, 2), Arrays.asList(3, 4, 5)));\n }", "class_method_signature": "ListVerifiableTableTest.createHead...
{ "fields": [ { "declarator": "headers", "modifier": "private final", "original_string": "private final List<?> headers;", "type": "List<?>", "var_name": "headers" }, { "declarator": "data", "modifier": "private final", "original_string": "private final List...
{ "body": "public static VerifiableTable create(Iterable<List> headersAndRows)\n {\n Iterator<List> iterator = headersAndRows.iterator();\n List headers = iterator.next();\n headers.forEach(ListVerifiableTable::verifyHeader);\n List rowList = new ArrayList();\n iterator.forEachRe...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_27
{ "fields": [ { "declarator": "tableVerifier = new TableVerifier()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TableVerifier tableVerifier = new TableVerifier();", "type": "TableVerifier", "var_name": "tableVerifier" } ], "file": "tabl...
{ "body": "@Test\n public void create() throws SQLException {\n SimpleResultSet resultSet = new SimpleResultSet();\n resultSet.addColumn(\"Name\", Types.VARCHAR, 0, 0);\n resultSet.addColumn(\"Age\", Types.INTEGER, 0, 0);\n resultSet.addColumn(\"Height\", Types.DOUBLE, 0, 0);\n r...
{ "fields": [], "file": "tablasco-junit/src/main/java/com/gs/tablasco/verify/ResultSetTable.java", "identifier": "ResultSetTable", "interfaces": "", "methods": [ { "class_method_signature": "ResultSetTable.ResultSetTable()", "constructor": true, "full_signature": "private ResultSetTable...
{ "body": "public static VerifiableTable create(ResultSet resultSet) throws SQLException\n {\n ResultSetMetaData metaData = resultSet.getMetaData();\n int columnCount = metaData.getColumnCount();\n List<String> headers = new ArrayList<>(columnCount);\n for (int n = 1; n <= columnCount; ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_50
{ "fields": [ { "declarator": "CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false))", "modifier": "private static final", "original_string": "private static final CellComparator CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false));", "type": ...
{ "body": "@Test(expected = IllegalStateException.class)\n public void noActualColumns()\n {\n this.verifyTables(\n Collections.singletonMap(\"table\", TableTestUtils.createTable(0)),\n Collections.singletonMap(\"table\", TableTestUtils.createTable(1, \"Col\")));\n }", ...
{ "fields": [ { "declarator": "singleTableVerifier", "modifier": "private final", "original_string": "private final SingleTableVerifier singleTableVerifier;", "type": "SingleTableVerifier", "var_name": "singleTableVerifier" } ], "file": "tablasco-junit/src/main/java/com/gs/ta...
{ "body": "public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults)\n {\n Map<String, ResultTable> results = new LinkedHashMap<>();\n List<String> allTableNames = new ArrayList<>(expectedResults.keySet()...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_5
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test\n public void runManyRowTest() throws IOException\n {\n List<GenericRecord> data = new ArrayList<>();\n for (Integer i = 1230001; i <= 1230100; i++)\n {\n data.add(row(AVSC, i, i.toString(), i, i * 1.0));\n }\n runTest(data, data, true, newSparkVeri...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public SparkVerifier withMaxGroupSize(int maxGroupSize)\n {\n this.maxGroupSize = maxGroupSize;\n return this;\n }", "class_method_signature": "SparkVerifier.withMaxGroupSize(int maxGroupSize)", "constructor": false, "full_signature": "public SparkVerifier withMaxGroupSize(int max...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_11
{ "fields": [ { "declarator": "verifier = new TableVerifier()\n .withExpectedDir(TableTestUtils.getExpectedDirectory())\n .withOutputDir(TableTestUtils.getOutputDirectory())\n .withFilePerClass()", "modifier": "private final", "original_string": "private final Ta...
{ "body": "@Test\n public void withoutPartialMatchTimeout()\n {\n this.verifier.starting(this.description.get());\n this.verifier.withoutPartialMatchTimeout().verify(\"table1\", TableTestUtils.ACTUAL, TableTestUtils.ACTUAL);\n this.verifier.succeeded(this.description.get());\n }", "cla...
{ "fields": [ { "declarator": "EXPECTED_RESULTS_LOADER_EXECUTOR = Executors.newSingleThreadExecutor(runnable -> {\n Thread thread = new Thread(runnable);\n thread.setName(\"Expected Results Loader\");\n thread.setDaemon(true);\n return thread;\n })", "modifier": "private...
{ "body": "public final TableVerifier withoutPartialMatchTimeout()\n {\n return this.withPartialMatchTimeoutMillis(0);\n }", "class_method_signature": "TableVerifier.withoutPartialMatchTimeout()", "constructor": false, "full_signature": "public final TableVerifier withoutPartialMatchTimeout()", "...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_46
{ "fields": [ { "declarator": "CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false))", "modifier": "private static final", "original_string": "private static final CellComparator CELL_COMPARATOR = new ToleranceCellComparator(new CellFormatter(1.0, false));", "type": ...
{ "body": "@Test\n public void missingTable()\n {\n Map<String, ResultTable> results = verifyTables(createTables(\"assets\"), createTables(\"assets\", \"liabs\"));\n Assert.assertEquals(newPassTable(), results.get(\"assets\").getVerifiedRows());\n Assert.assertEquals(newMissingTable(), resu...
{ "fields": [ { "declarator": "singleTableVerifier", "modifier": "private final", "original_string": "private final SingleTableVerifier singleTableVerifier;", "type": "SingleTableVerifier", "var_name": "singleTableVerifier" } ], "file": "tablasco-junit/src/main/java/com/gs/ta...
{ "body": "public Map<String, ResultTable> verifyTables(Map<String, ? extends VerifiableTable> expectedResults, Map<String, ? extends VerifiableTable> actualResults)\n {\n Map<String, ResultTable> results = new LinkedHashMap<>();\n List<String> allTableNames = new ArrayList<>(expectedResults.keySet()...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_20
{ "fields": [ { "declarator": "tolerance = 0.1d", "modifier": "private final", "original_string": "private final double tolerance = 0.1d;", "type": "double", "var_name": "tolerance" }, { "declarator": "varianceThreshold = 5.0d", "modifier": "private final", ...
{ "body": "@Test\n public void testCompareToleranceStringInputsFail()\n {\n //String inputs not allowed to tolerance comparator\n Assert.assertFalse(this.varianceCellComparator.compare(\"ActualAndExpected\", \"ActualAndExpected\"));\n Assert.assertFalse(this.varianceCellComparator.compare(\...
{ "fields": [ { "declarator": "formatter", "modifier": "private final", "original_string": "private final CellFormatter formatter;", "type": "CellFormatter", "var_name": "formatter" } ], "file": "tablasco-junit/src/main/java/com/gs/tablasco/verify/CellComparator.java", "ide...
{ "body": "protected abstract boolean compare(Object actual, Object expected);", "class_method_signature": "CellComparator.compare(Object actual, Object expected)", "constructor": false, "full_signature": "protected abstract boolean compare(Object actual, Object expected)", "identifier": "compare", "invocat...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_36
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/ExceptionHtmlTest.java", "identifier": "ExceptionHtmlTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testException() throws IOException\n {\n String stackTraceToString = ExceptionHtml.stackTraceToString(new RuntimeException(new IllegalArgumentException(new UnsupportedOperationException())));\n List<Map.Entry<String, List<String>>> stackTraces = getStackLineCount(sta...
{ "fields": [], "file": "tablasco-junit/src/main/java/com/gs/tablasco/verify/ExceptionHtml.java", "identifier": "ExceptionHtml", "interfaces": "", "methods": [ { "class_method_signature": "ExceptionHtml.create(File resultsFile, Throwable reason)", "constructor": false, "full_signature": ...
{ "body": "static String stackTraceToString(Throwable e) throws UnsupportedEncodingException\n {\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bytes, false, \"UTF-8\");\n stackTraceToString(e, out);\n out.close();\n return bytes....
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_41
{ "fields": [], "file": "tablasco-junit/src/test/java/com/gs/tablasco/verify/indexmap/TimeBoundPartialMatcherTest.java", "identifier": "TimeBoundPartialMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void matchingErrorPropagates()\n {\n PartialMatcher dyingMatcher = (allMissingRows, allSurplusRows, matchedColumns) ->\n {\n throw new NoSuchMethodError();\n };\n try\n {\n new TimeBoundPartialMatcher(dyingMatcher, Long.MAX_VALUE...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(TimeBoundPartialMatcher.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(TimeBoundPartialMatcher.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@Override\n public void match(final List<UnmatchedIndexMap> allMissingRows, final List<UnmatchedIndexMap> allSurplusRows, final List<IndexMap> matchedColumns)\n {\n LOGGER.debug(\"Starting partial match\");\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n ...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_16
{ "fields": [ { "declarator": "verifier = new TableVerifier()\n .withExpectedDir(TableTestUtils.getExpectedDirectory())\n .withOutputDir(TableTestUtils.getOutputDirectory())\n .withFilePerClass()\n .withHideMatchedRows(true)\n .withHideMatchedTables(tru...
{ "body": "@Test\n public void testSomeColumns()\n {\n this.verify(\n TableTestUtils.createTable(3, \"C1\", \"C3\", \"C5\"),\n TableAdapters.withColumns(TableTestUtils.createTable(5, \"C1\", \"C2\", \"C3\", \"C4\", \"C5\"), name -> name.matches(\"C[135]\")));\n }", "cla...
{ "fields": [], "file": "tablasco-junit/src/main/java/com/gs/tablasco/adapters/TableAdapters.java", "identifier": "TableAdapters", "interfaces": "", "methods": [ { "class_method_signature": "TableAdapters.withRows(VerifiableTable delegate, IntPredicate rowFilter)", "constructor": false, ...
{ "body": "public static VerifiableTable withColumns(VerifiableTable delegate, Predicate<String> columnFilter)\n {\n return new ColumnFilterAdapter(delegate, columnFilter);\n }", "class_method_signature": "TableAdapters.withColumns(VerifiableTable delegate, Predicate<String> columnFilter)", "construc...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }
95448925_2
{ "fields": [ { "declarator": "REBASE = false", "modifier": "private static final", "original_string": "private static final boolean REBASE = false;", "type": "boolean", "var_name": "REBASE" }, { "declarator": "AVSC = new Schema.Parser().parse(\n \"{\\\"names...
{ "body": "@Test\n public void runTestPass() throws IOException\n {\n runTest(AVRO, AVRO, true, newSparkVerifier(Collections.emptyList())\n .withMaxGroupSize(2));\n }", "class_method_signature": "SparkVerifierTest.runTestPass()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SparkVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SparkVerifier.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public SparkVerifier withMaxGroupSize(int maxGroupSize)\n {\n this.maxGroupSize = maxGroupSize;\n return this;\n }", "class_method_signature": "SparkVerifier.withMaxGroupSize(int maxGroupSize)", "constructor": false, "full_signature": "public SparkVerifier withMaxGroupSize(int max...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95448925, "size": 2106, "stargazer_count": 36, "stars": null, "updates": null, "url": "https://github.com/goldmansachs/tablasco" }