id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
37447498_13
{ "fields": [ { "declarator": "view", "modifier": "private", "original_string": "private ExternalViewPresenter.View view;", "type": "ExternalViewPresenter.View", "var_name": "view" }, { "declarator": "presenter", "modifier": "private", "original_string": "pr...
{ "body": "@Test public void shouldLoadOpenSourceLicenses_WhenLicenseParameters() throws Exception {\n String LICENSES = \"licenses\";\n when(view.extractUrl()).thenReturn(GlucosioExternalLinks.LICENSES);\n when(view.extractTitle()).thenReturn(LICENSES);\n when(network.isConnected()).thenReturn(true);\n\n...
{ "fields": [ { "declarator": "view", "modifier": "private", "original_string": "private ExternalViewPresenter.View view;", "type": "ExternalViewPresenter.View", "var_name": "view" }, { "declarator": "network", "modifier": "private", "original_string": "priv...
{ "body": "public void onViewCreated() {\n if (network.isConnected()) {\n String title = view.extractTitle();\n String url = view.extractUrl();\n parametersPrecondition(title, url);\n view.setupToolbarTitle(title);\n view.loadExternalUrl(url);\n } else {\n view.showNoConnectionWarn...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_44
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void shouldReturnOkColorIfGreenStringIsGiven() {\n int expected = context.getColor(R.color.glucosio_reading_ok);\n int actual = glucoseRanges.stringToColor(\"green\");\n\n assertEquals(expected, actual);\n }", "class_method_signature": "GlucoseRangesTest.shouldRe...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public int stringToColor(String color) {\n @ColorRes int colorInt;\n switch (color) {\n case \"green\":\n colorInt = R.color.glucosio_reading_ok;\n break;\n case \"red\":\n colorInt = R.color.glucosio_reading_hyper;\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_52
{ "fields": [], "file": "app/src/test/java/org/glucosio/android/tools/GlucosioConverterTest.java", "identifier": "GlucosioConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ShouldRoundToFloor_WhenLowerValueOfExactPointIsGiven() {\n assertThat(GlucosioConverter.round(10.123, 2)).isEqualTo(10.12);\n }", "class_method_signature": "GlucosioConverterTest.ShouldRoundToFloor_WhenLowerValueOfExactPointIsGiven()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "MG_DL_TO_MMOL_CONSTANT = 18.0", "modifier": "private static final", "original_string": "private static final double MG_DL_TO_MMOL_CONSTANT = 18.0;", "type": "double", "var_name": "MG_DL_TO_MMOL_CONSTANT" }, { "declarator": "KG_TO_LB_CONSTA...
{ "body": "public static double round(double value, int places) {\n if (places < 0) throw new IllegalArgumentException();\n\n BigDecimal bd = BigDecimal.valueOf(value);\n bd = bd.setScale(places, RoundingMode.HALF_UP);\n return bd.doubleValue();\n }", "class_method_signature": "Glucos...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_53
{ "fields": [], "file": "app/src/test/java/org/glucosio/android/tools/GlucosioConverterTest.java", "identifier": "GlucosioConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ShouldRoundToCeil_WhenHigherValueOfExactPointIsGiven() {\n assertThat(GlucosioConverter.round(10.126, 2)).isEqualTo(10.13);\n }", "class_method_signature": "GlucosioConverterTest.ShouldRoundToCeil_WhenHigherValueOfExactPointIsGiven()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "MG_DL_TO_MMOL_CONSTANT = 18.0", "modifier": "private static final", "original_string": "private static final double MG_DL_TO_MMOL_CONSTANT = 18.0;", "type": "double", "var_name": "MG_DL_TO_MMOL_CONSTANT" }, { "declarator": "KG_TO_LB_CONSTA...
{ "body": "public static double round(double value, int places) {\n if (places < 0) throw new IllegalArgumentException();\n\n BigDecimal bd = BigDecimal.valueOf(value);\n bd = bd.setScale(places, RoundingMode.HALF_UP);\n return bd.doubleValue();\n }", "class_method_signature": "Glucos...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_45
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void shouldReturnHyperColorIfRedStringIsGiven() {\n int expected = context.getColor(R.color.glucosio_reading_hyper);\n int actual = glucoseRanges.stringToColor(\"red\");\n\n assertEquals(expected, actual);\n }", "class_method_signature": "GlucoseRangesTest.should...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public int stringToColor(String color) {\n @ColorRes int colorInt;\n switch (color) {\n case \"green\":\n colorInt = R.color.glucosio_reading_ok;\n break;\n case \"red\":\n colorInt = R.color.glucosio_reading_hyper;\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_12
{ "fields": [ { "declarator": "view", "modifier": "private", "original_string": "private ExternalViewPresenter.View view;", "type": "ExternalViewPresenter.View", "var_name": "view" }, { "declarator": "presenter", "modifier": "private", "original_string": "pr...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void shouldThrowException_WhenNoParameters() throws Exception {\n when(network.isConnected()).thenReturn(true);\n when(view.extractTitle()).thenReturn(null);\n when(view.extractUrl()).thenReturn(null);\n presenter.onViewCreated();\n }"...
{ "fields": [ { "declarator": "view", "modifier": "private", "original_string": "private ExternalViewPresenter.View view;", "type": "ExternalViewPresenter.View", "var_name": "view" }, { "declarator": "network", "modifier": "private", "original_string": "priv...
{ "body": "public void onViewCreated() {\n if (network.isConnected()) {\n String title = view.extractTitle();\n String url = view.extractUrl();\n parametersPrecondition(title, url);\n view.setupToolbarTitle(title);\n view.loadExternalUrl(url);\n } else {\n view.showNoConnectionWarn...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_69
{ "fields": [ { "declarator": "ifmm = new InputFilterMinMax(3, 5)", "modifier": "private", "original_string": "private InputFilterMinMax ifmm = new InputFilterMinMax(3, 5);", "type": "InputFilterMinMax", "var_name": "ifmm" } ], "file": "app/src/test/java/org/glucosio/android/...
{ "body": "@Test\n public void checkIfRACCB4ValueIsInRangeFalse() {\n assertFalse(ifmm.isInRange(8, 6, 5));\n }", "class_method_signature": "InputFilterMinMaxTest.checkIfRACCB4ValueIsInRangeFalse()", "constructor": false, "full_signature": "@Test public void checkIfRACCB4ValueIsInRangeFalse()", "...
{ "fields": [ { "declarator": "TAG = \"InputFilterMinMax\"", "modifier": "private static final", "original_string": "private static final String TAG = \"InputFilterMinMax\";", "type": "String", "var_name": "TAG" }, { "declarator": "min", "modifier": "private", ...
{ "body": "protected boolean isInRange(double a, double b, double c) {\n return b > a ? c >= a && c <= b : c >= b && c <= a;\n }", "class_method_signature": "InputFilterMinMax.isInRange(double a, double b, double c)", "constructor": false, "full_signature": "protected boolean isInRange(double a, doubl...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_86
{ "fields": [ { "declarator": "migration = new Migration()", "modifier": "private", "original_string": "private Migration migration = new Migration();", "type": "Migration", "var_name": "migration" }, { "declarator": "realmMock = mock(DynamicRealm.class)", "modifi...
{ "body": "@Test\n public void ProperlyMigratePressureFromVersion4() {\n when(objectMock.getInt(\"minReading\")).thenReturn(8);\n when(objectMock.getInt(\"maxReading\")).thenReturn(4);\n\n migration.migrate(realmMock, 4, 5);\n\n inOrder.verify(schemaMock).get(\"PressureReading\");\n ...
{ "fields": [], "file": "app/src/main/java/org/glucosio/android/db/Migration.java", "identifier": "Migration", "interfaces": "implements RealmMigration", "methods": [ { "class_method_signature": "Migration.migrate(@NonNull DynamicRealm realm, long oldVersion, long newVersion)", "constructor": ...
{ "body": "@Override\n public void migrate(@NonNull DynamicRealm realm, long oldVersion, long newVersion) {\n RealmSchema schema = realm.getSchema();\n\n if (oldVersion == 0) {\n createInitialSchema(schema);\n oldVersion++;\n }\n\n if (oldVersion == 1) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_28
{ "fields": [ { "declarator": "defaultLocale", "modifier": "private", "original_string": "private Locale defaultLocale;", "type": "Locale", "var_name": "defaultLocale" } ], "file": "app/src/test/java/org/glucosio/android/tools/ReadingToolsTest.java", "identifier": "ReadingT...
{ "body": "@Test\n public void parseToZeroWhenException() {\n double doubleValue = ReadingTools.safeParseDouble(\"b\");\n\n assertThat(doubleValue).isZero();\n }", "class_method_signature": "ReadingToolsTest.parseToZeroWhenException()", "constructor": false, "full_signature": "@Test public v...
{ "fields": [], "file": "app/src/main/java/org/glucosio/android/tools/ReadingTools.java", "identifier": "ReadingTools", "interfaces": "", "methods": [ { "class_method_signature": "ReadingTools.ReadingTools()", "constructor": true, "full_signature": "public ReadingTools()", "identi...
{ "body": "public static double safeParseDouble(String doubleValue) {\n try {\n return NumberFormat.getInstance().parse(doubleValue).doubleValue();\n } catch (Exception e) {\n return 0;\n }\n }", "class_method_signature": "ReadingTools.safeParseDouble(String doubleValue...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_90
{ "fields": [ { "declarator": "fragment", "modifier": "private", "original_string": "private AssistantFragment fragment;", "type": "AssistantFragment", "var_name": "fragment" } ], "file": "app/src/test/java/org/glucosio/android/fragment/AssistantFragmentTest.java", "identif...
{ "body": "@Test\n public void ShouldUnBindViews_WhenDestroyed() throws Exception {\n fragment.onDestroyView();\n\n assertThat(fragment.archivedButton).isNull();\n assertThat(fragment.archivedDismissButton).isNull();\n assertThat(fragment.tipsRecycler).isNull();\n }", "class_method...
{ "fields": [ { "declarator": "sharedPref", "modifier": "private", "original_string": "private SharedPreferences sharedPref;", "type": "SharedPreferences", "var_name": "sharedPref" }, { "declarator": "tipsRecycler", "modifier": "@BindView(R.id.fragment_tips_recycl...
{ "body": "@Override\n public void onDestroyView() {\n unbinder.unbind();\n\n super.onDestroyView();\n }", "class_method_signature": "AssistantFragment.onDestroyView()", "constructor": false, "full_signature": "@Override public void onDestroyView()", "identifier": "onDestroyView", "invoc...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_49
{ "fields": [ { "declarator": "preferences", "modifier": "private", "original_string": "private Preferences preferences;", "type": "Preferences", "var_name": "preferences" } ], "file": "app/src/test/java/org/glucosio/android/tools/PreferencesTest.java", "identifier": "Prefe...
{ "body": "@Test\n public void ShouldReturnFalseAsDefault_WhenAskedIfLocaleWasCleared() throws Exception {\n assertThat(preferences.isLocaleCleaned()).isFalse();\n }", "class_method_signature": "PreferencesTest.ShouldReturnFalseAsDefault_WhenAskedIfLocaleWasCleared()", "constructor": false, "full_s...
{ "fields": [ { "declarator": "LOCALE_CLEANED = \"PREF_LOCALE_CLEANED\"", "modifier": "static final", "original_string": "static final String LOCALE_CLEANED = \"PREF_LOCALE_CLEANED\";", "type": "String", "var_name": "LOCALE_CLEANED" }, { "declarator": "sharedPreferences...
{ "body": "public boolean isLocaleCleaned() {\n return sharedPreferences.getBoolean(LOCALE_CLEANED, false);\n }", "class_method_signature": "Preferences.isLocaleCleaned()", "constructor": false, "full_signature": "public boolean isLocaleCleaned()", "identifier": "isLocaleCleaned", "invocations": [...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_65
{ "fields": [ { "declarator": "ifmm = new InputFilterMinMax(3, 5)", "modifier": "private", "original_string": "private InputFilterMinMax ifmm = new InputFilterMinMax(3, 5);", "type": "InputFilterMinMax", "var_name": "ifmm" } ], "file": "app/src/test/java/org/glucosio/android/...
{ "body": "@Test\n public void checkIfRACCA4ValueIsInRangeFalse() {\n assertFalse(ifmm.isInRange(3, 1, 4));\n }", "class_method_signature": "InputFilterMinMaxTest.checkIfRACCA4ValueIsInRangeFalse()", "constructor": false, "full_signature": "@Test public void checkIfRACCA4ValueIsInRangeFalse()", "...
{ "fields": [ { "declarator": "TAG = \"InputFilterMinMax\"", "modifier": "private static final", "original_string": "private static final String TAG = \"InputFilterMinMax\";", "type": "String", "var_name": "TAG" }, { "declarator": "min", "modifier": "private", ...
{ "body": "protected boolean isInRange(double a, double b, double c) {\n return b > a ? c >= a && c <= b : c >= b && c <= a;\n }", "class_method_signature": "InputFilterMinMax.isInRange(double a, double b, double c)", "constructor": false, "full_signature": "protected boolean isInRange(double a, doubl...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_32
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void expectGreenWhenReadingValueIs100WithADAPreferredRange() {\n assertTrue(glucoseRanges.colorFromReading(100).equals(\"green\"));\n }", "class_method_signature": "GlucoseRangesTest.expectGreenWhenReadingValueIs100WithADAPreferredRange()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public String colorFromReading(double reading) {\n if (reading < HYPO_LIMIT) {\n // hypo limit 70\n return \"purple\";\n } else if (reading > HYPER_LIMIT) {\n // hyper limit 200\n return \"red\";\n } else if (reading < userMin) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_24
{ "fields": [ { "declarator": "defaultLocale", "modifier": "private", "original_string": "private Locale defaultLocale;", "type": "Locale", "var_name": "defaultLocale" } ], "file": "app/src/test/java/org/glucosio/android/tools/ReadingToolsTest.java", "identifier": "ReadingT...
{ "body": "@Test\n public void shouldReturnNull_whenInvalidStringPassed() {\n assertThat(ReadingTools.parseReading(\"abc\")).isNull();\n }", "class_method_signature": "ReadingToolsTest.shouldReturnNull_whenInvalidStringPassed()", "constructor": false, "full_signature": "@Test public void shouldRetu...
{ "fields": [], "file": "app/src/main/java/org/glucosio/android/tools/ReadingTools.java", "identifier": "ReadingTools", "interfaces": "", "methods": [ { "class_method_signature": "ReadingTools.ReadingTools()", "constructor": true, "full_signature": "public ReadingTools()", "identi...
{ "body": "@Nullable\n public static Number parseReading(String reading) {\n if (reading == null)\n return null;\n NumberFormat numberFormat = NumberFormat.getInstance();\n try {\n return numberFormat.parse(reading);\n } catch (ParseException e) {\n retu...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_3
{ "fields": [ { "declarator": "presenter", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private AssistantPresenter presenter;", "type": "AssistantPresenter", "var_name": "presenter" }, { "declarator": "assistantFragmentMock", "mod...
{ "body": "@Test\n public void CallFragment_WhenUserAskedExport() throws Exception {\n presenter.userAskedExport();\n\n verify(assistantFragmentMock).startExportActivity();\n }", "class_method_signature": "AssistantPresenterTest.CallFragment_WhenUserAskedExport()", "constructor": false, "ful...
{ "fields": [ { "declarator": "fragment", "modifier": "private", "original_string": "private AssistantFragment fragment;", "type": "AssistantFragment", "var_name": "fragment" } ], "file": "app/src/main/java/org/glucosio/android/presenter/AssistantPresenter.java", "identifie...
{ "body": "public void userAskedExport() {\n fragment.startExportActivity();\n }", "class_method_signature": "AssistantPresenter.userAskedExport()", "constructor": false, "full_signature": "public void userAskedExport()", "identifier": "userAskedExport", "invocations": [ "startExportActivity" ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_73
{ "fields": [ { "declarator": "ifmm = new InputFilterMinMax(3, 5)", "modifier": "private", "original_string": "private InputFilterMinMax ifmm = new InputFilterMinMax(3, 5);", "type": "InputFilterMinMax", "var_name": "ifmm" } ], "file": "app/src/test/java/org/glucosio/android/...
{ "body": "@Test\n public void checkIfRACCC4ValueIsInRange4False() {\n assertFalse(ifmm.isInRange(6, 4, 7));\n }", "class_method_signature": "InputFilterMinMaxTest.checkIfRACCC4ValueIsInRange4False()", "constructor": false, "full_signature": "@Test public void checkIfRACCC4ValueIsInRange4False()", ...
{ "fields": [ { "declarator": "TAG = \"InputFilterMinMax\"", "modifier": "private static final", "original_string": "private static final String TAG = \"InputFilterMinMax\";", "type": "String", "var_name": "TAG" }, { "declarator": "min", "modifier": "private", ...
{ "body": "protected boolean isInRange(double a, double b, double c) {\n return b > a ? c >= a && c <= b : c >= b && c <= a;\n }", "class_method_signature": "InputFilterMinMax.isInRange(double a, double b, double c)", "constructor": false, "full_signature": "protected boolean isInRange(double a, doubl...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_89
{ "fields": [ { "declarator": "migration = new Migration()", "modifier": "private", "original_string": "private Migration migration = new Migration();", "type": "Migration", "var_name": "migration" }, { "declarator": "realmMock = mock(DynamicRealm.class)", "modifi...
{ "body": "@Test\n public void ProperlyMigrateCholesterolFromVersion4() {\n when(objectMock.getInt(\"totalReading\")).thenReturn(8);\n when(objectMock.getInt(\"LDLReading\")).thenReturn(4);\n when(objectMock.getInt(\"HDLReading\")).thenReturn(9);\n\n migration.migrate(realmMock, 4, 5);\...
{ "fields": [], "file": "app/src/main/java/org/glucosio/android/db/Migration.java", "identifier": "Migration", "interfaces": "implements RealmMigration", "methods": [ { "class_method_signature": "Migration.migrate(@NonNull DynamicRealm realm, long oldVersion, long newVersion)", "constructor": ...
{ "body": "@Override\n public void migrate(@NonNull DynamicRealm realm, long oldVersion, long newVersion) {\n RealmSchema schema = realm.getSchema();\n\n if (oldVersion == 0) {\n createInitialSchema(schema);\n oldVersion++;\n }\n\n if (oldVersion == 1) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_66
{ "fields": [ { "declarator": "ifmm = new InputFilterMinMax(3, 5)", "modifier": "private", "original_string": "private InputFilterMinMax ifmm = new InputFilterMinMax(3, 5);", "type": "InputFilterMinMax", "var_name": "ifmm" } ], "file": "app/src/test/java/org/glucosio/android/...
{ "body": "@Test\n public void checkIfRACCB1ValueIsInRangeTrue() {\n assertTrue(ifmm.isInRange(1, 7, 5));\n }", "class_method_signature": "InputFilterMinMaxTest.checkIfRACCB1ValueIsInRangeTrue()", "constructor": false, "full_signature": "@Test public void checkIfRACCB1ValueIsInRangeTrue()", "iden...
{ "fields": [ { "declarator": "TAG = \"InputFilterMinMax\"", "modifier": "private static final", "original_string": "private static final String TAG = \"InputFilterMinMax\";", "type": "String", "var_name": "TAG" }, { "declarator": "min", "modifier": "private", ...
{ "body": "protected boolean isInRange(double a, double b, double c) {\n return b > a ? c >= a && c <= b : c >= b && c <= a;\n }", "class_method_signature": "InputFilterMinMax.isInRange(double a, double b, double c)", "constructor": false, "full_signature": "protected boolean isInRange(double a, doubl...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_31
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void expectRedWhenReadingValueIs210WithNoPreferredRange() {\n assertEquals(glucoseRanges.colorFromReading(410), \"red\");\n }", "class_method_signature": "GlucoseRangesTest.expectRedWhenReadingValueIs210WithNoPreferredRange()", "constructor": false, "full_signature": "@Tes...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public String colorFromReading(double reading) {\n if (reading < HYPO_LIMIT) {\n // hypo limit 70\n return \"purple\";\n } else if (reading > HYPER_LIMIT) {\n // hyper limit 200\n return \"red\";\n } else if (reading < userMin) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_27
{ "fields": [ { "declarator": "defaultLocale", "modifier": "private", "original_string": "private Locale defaultLocale;", "type": "Locale", "var_name": "defaultLocale" } ], "file": "app/src/test/java/org/glucosio/android/tools/ReadingToolsTest.java", "identifier": "ReadingT...
{ "body": "@Test\n public void parseDoubleCorrectly() {\n double doubleValue = ReadingTools.safeParseDouble(\"1.01\");\n\n assertThat(doubleValue).isCloseTo(1.01, offset(0.000000000000001));\n }", "class_method_signature": "ReadingToolsTest.parseDoubleCorrectly()", "constructor": false, "ful...
{ "fields": [], "file": "app/src/main/java/org/glucosio/android/tools/ReadingTools.java", "identifier": "ReadingTools", "interfaces": "", "methods": [ { "class_method_signature": "ReadingTools.ReadingTools()", "constructor": true, "full_signature": "public ReadingTools()", "identi...
{ "body": "public static double safeParseDouble(String doubleValue) {\n try {\n return NumberFormat.getInstance().parse(doubleValue).doubleValue();\n } catch (Exception e) {\n return 0;\n }\n }", "class_method_signature": "ReadingTools.safeParseDouble(String doubleValue...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_0
{ "fields": [ { "declarator": "presenter", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private AssistantPresenter presenter;", "type": "AssistantPresenter", "var_name": "presenter" }, { "declarator": "assistantFragmentMock", "mod...
{ "body": "@Test\n public void CallFragment_WhenUserAskedSupport() throws Exception {\n presenter.userSupportAsked();\n\n verify(assistantFragmentMock).openSupportDialog();\n }", "class_method_signature": "AssistantPresenterTest.CallFragment_WhenUserAskedSupport()", "constructor": false, "fu...
{ "fields": [ { "declarator": "fragment", "modifier": "private", "original_string": "private AssistantFragment fragment;", "type": "AssistantFragment", "var_name": "fragment" } ], "file": "app/src/main/java/org/glucosio/android/presenter/AssistantPresenter.java", "identifie...
{ "body": "public void userSupportAsked() {\n fragment.openSupportDialog();\n }", "class_method_signature": "AssistantPresenter.userSupportAsked()", "constructor": false, "full_signature": "public void userSupportAsked()", "identifier": "userSupportAsked", "invocations": [ "openSupportDialog" ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_70
{ "fields": [ { "declarator": "ifmm = new InputFilterMinMax(3, 5)", "modifier": "private", "original_string": "private InputFilterMinMax ifmm = new InputFilterMinMax(3, 5);", "type": "InputFilterMinMax", "var_name": "ifmm" } ], "file": "app/src/test/java/org/glucosio/android/...
{ "body": "@Test\n public void checkIfRACCC1ValueIsInRangeTrue() {\n assertTrue(ifmm.isInRange(3, 7, 4));\n }", "class_method_signature": "InputFilterMinMaxTest.checkIfRACCC1ValueIsInRangeTrue()", "constructor": false, "full_signature": "@Test public void checkIfRACCC1ValueIsInRangeTrue()", "iden...
{ "fields": [ { "declarator": "TAG = \"InputFilterMinMax\"", "modifier": "private static final", "original_string": "private static final String TAG = \"InputFilterMinMax\";", "type": "String", "var_name": "TAG" }, { "declarator": "min", "modifier": "private", ...
{ "body": "protected boolean isInRange(double a, double b, double c) {\n return b > a ? c >= a && c <= b : c >= b && c <= a;\n }", "class_method_signature": "InputFilterMinMax.isInRange(double a, double b, double c)", "constructor": false, "full_signature": "protected boolean isInRange(double a, doubl...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_50
{ "fields": [ { "declarator": "preferences", "modifier": "private", "original_string": "private Preferences preferences;", "type": "Preferences", "var_name": "preferences" } ], "file": "app/src/test/java/org/glucosio/android/tools/PreferencesTest.java", "identifier": "Prefe...
{ "body": "@Test\n public void ShouldReturnSavedValue_WhenLocaleIsClearedAsked() throws Exception {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(RuntimeEnvironment.application);\n sharedPreferences.edit().putBoolean(Preferences.LOCALE_CLEANED, true).apply();\n...
{ "fields": [ { "declarator": "LOCALE_CLEANED = \"PREF_LOCALE_CLEANED\"", "modifier": "static final", "original_string": "static final String LOCALE_CLEANED = \"PREF_LOCALE_CLEANED\";", "type": "String", "var_name": "LOCALE_CLEANED" }, { "declarator": "sharedPreferences...
{ "body": "public boolean isLocaleCleaned() {\n return sharedPreferences.getBoolean(LOCALE_CLEANED, false);\n }", "class_method_signature": "Preferences.isLocaleCleaned()", "constructor": false, "full_signature": "public boolean isLocaleCleaned()", "identifier": "isLocaleCleaned", "invocations": [...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_46
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void shouldReturnLowColorIfBlueStringGiven() {\n int expected = context.getColor(R.color.glucosio_reading_low);\n int actual = glucoseRanges.stringToColor(\"blue\");\n\n assertEquals(expected, actual);\n }", "class_method_signature": "GlucoseRangesTest.shouldRetu...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public int stringToColor(String color) {\n @ColorRes int colorInt;\n switch (color) {\n case \"green\":\n colorInt = R.color.glucosio_reading_ok;\n break;\n case \"red\":\n colorInt = R.color.glucosio_reading_hyper;\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_11
{ "fields": [ { "declarator": "dbHandlerMock", "modifier": "@Mock\n private", "original_string": "@Mock\n private DatabaseHandler dbHandlerMock;", "type": "DatabaseHandler", "var_name": "dbHandlerMock" }, { "declarator": "activity", "modifier": "@Mock\n p...
{ "body": "@Test\n public void ShouldReturnCorrectA1CUnit_WhenGetterCalled() {\n user.setPreferred_unit_a1c(\"mmol/mol\");\n\n assertThat(presenter.getA1cUnit()).isEqualTo(\"mmol/mol\");\n }", "class_method_signature": "A1CCalculatorPresenterTest.ShouldReturnCorrectA1CUnit_WhenGetterCalled()", ...
{ "fields": [ { "declarator": "dbHandler", "modifier": "private final", "original_string": "private final DatabaseHandler dbHandler;", "type": "DatabaseHandler", "var_name": "dbHandler" }, { "declarator": "activity", "modifier": "private final", "original_st...
{ "body": "public String getA1cUnit() {\n return dbHandler.getUser(1).getPreferred_unit_a1c();\n }", "class_method_signature": "A1CCalculatorPresenter.getA1cUnit()", "constructor": false, "full_signature": "public String getA1cUnit()", "identifier": "getA1cUnit", "invocations": [ "getPreferred...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_85
{ "fields": [ { "declarator": "migration = new Migration()", "modifier": "private", "original_string": "private Migration migration = new Migration();", "type": "Migration", "var_name": "migration" }, { "declarator": "realmMock = mock(DynamicRealm.class)", "modifi...
{ "body": "@Test\n public void ProperlyMigrateWeightFromVersion4() {\n when(objectMock.getInt(\"reading\")).thenReturn(8);\n\n migration.migrate(realmMock, 4, 5);\n\n inOrder.verify(schemaMock).get(\"WeightReading\");\n checkObjectIntMigration(\"reading\", 8);\n }", "class_method_s...
{ "fields": [], "file": "app/src/main/java/org/glucosio/android/db/Migration.java", "identifier": "Migration", "interfaces": "implements RealmMigration", "methods": [ { "class_method_signature": "Migration.migrate(@NonNull DynamicRealm realm, long oldVersion, long newVersion)", "constructor": ...
{ "body": "@Override\n public void migrate(@NonNull DynamicRealm realm, long oldVersion, long newVersion) {\n RealmSchema schema = realm.getSchema();\n\n if (oldVersion == 0) {\n createInitialSchema(schema);\n oldVersion++;\n }\n\n if (oldVersion == 1) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_93
{ "fields": [ { "declarator": "activity", "modifier": "private", "original_string": "private BackupActivity activity;", "type": "BackupActivity", "var_name": "activity" } ], "file": "app/src/test/java/org/glucosio/android/activity/BackupActivityTest.java", "identifier": "Ba...
{ "body": "@Test\n public void ShouldDelegateToBackup_WhenActivityResultReceived() throws Exception {\n reset(getBackup());\n\n activity.onActivityResult(1, Activity.RESULT_OK, null);\n\n verify(getBackup()).start();\n }", "class_method_signature": "BackupActivityTest.ShouldDelegateToBack...
{ "fields": [ { "declarator": "REQUEST_CODE_PICKER = 2", "modifier": "private static final", "original_string": "private static final int REQUEST_CODE_PICKER = 2;", "type": "int", "var_name": "REQUEST_CODE_PICKER" }, { "declarator": "REQUEST_CODE_PICKER_FOLDER = 4", ...
{ "body": "@Override\n protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {\n switch (requestCode) {\n case 1:\n if (resultCode == RESULT_OK) {\n backup.start();\n }\n break;\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_92
{ "fields": [ { "declarator": "activity", "modifier": "private", "original_string": "private BackupActivity activity;", "type": "BackupActivity", "var_name": "activity" } ], "file": "app/src/test/java/org/glucosio/android/activity/BackupActivityTest.java", "identifier": "Ba...
{ "body": "@Test\n public void ShouldDelegateToBackup_WhenDisconnectIsCalled() throws Exception {\n reset(getBackup());\n\n activity.disconnectClient();\n\n verify(getBackup()).stop();\n }", "class_method_signature": "BackupActivityTest.ShouldDelegateToBackup_WhenDisconnectIsCalled()", ...
{ "fields": [ { "declarator": "REQUEST_CODE_PICKER = 2", "modifier": "private static final", "original_string": "private static final int REQUEST_CODE_PICKER = 2;", "type": "int", "var_name": "REQUEST_CODE_PICKER" }, { "declarator": "REQUEST_CODE_PICKER_FOLDER = 4", ...
{ "body": "public void disconnectClient() {\n backup.stop();\n }", "class_method_signature": "BackupActivity.disconnectClient()", "constructor": false, "full_signature": "public void disconnectClient()", "identifier": "disconnectClient", "invocations": [ "stop" ], "modifiers": "public", ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_84
{ "fields": [ { "declarator": "application", "modifier": "private", "original_string": "private GlucosioApplicationForTest application;", "type": "GlucosioApplicationForTest", "var_name": "application" }, { "declarator": "preferencesMock", "modifier": "@Mock\n ...
{ "body": "@Test\n public void ShouldNotClearLanguage_WhenAlreadyDone() {\n user.setPreferred_language(\"en\");\n\n application.onCreate();\n\n assertThat(user.getPreferred_language()).isNotNull();\n verify(databaseHandlerMock, never()).updateUser(user);\n }", "class_method_signatu...
{ "fields": [ { "declarator": "sInstance", "modifier": "private static", "original_string": "private static GlucosioApplication sInstance;", "type": "GlucosioApplication", "var_name": "sInstance" }, { "declarator": "analytics", "modifier": "@Nullable\n private"...
{ "body": "@Override\n public void onCreate() {\n super.onCreate();\n sInstance = this;\n initFont();\n initLanguage();\n }", "class_method_signature": "GlucosioApplication.onCreate()", "constructor": false, "full_signature": "@Override public void onCreate()", "identifier": ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_10
{ "fields": [ { "declarator": "dbHandlerMock", "modifier": "@Mock\n private", "original_string": "@Mock\n private DatabaseHandler dbHandlerMock;", "type": "DatabaseHandler", "var_name": "dbHandlerMock" }, { "declarator": "activity", "modifier": "@Mock\n p...
{ "body": "@Test\n public void ShouldCallSetMmol_WhenUserPreferredUnitIsNotMgDl() {\n user.setPreferred_unit(Constants.Units.MMOL_L);\n\n presenter.checkGlucoseUnit();\n\n verify(activity).setMmol();\n }", "class_method_signature": "A1CCalculatorPresenterTest.ShouldCallSetMmol_WhenUserPre...
{ "fields": [ { "declarator": "dbHandler", "modifier": "private final", "original_string": "private final DatabaseHandler dbHandler;", "type": "DatabaseHandler", "var_name": "dbHandler" }, { "declarator": "activity", "modifier": "private final", "original_st...
{ "body": "public void checkGlucoseUnit() {\n if (!Constants.Units.MG_DL.equals(dbHandler.getUser(1).getPreferred_unit())) {\n activity.setMmol();\n }\n }", "class_method_signature": "A1CCalculatorPresenter.checkGlucoseUnit()", "constructor": false, "full_signature": "public void che...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_47
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void shouldReturnHighColorIfOrangeStringIsGiven() {\n int expected = context.getColor(R.color.glucosio_reading_high);\n int actual = glucoseRanges.stringToColor(\"orange\");\n\n assertEquals(expected, actual);\n }", "class_method_signature": "GlucoseRangesTest.sh...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public int stringToColor(String color) {\n @ColorRes int colorInt;\n switch (color) {\n case \"green\":\n colorInt = R.color.glucosio_reading_ok;\n break;\n case \"red\":\n colorInt = R.color.glucosio_reading_hyper;\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_51
{ "fields": [ { "declarator": "preferences", "modifier": "private", "original_string": "private Preferences preferences;", "type": "Preferences", "var_name": "preferences" } ], "file": "app/src/test/java/org/glucosio/android/tools/PreferencesTest.java", "identifier": "Prefe...
{ "body": "@Test\n public void ShouldSaveLocaleIsCleaned_WhenAsked() throws Exception {\n preferences.saveLocaleCleaned();\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(RuntimeEnvironment.application);\n assertThat(sharedPreferences).contains(Preferenc...
{ "fields": [ { "declarator": "LOCALE_CLEANED = \"PREF_LOCALE_CLEANED\"", "modifier": "static final", "original_string": "static final String LOCALE_CLEANED = \"PREF_LOCALE_CLEANED\";", "type": "String", "var_name": "LOCALE_CLEANED" }, { "declarator": "sharedPreferences...
{ "body": "public void saveLocaleCleaned() {\n sharedPreferences.edit().putBoolean(LOCALE_CLEANED, true).apply();\n }", "class_method_signature": "Preferences.saveLocaleCleaned()", "constructor": false, "full_signature": "public void saveLocaleCleaned()", "identifier": "saveLocaleCleaned", "invoca...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_71
{ "fields": [ { "declarator": "ifmm = new InputFilterMinMax(3, 5)", "modifier": "private", "original_string": "private InputFilterMinMax ifmm = new InputFilterMinMax(3, 5);", "type": "InputFilterMinMax", "var_name": "ifmm" } ], "file": "app/src/test/java/org/glucosio/android/...
{ "body": "@Test\n public void checkIfRACCC2ValueIsInRangeFalse() {\n assertFalse(ifmm.isInRange(3, 7, 2));\n }", "class_method_signature": "InputFilterMinMaxTest.checkIfRACCC2ValueIsInRangeFalse()", "constructor": false, "full_signature": "@Test public void checkIfRACCC2ValueIsInRangeFalse()", "...
{ "fields": [ { "declarator": "TAG = \"InputFilterMinMax\"", "modifier": "private static final", "original_string": "private static final String TAG = \"InputFilterMinMax\";", "type": "String", "var_name": "TAG" }, { "declarator": "min", "modifier": "private", ...
{ "body": "protected boolean isInRange(double a, double b, double c) {\n return b > a ? c >= a && c <= b : c >= b && c <= a;\n }", "class_method_signature": "InputFilterMinMax.isInRange(double a, double b, double c)", "constructor": false, "full_signature": "protected boolean isInRange(double a, doubl...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_1
{ "fields": [ { "declarator": "presenter", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private AssistantPresenter presenter;", "type": "AssistantPresenter", "var_name": "presenter" }, { "declarator": "assistantFragmentMock", "mod...
{ "body": "@Test\n public void CallFragment_WhenUserAskedToShowCalculator() throws Exception {\n presenter.userAskedA1CCalculator();\n\n verify(assistantFragmentMock).startA1CCalculatorActivity();\n }", "class_method_signature": "AssistantPresenterTest.CallFragment_WhenUserAskedToShowCalculator(...
{ "fields": [ { "declarator": "fragment", "modifier": "private", "original_string": "private AssistantFragment fragment;", "type": "AssistantFragment", "var_name": "fragment" } ], "file": "app/src/main/java/org/glucosio/android/presenter/AssistantPresenter.java", "identifie...
{ "body": "public void userAskedA1CCalculator() {\n fragment.startA1CCalculatorActivity();\n }", "class_method_signature": "AssistantPresenter.userAskedA1CCalculator()", "constructor": false, "full_signature": "public void userAskedA1CCalculator()", "identifier": "userAskedA1CCalculator", "invocat...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_26
{ "fields": [ { "declarator": "defaultLocale", "modifier": "private", "original_string": "private Locale defaultLocale;", "type": "Locale", "var_name": "defaultLocale" } ], "file": "app/src/test/java/org/glucosio/android/tools/ReadingToolsTest.java", "identifier": "ReadingT...
{ "body": "@Test\n public void shouldReturnCorrectNumber_whenCommaIsDecimalSeparator() {\n Locale.setDefault(new Locale(\"fr\"));\n assertThat(ReadingTools.parseReading(\"1,23\").doubleValue()).isEqualTo(1.23);\n }", "class_method_signature": "ReadingToolsTest.shouldReturnCorrectNumber_whenComma...
{ "fields": [], "file": "app/src/main/java/org/glucosio/android/tools/ReadingTools.java", "identifier": "ReadingTools", "interfaces": "", "methods": [ { "class_method_signature": "ReadingTools.ReadingTools()", "constructor": true, "full_signature": "public ReadingTools()", "identi...
{ "body": "@Nullable\n public static Number parseReading(String reading) {\n if (reading == null)\n return null;\n NumberFormat numberFormat = NumberFormat.getInstance();\n try {\n return numberFormat.parse(reading);\n } catch (ParseException e) {\n retu...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_30
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void expectPurpleWhenReadingValueIs65WithNoPreferredRange() {\n assertTrue(glucoseRanges.colorFromReading(65).equals(\"purple\"));\n }", "class_method_signature": "GlucoseRangesTest.expectPurpleWhenReadingValueIs65WithNoPreferredRange()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public String colorFromReading(double reading) {\n if (reading < HYPO_LIMIT) {\n // hypo limit 70\n return \"purple\";\n } else if (reading > HYPER_LIMIT) {\n // hyper limit 200\n return \"red\";\n } else if (reading < userMin) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_88
{ "fields": [ { "declarator": "migration = new Migration()", "modifier": "private", "original_string": "private Migration migration = new Migration();", "type": "Migration", "var_name": "migration" }, { "declarator": "realmMock = mock(DynamicRealm.class)", "modifi...
{ "body": "@Test\n public void ProperlyMigrateUserFromVersion4() {\n when(objectMock.getInt(\"custom_range_min\")).thenReturn(8);\n when(objectMock.getInt(\"custom_range_max\")).thenReturn(4);\n\n migration.migrate(realmMock, 4, 5);\n\n inOrder.verify(schemaMock).get(\"User\");\n ...
{ "fields": [], "file": "app/src/main/java/org/glucosio/android/db/Migration.java", "identifier": "Migration", "interfaces": "implements RealmMigration", "methods": [ { "class_method_signature": "Migration.migrate(@NonNull DynamicRealm realm, long oldVersion, long newVersion)", "constructor": ...
{ "body": "@Override\n public void migrate(@NonNull DynamicRealm realm, long oldVersion, long newVersion) {\n RealmSchema schema = realm.getSchema();\n\n if (oldVersion == 0) {\n createInitialSchema(schema);\n oldVersion++;\n }\n\n if (oldVersion == 1) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_67
{ "fields": [ { "declarator": "ifmm = new InputFilterMinMax(3, 5)", "modifier": "private", "original_string": "private InputFilterMinMax ifmm = new InputFilterMinMax(3, 5);", "type": "InputFilterMinMax", "var_name": "ifmm" } ], "file": "app/src/test/java/org/glucosio/android/...
{ "body": "@Test\n public void checkIfRACCB2ValueIsInRangeFalse() {\n assertFalse(ifmm.isInRange(1, 2, 5));\n }", "class_method_signature": "InputFilterMinMaxTest.checkIfRACCB2ValueIsInRangeFalse()", "constructor": false, "full_signature": "@Test public void checkIfRACCB2ValueIsInRangeFalse()", "...
{ "fields": [ { "declarator": "TAG = \"InputFilterMinMax\"", "modifier": "private static final", "original_string": "private static final String TAG = \"InputFilterMinMax\";", "type": "String", "var_name": "TAG" }, { "declarator": "min", "modifier": "private", ...
{ "body": "protected boolean isInRange(double a, double b, double c) {\n return b > a ? c >= a && c <= b : c >= b && c <= a;\n }", "class_method_signature": "InputFilterMinMax.isInRange(double a, double b, double c)", "constructor": false, "full_signature": "protected boolean isInRange(double a, doubl...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_56
{ "fields": [], "file": "app/src/test/java/org/glucosio/android/tools/GlucosioConverterTest.java", "identifier": "GlucosioConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ShouldConvertMgDlToA1cExactly_WhenA1CNeeded() {\n assertThat(GlucosioConverter.glucoseToA1C(18)).isEqualTo(2.25);\n }", "class_method_signature": "GlucosioConverterTest.ShouldConvertMgDlToA1cExactly_WhenA1CNeeded()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [ { "declarator": "MG_DL_TO_MMOL_CONSTANT = 18.0", "modifier": "private static final", "original_string": "private static final double MG_DL_TO_MMOL_CONSTANT = 18.0;", "type": "double", "var_name": "MG_DL_TO_MMOL_CONSTANT" }, { "declarator": "KG_TO_LB_CONSTA...
{ "body": "public static double glucoseToA1C(double mgDl) {\n // A1C = (Average glucose + 46.7) / 28.7\n return round((mgDl + 46.7) / 28.7, 2);\n }", "class_method_signature": "GlucosioConverter.glucoseToA1C(double mgDl)", "constructor": false, "full_signature": "public static double glucoseToA...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_40
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void expectOrangeWhenReadingValueIs155WithUKNICEPreferredRange() {\n assertTrue(glucoseRanges.colorFromReading(145).equals(\"orange\"));\n }", "class_method_signature": "GlucoseRangesTest.expectOrangeWhenReadingValueIs155WithUKNICEPreferredRange()", "constructor": false, "...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public String colorFromReading(double reading) {\n if (reading < HYPO_LIMIT) {\n // hypo limit 70\n return \"purple\";\n } else if (reading > HYPER_LIMIT) {\n // hyper limit 200\n return \"red\";\n } else if (reading < userMin) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_17
{ "fields": [ { "declarator": "presenter", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private HelloPresenter presenter;", "type": "HelloPresenter", "var_name": "presenter" }, { "declarator": "helloViewMock", "modifier": "@Mock\n...
{ "body": "@Test\n public void ShouldAskForWarning_WhenAgeIsAbove120() throws Exception {\n\n presenter.onNextClicked(\"121\", null, null, null, -1, null);\n\n verify(helloViewMock).displayErrorWrongAge();\n verify(dbHandlerMock, never()).addUser(any(User.class));\n }", "class_method_sign...
{ "fields": [ { "declarator": "dB", "modifier": "private final", "original_string": "private final DatabaseHandler dB;", "type": "DatabaseHandler", "var_name": "dB" }, { "declarator": "helloView", "modifier": "private final", "original_string": "private fina...
{ "body": "public void onNextClicked(String age, String gender, String language, String country, int type, String unit) {\n if (validateAge(age)) {\n saveToDatabase(id, name, language, country, Integer.parseInt(age), gender, type, unit);\n helloView.startMainView();\n } else {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_83
{ "fields": [ { "declarator": "application", "modifier": "private", "original_string": "private GlucosioApplicationForTest application;", "type": "GlucosioApplicationForTest", "var_name": "application" }, { "declarator": "preferencesMock", "modifier": "@Mock\n ...
{ "body": "@Test\n public void ShouldSaveLanguageClearedToPreferences_WhenItIsDone() {\n when(databaseHandlerMock.getUser(1)).thenReturn(user);\n\n application.onCreate();\n\n verify(preferencesMock).saveLocaleCleaned();\n }", "class_method_signature": "GlucosioApplicationTest.ShouldSaveL...
{ "fields": [ { "declarator": "sInstance", "modifier": "private static", "original_string": "private static GlucosioApplication sInstance;", "type": "GlucosioApplication", "var_name": "sInstance" }, { "declarator": "analytics", "modifier": "@Nullable\n private"...
{ "body": "@Override\n public void onCreate() {\n super.onCreate();\n sInstance = this;\n initFont();\n initLanguage();\n }", "class_method_signature": "GlucosioApplication.onCreate()", "constructor": false, "full_signature": "@Override public void onCreate()", "identifier": ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_95
{ "fields": [ { "declarator": "activity", "modifier": "private", "original_string": "private A1cCalculatorActivity activity;", "type": "A1cCalculatorActivity", "var_name": "activity" }, { "declarator": "editableMock", "modifier": "@Mock\n private", "origi...
{ "body": "@Test\n public void ReturnTrue_WhenKeyboardActionDone() throws Exception {\n assertThat(activity.editorAction(null, EditorInfo.IME_ACTION_DONE, null)).isTrue();\n }", "class_method_signature": "A1cCalculatorActivityTest.ReturnTrue_WhenKeyboardActionDone()", "constructor": false, "full_si...
{ "fields": [ { "declarator": "glucoseUnit", "modifier": "@BindView(R.id.activity_converter_a1c_glucose_unit)", "original_string": "@BindView(R.id.activity_converter_a1c_glucose_unit)\n TextView glucoseUnit;", "type": "TextView", "var_name": "glucoseUnit" }, { "decla...
{ "body": "@SuppressWarnings(\"UnusedParameters\")\n @OnEditorAction(R.id.activity_converter_a1c_glucose)\n boolean editorAction(TextView view, int actionId, KeyEvent event) {\n return actionId == EditorInfo.IME_ACTION_DONE;\n }", "class_method_signature": "A1cCalculatorActivity.editorAction(TextVie...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_60
{ "fields": [], "file": "app/src/test/java/org/glucosio/android/tools/GlucosioConverterTest.java", "identifier": "GlucosioConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ShouldConvertPercentageToA1cExactly_WhenPercentageIsUsed() {\n assertThat(GlucosioConverter.a1cNgspToIfcc(5)).isEqualTo(31.13);\n }", "class_method_signature": "GlucosioConverterTest.ShouldConvertPercentageToA1cExactly_WhenPercentageIsUsed()", "constructor": false, "f...
{ "fields": [ { "declarator": "MG_DL_TO_MMOL_CONSTANT = 18.0", "modifier": "private static final", "original_string": "private static final double MG_DL_TO_MMOL_CONSTANT = 18.0;", "type": "double", "var_name": "MG_DL_TO_MMOL_CONSTANT" }, { "declarator": "KG_TO_LB_CONSTA...
{ "body": "public static double a1cNgspToIfcc(double ngsp) {\n // percentage to mmol/mol\n // [NGSP - 2.152] / 0.09148\n return round((ngsp - 2.152) / 0.09148, 2);\n }", "class_method_signature": "GlucosioConverter.a1cNgspToIfcc(double ngsp)", "constructor": false, "full_signature": "pub...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_37
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void expectOrangeWhenReadingValueIs145WithAACEPreferredRange() {\n assertTrue(glucoseRanges.colorFromReading(145).equals(\"orange\"));\n }", "class_method_signature": "GlucoseRangesTest.expectOrangeWhenReadingValueIs145WithAACEPreferredRange()", "constructor": false, "full...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public String colorFromReading(double reading) {\n if (reading < HYPO_LIMIT) {\n // hypo limit 70\n return \"purple\";\n } else if (reading > HYPER_LIMIT) {\n // hyper limit 200\n return \"red\";\n } else if (reading < userMin) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_21
{ "fields": [ { "declarator": "presenter", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private HelloPresenter presenter;", "type": "HelloPresenter", "var_name": "presenter" }, { "declarator": "helloViewMock", "modifier": "@Mock\n...
{ "body": "@Test\n public void ShouldPropagateAllValues_WhenSavingUser() throws Exception {\n\n final String gender = \"male\";\n final String language = \"ukrainian\";\n final String country = \"ukraine\";\n final int type = 1;\n final String unit = \"mmol/l\";\n\n presen...
{ "fields": [ { "declarator": "dB", "modifier": "private final", "original_string": "private final DatabaseHandler dB;", "type": "DatabaseHandler", "var_name": "dB" }, { "declarator": "helloView", "modifier": "private final", "original_string": "private fina...
{ "body": "public void onNextClicked(String age, String gender, String language, String country, int type, String unit) {\n if (validateAge(age)) {\n saveToDatabase(id, name, language, country, Integer.parseInt(age), gender, type, unit);\n helloView.startMainView();\n } else {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_6
{ "fields": [ { "declarator": "dbHandlerMock", "modifier": "@Mock\n private", "original_string": "@Mock\n private DatabaseHandler dbHandlerMock;", "type": "DatabaseHandler", "var_name": "dbHandlerMock" }, { "declarator": "activity", "modifier": "@Mock\n p...
{ "body": "@Test\n public void ShouldReturnZero_WhenDecimalSeparatorStringPassed() {\n assertThat(presenter.calculateA1C(\".\")).isZero();\n }", "class_method_signature": "A1CCalculatorPresenterTest.ShouldReturnZero_WhenDecimalSeparatorStringPassed()", "constructor": false, "full_signature": "@Test...
{ "fields": [ { "declarator": "dbHandler", "modifier": "private final", "original_string": "private final DatabaseHandler dbHandler;", "type": "DatabaseHandler", "var_name": "dbHandler" }, { "declarator": "activity", "modifier": "private final", "original_st...
{ "body": "public double calculateA1C(String glucose) {\n if (isInvalidDouble(glucose)) {\n return 0;\n }\n\n double convertedA1C;\n User user = dbHandler.getUser(1);\n\n double glucoseDouble = ReadingTools.safeParseDouble(glucose);\n if (Constants.Units.MG_DL.equa...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_76
{ "fields": [ { "declarator": "dateTool = new FormatDateTime(RuntimeEnvironment.application)", "modifier": "private final", "original_string": "private final FormatDateTime dateTool = new FormatDateTime(RuntimeEnvironment.application);", "type": "FormatDateTime", "var_name": "dateToo...
{ "body": "@Test\n public void GeneratesEmptyCSVWithHeader_WhenNoData() throws IOException {\n ReadingToCSV r = new ReadingToCSV(RuntimeEnvironment.application, Constants.Units.MG_DL);\n r.createCSVFile(new ArrayList<GlucoseReading>(), osw);\n\n assertFileContentEqualsToString(outputStream.toS...
{ "fields": [ { "declarator": "SYMBOLS_TO_ESCAPE = new char[]{',', '\"', '\\n', '\\r'}", "modifier": "private static final", "original_string": "private static final char[] SYMBOLS_TO_ESCAPE = new char[]{',', '\"', '\\n', '\\r'};", "type": "char[]", "var_name": "SYMBOLS_TO_ESCAPE" ...
{ "body": "public void createCSVFile(@NonNull List<GlucoseReading> readings, @NonNull OutputStreamWriter osw) throws IOException {\n // CSV Structure\n // Date | Time | Concentration | Unit | Measured | Notes\n Resources resources = context.getResources();\n writeLine(osw,\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_77
{ "fields": [ { "declarator": "dateTool = new FormatDateTime(RuntimeEnvironment.application)", "modifier": "private final", "original_string": "private final FormatDateTime dateTool = new FormatDateTime(RuntimeEnvironment.application);", "type": "FormatDateTime", "var_name": "dateToo...
{ "body": "@Test\n public void GeneratesCSVWithHeaderAndOneLine_WhenOneReading() throws IOException {\n final Date created = new Date();\n\n List<GlucoseReading> values = new ArrayList<>();\n values.add(new GlucoseReading(80, \"type\", created, \"notes\"));\n\n ReadingToCSV r = new Read...
{ "fields": [ { "declarator": "SYMBOLS_TO_ESCAPE = new char[]{',', '\"', '\\n', '\\r'}", "modifier": "private static final", "original_string": "private static final char[] SYMBOLS_TO_ESCAPE = new char[]{',', '\"', '\\n', '\\r'};", "type": "char[]", "var_name": "SYMBOLS_TO_ESCAPE" ...
{ "body": "public void createCSVFile(@NonNull List<GlucoseReading> readings, @NonNull OutputStreamWriter osw) throws IOException {\n // CSV Structure\n // Date | Time | Concentration | Unit | Measured | Notes\n Resources resources = context.getResources();\n writeLine(osw,\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_7
{ "fields": [ { "declarator": "dbHandlerMock", "modifier": "@Mock\n private", "original_string": "@Mock\n private DatabaseHandler dbHandlerMock;", "type": "DatabaseHandler", "var_name": "dbHandlerMock" }, { "declarator": "activity", "modifier": "@Mock\n p...
{ "body": "@Test\n public void ShouldReturnZero_WhenAnotherDecimalSeparatorStringPassed() {\n assertThat(presenter.calculateA1C(\",\")).isZero();\n }", "class_method_signature": "A1CCalculatorPresenterTest.ShouldReturnZero_WhenAnotherDecimalSeparatorStringPassed()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "dbHandler", "modifier": "private final", "original_string": "private final DatabaseHandler dbHandler;", "type": "DatabaseHandler", "var_name": "dbHandler" }, { "declarator": "activity", "modifier": "private final", "original_st...
{ "body": "public double calculateA1C(String glucose) {\n if (isInvalidDouble(glucose)) {\n return 0;\n }\n\n double convertedA1C;\n User user = dbHandler.getUser(1);\n\n double glucoseDouble = ReadingTools.safeParseDouble(glucose);\n if (Constants.Units.MG_DL.equa...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_20
{ "fields": [ { "declarator": "presenter", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private HelloPresenter presenter;", "type": "HelloPresenter", "var_name": "presenter" }, { "declarator": "helloViewMock", "modifier": "@Mock\n...
{ "body": "@Test\n public void ShouldAskForWarning_WhenAgeIsNull() throws Exception {\n\n presenter.onNextClicked(null, null, null, null, -1, null);\n\n verify(helloViewMock).displayErrorWrongAge();\n verify(dbHandlerMock, never()).addUser(any(User.class));\n }", "class_method_signature":...
{ "fields": [ { "declarator": "dB", "modifier": "private final", "original_string": "private final DatabaseHandler dB;", "type": "DatabaseHandler", "var_name": "dB" }, { "declarator": "helloView", "modifier": "private final", "original_string": "private fina...
{ "body": "public void onNextClicked(String age, String gender, String language, String country, int type, String unit) {\n if (validateAge(age)) {\n saveToDatabase(id, name, language, country, Integer.parseInt(age), gender, type, unit);\n helloView.startMainView();\n } else {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_36
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void expectBlueWhenReadingValueIs90WithAACEPreferredRange() {\n assertTrue(glucoseRanges.colorFromReading(90).equals(\"blue\"));\n }", "class_method_signature": "GlucoseRangesTest.expectBlueWhenReadingValueIs90WithAACEPreferredRange()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public String colorFromReading(double reading) {\n if (reading < HYPO_LIMIT) {\n // hypo limit 70\n return \"purple\";\n } else if (reading > HYPER_LIMIT) {\n // hyper limit 200\n return \"red\";\n } else if (reading < userMin) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_61
{ "fields": [], "file": "app/src/test/java/org/glucosio/android/tools/GlucosioConverterTest.java", "identifier": "GlucosioConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ShouldConvertA1cToPercentageExactly_WhenPercentageNeeded() {\n assertThat(GlucosioConverter.a1cIfccToNgsp(31.13)).isEqualTo(5);\n }", "class_method_signature": "GlucosioConverterTest.ShouldConvertA1cToPercentageExactly_WhenPercentageNeeded()", "constructor": false, "f...
{ "fields": [ { "declarator": "MG_DL_TO_MMOL_CONSTANT = 18.0", "modifier": "private static final", "original_string": "private static final double MG_DL_TO_MMOL_CONSTANT = 18.0;", "type": "double", "var_name": "MG_DL_TO_MMOL_CONSTANT" }, { "declarator": "KG_TO_LB_CONSTA...
{ "body": "public static double a1cIfccToNgsp(double ifcc) {\n // mmol/mol to percentage\n // [0.09148 * IFCC] + 2.152\n return round((0.09148 * ifcc) + 2.152, 2);\n }", "class_method_signature": "GlucosioConverter.a1cIfccToNgsp(double ifcc)", "constructor": false, "full_signature": "pub...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_94
{ "fields": [ { "declarator": "activity", "modifier": "private", "original_string": "private A1cCalculatorActivity activity;", "type": "A1cCalculatorActivity", "var_name": "activity" }, { "declarator": "editableMock", "modifier": "@Mock\n private", "origi...
{ "body": "@Test\n public void NotifyPresenter_WhenGlucoseValueChanged() throws Exception {\n String value = \"2\";\n when(editableMock.toString()).thenReturn(value);\n\n activity.glucoseValueChanged(editableMock);\n\n verify(getA1cCalculatorPresenter()).calculateA1C(value);\n }", ...
{ "fields": [ { "declarator": "glucoseUnit", "modifier": "@BindView(R.id.activity_converter_a1c_glucose_unit)", "original_string": "@BindView(R.id.activity_converter_a1c_glucose_unit)\n TextView glucoseUnit;", "type": "TextView", "var_name": "glucoseUnit" }, { "decla...
{ "body": "@OnTextChanged(value = R.id.activity_converter_a1c_glucose, callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED)\n void glucoseValueChanged(@NonNull final Editable s) {\n convertedA1C = presenter.calculateA1C(s.toString());\n A1CTextView.setText(String.valueOf(NumberFormat.getInstance().f...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_82
{ "fields": [ { "declarator": "application", "modifier": "private", "original_string": "private GlucosioApplicationForTest application;", "type": "GlucosioApplicationForTest", "var_name": "application" }, { "declarator": "preferencesMock", "modifier": "@Mock\n ...
{ "body": "@Test\n public void ShouldClearLanguage_WhenSetFromHelloActivityAndNotFixedYet() {\n when(databaseHandlerMock.getUser(1)).thenReturn(user);\n\n application.onCreate();\n\n verify(databaseHandlerMock).updateUser(userCaptor.capture());\n assertThat(userCaptor.getValue().getPref...
{ "fields": [ { "declarator": "sInstance", "modifier": "private static", "original_string": "private static GlucosioApplication sInstance;", "type": "GlucosioApplication", "var_name": "sInstance" }, { "declarator": "analytics", "modifier": "@Nullable\n private"...
{ "body": "@Override\n public void onCreate() {\n super.onCreate();\n sInstance = this;\n initFont();\n initLanguage();\n }", "class_method_signature": "GlucosioApplication.onCreate()", "constructor": false, "full_signature": "@Override public void onCreate()", "identifier": ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_16
{ "fields": [ { "declarator": "presenter", "modifier": "@InjectMocks\n private", "original_string": "@InjectMocks\n private HelloPresenter presenter;", "type": "HelloPresenter", "var_name": "presenter" }, { "declarator": "helloViewMock", "modifier": "@Mock\n...
{ "body": "@Test\n public void ShouldAskForWarning_WhenAgeIsZero() throws Exception {\n\n presenter.onNextClicked(\"0\", null, null, null, -1, null);\n\n verify(helloViewMock).displayErrorWrongAge();\n verify(dbHandlerMock, never()).addUser(any(User.class));\n }", "class_method_signature"...
{ "fields": [ { "declarator": "dB", "modifier": "private final", "original_string": "private final DatabaseHandler dB;", "type": "DatabaseHandler", "var_name": "dB" }, { "declarator": "helloView", "modifier": "private final", "original_string": "private fina...
{ "body": "public void onNextClicked(String age, String gender, String language, String country, int type, String unit) {\n if (validateAge(age)) {\n saveToDatabase(id, name, language, country, Integer.parseInt(age), gender, type, unit);\n helloView.startMainView();\n } else {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_41
{ "fields": [ { "declarator": "READING_OK = Color.parseColor(\"#749756\")", "modifier": "private static final", "original_string": "private static final int READING_OK = Color.parseColor(\"#749756\");", "type": "int", "var_name": "READING_OK" }, { "declarator": "READING...
{ "body": "@Test\n public void expectGreenWhenReadingValueIs100WithNoPreferredRangeAndExtValuesRange75140() {\n setPreferredRange(75, 140);\n assertTrue(glucoseRanges.colorFromReading(100).equals(\"green\"));\n }", "class_method_signature": "GlucoseRangesTest.expectGreenWhenReadingValueIs100With...
{ "fields": [ { "declarator": "mContext", "modifier": "private", "original_string": "private Context mContext;", "type": "Context", "var_name": "mContext" }, { "declarator": "userMin", "modifier": "private", "original_string": "private double userMin;", ...
{ "body": "public String colorFromReading(double reading) {\n if (reading < HYPO_LIMIT) {\n // hypo limit 70\n return \"purple\";\n } else if (reading > HYPER_LIMIT) {\n // hyper limit 200\n return \"red\";\n } else if (reading < userMin) {\n ...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
37447498_57
{ "fields": [], "file": "app/src/test/java/org/glucosio/android/tools/GlucosioConverterTest.java", "identifier": "GlucosioConverterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ShouldConvertA1CToGlucoseExactly_WhenGlucoseNeeded() {\n assertThat(GlucosioConverter.a1cToGlucose(2.25)).isEqualTo(17.88);\n }", "class_method_signature": "GlucosioConverterTest.ShouldConvertA1CToGlucoseExactly_WhenGlucoseNeeded()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "MG_DL_TO_MMOL_CONSTANT = 18.0", "modifier": "private static final", "original_string": "private static final double MG_DL_TO_MMOL_CONSTANT = 18.0;", "type": "double", "var_name": "MG_DL_TO_MMOL_CONSTANT" }, { "declarator": "KG_TO_LB_CONSTA...
{ "body": "public static double a1cToGlucose(double a1c) {\n // Average glucose = (A1C * 28.7) -46.7\n return round((a1c * 28.7) - 46.7, 2);\n }", "class_method_signature": "GlucosioConverter.a1cToGlucose(double a1c)", "constructor": false, "full_signature": "public static double a1cToGlucose(d...
{ "created": null, "fork": null, "fork_count": 169, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 37447498, "size": 32732, "stargazer_count": 331, "stars": null, "updates": null, "url": "https://github.com/Glucosio/glucosio-android" }
8582237_50
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLLongIntTest.java", "identifier": "SQLLongIntTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test\n public void readExternalNull() throws IOException {\n SQLLongint lint = new SQLLongint();\n MockObjectInput moi = new MockObjectInput();\n moi.isNull = true;\n moi.value = 0L;\n lint.readExternal(moi);\n ...
{ "fields": [ { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLLongint.class)", "modifier": "private static final", "original_string": "private static final int BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLLongint.class);", "type": "int", "var_n...
{ "body": "public void readExternal(ObjectInput in) throws IOException {\n\t\tsetIsNull(in.readBoolean());\n\t\tvalue = in.readLong();\n\t}", "class_method_signature": "SQLLongint.readExternal(ObjectInput in)", "constructor": false, "full_signature": "public void readExternal(ObjectInput in)", "identifier": "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_189
{ "fields": [], "file": "utilities/src/test/java/com/splicemachine/stream/StreamsTest.java", "identifier": "StreamsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void peekingStream() throws StreamException {\n Stream<String> stream = Streams.of(\"111\", \"222\", \"333\");\n\n PeekableStream<String> stream1 = Streams.peekingStream(stream);\n\n assertEquals(\"111\", stream1.peek());\n assertEquals(\"111\", stream1.next())...
{ "fields": [ { "declarator": "EMPTY = new AbstractStream() {\n @Override public Object next() throws StreamException { return null; }\n @Override public void close() throws StreamException { }\n }", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public static <T> PeekableStream<T> peekingStream(Stream<T> stream){ return new PeekingStream<>(stream); }", "class_method_signature": "Streams.peekingStream(Stream<T> stream)", "constructor": false, "full_signature": "public static PeekableStream<T> peekingStream(Stream<T> stream)", "identifier": ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_166
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutatePurgeConsideringWatermarkKeepTombstone() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(1100, 1110),\n SITestUtils.getMockCommitCell(300, 310),\n SITestUtils.getMockCommitCell(200, 210)...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_218
{ "fields": [ { "declarator": "NANOS_IN_HOUR = 1000 * 1000 * 1000 * 60 * 60", "modifier": "private static final", "original_string": "private static final long NANOS_IN_HOUR = 1000 * 1000 * 1000 * 60 * 60;", "type": "long", "var_name": "NANOS_IN_HOUR" } ], "file": "splice_mac...
{ "body": "@Test\n public void shouldFailOnSmallDate() {\n String errorCode = \"N/A\";\n try {\n TimestampV2DescriptorSerializer.formatLong(getTimestamp(1677));\n } catch (StandardException e) {\n errorCode = e.getSqlState();\n }\n\n assertEquals(SQLState.LA...
{ "fields": [ { "declarator": "INSTANCE_FACTORY = new AbstractTimeDescriptorSerializer.Factory() {\n @Override\n public DescriptorSerializer newInstance() {\n return new TimestampV2DescriptorSerializer();\n }\n\n @Override\n public boolean applies(int typeFormat...
{ "body": "public static long formatLong(Timestamp timestamp) throws StandardException {\n long millis = SQLTimestamp.checkV2Bounds(timestamp);\n long micros = timestamp.getNanos() / NANOS_TO_MICROS;\n return millis * MICROS_TO_SECOND + micros;\n }", "class_method_signature": "TimestampV2Des...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_131
{ "fields": [ { "declarator": "REGION_NAME = \"NetherRegion\"", "modifier": "private static final", "original_string": "private static final String REGION_NAME = \"NetherRegion\";", "type": "String", "var_name": "REGION_NAME" }, { "declarator": "mockCtx", "modifie...
{ "body": "@Test\n public void preCompactTestRequest() throws Exception {\n MemstoreAwareObserver mao = new MemstoreAwareObserver();\n SpliceCompactionRequest compactionRequest = new StubCompactionRequest();\n\n mao.preCompact(mockCtx, mockStore, mockScanner, userScanType, null, compactionRequ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(MemstoreAwareObserver.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(MemstoreAwareObserver.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@Override\n public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store,\n InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker,\n CompactionRequest request) throws IOEx...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_11
{ "fields": [ { "declarator": "TYPENAME = \"VARCHAR\"", "modifier": "private static final", "original_string": "private static final String TYPENAME = \"VARCHAR\";", "type": "String", "var_name": "TYPENAME" }, { "declarator": "HEADER_LENGTH = 2", "modifier": "priv...
{ "body": "@Test\n public void testInvalidUTF8Encoding()\n throws IOException {\n // 0xf8 = 11111000 <-- invalid UTF-8 encoding\n byte[] data = {'a', 'b', 'c', (byte)0xf8, 'e', 'f'};\n InputStream is = new ByteArrayInputStream(data);\n try {\n UTF8Util.skipFully(is...
{ "fields": [], "file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java", "identifier": "UTF8Util", "interfaces": "", "methods": [ { "class_method_signature": "UTF8Util.UTF8Util()", "constructor": true, "full_signature": "private UTF8Util()", "identifier": "U...
{ "body": "public static final long skipFully(InputStream in, long charsToSkip)\n throws EOFException, IOException {\n SkipCount skipped = internalSkip(in, charsToSkip);\n if (skipped.charsSkipped() != charsToSkip) {\n throw new EOFException(\"Reached end-of-stream prematurely at \...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_127
{ "fields": [], "file": "hbase_sql/src/test/java/com/splicemachine/orc/block/ShortColumnBlockTest.java", "identifier": "ShortColumnBlockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void setPartitionValueTest() {\n ShortColumnBlock shortColumnBlock = new ShortColumnBlock(null, DataTypes.ShortType);\n shortColumnBlock.setPartitionValue(\"5\",1000);\n short value = 5;\n for (int i = 0; i< 1000; i++) {\n Assert.assertEquals(value,s...
{ "fields": [], "file": "hbase_sql/src/main/java/com/splicemachine/orc/block/ShortColumnBlock.java", "identifier": "ShortColumnBlock", "interfaces": "", "methods": [ { "class_method_signature": "ShortColumnBlock.ShortColumnBlock(ColumnVector columnVector, DataType type)", "constructor": true, ...
{ "body": "@Override\n public void setPartitionValue(String value, int size) {\n columnVector = ColumnVector.allocate(size, dataType, MemoryMode.ON_HEAP);\n columnVector.appendShorts(size,Short.parseShort(value));\n }", "class_method_signature": "ShortColumnBlock.setPartitionValue(String value, ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_259
{ "fields": [ { "declarator": "config = new ConfigurationBuilder().build(new EmptyConfigurationDefaultsList().addConfig(new TestConfig()),\n new ReflectingConfigurationSource())", "modifier": "private static final", ...
{ "body": "@Test\n public void testWorksWhenAllServersRespondAfterFirstCheck() throws Exception{\n final List<String> servers = Arrays.asList(\"server1\",\"server2\");\n final String changeId = \"change\";\n final TestDDLCommunicator ddlCommunicator = new TestDDLCommunicator(servers){\n ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(AsynchronousDDLController.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(AsynchronousDDLController.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public String notifyMetadataChange(DDLChange change) throws StandardException {\n String changeId = communicator.createChangeNode(change);\n\n long availableTime =maximumWaitTime;\n long elapsedTime = 0;\n Collection<String> finishedServers =Collections.emptyList(...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_46
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLLongIntTest.java", "identifier": "SQLLongIntTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test(expected = StandardException.class)\n public void testNegativeOverFlow() throws StandardException {\n SQLLongint long1 = new SQLLongint(Long.MIN_VALUE);\n SQLLongint long2 = new SQLLongint(1);\n long1.minus(long1, long2, null);\n }", "class...
{ "fields": [ { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLLongint.class)", "modifier": "private static final", "original_string": "private static final int BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLLongint.class);", "type": "int", "var_n...
{ "body": "public NumberDataValue minus(NumberDataValue left,\n\t\t\t\t\t\t\tNumberDataValue right,\n\t\t\t\t\t\t\tNumberDataValue result)\n\t\t\t\tthrows StandardException\n\t{\n\t\tif (result == null)\n\t\t{\n\t\t\tresult = new SQLLongint();\n\t\t}\n\n\t\tif (left.isNull() || right.isNull())\n\t\t{\n\t\t\tresult.se...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_170
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateDoNotPurgeLatestTombstoneInMinorCompactionDespiteTwoTokens() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(400, 410),\n SITestUtils.getMockCommitCell(300, 310),\n SITestUtils.getMockCo...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_222
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void testAddYears() {\n Calendar c = Calendar.getInstance();\n Date t = new Date(c.getTime().getTime());\n c.add(Calendar.YEAR, 2);\n Date s = new Date(c.getTime().getTime());\n assertEquals(SpliceDateFunctions.ADD_YEARS(t, 2), s);\n }", "class_meth...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Date ADD_YEARS(Date source, Integer numOfYears) {\n if (source == null || numOfYears == null) return null;\n DateTime dt = new DateTime(source);\n return new Date(dt.plusYears(numOfYears).getMillis());\n }", "class_method_signature": "SpliceDateFunctions.ADD_YEARS(Da...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_275
{ "fields": [], "file": "splice_machine/src/test/java/com/splicemachine/client/SpliceClientTest.java", "identifier": "SpliceClientTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseJDBCPassword() throws SqlException {\n String password = \"Abd98*@80EFg\";\n String raw = \"jdbc:splice://localhost.com:1527/splicedb;user=af29891;password=\" + password;\n assertEquals(password, SpliceClient.parseJDBCPassword(raw));\n\n raw = \"j...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SpliceClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SpliceClient.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "isClient...
{ "body": "static String parseJDBCPassword(String jdbcUrl) throws SqlException {\n Properties properties = ClientDriver.tokenizeURLProperties(jdbcUrl, null);\n return properties.getProperty(\"password\");\n }", "class_method_signature": "SpliceClient.parseJDBCPassword(String jdbcUrl)", "construct...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_85
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java", "identifier": "NonUniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testNullSelectivity() throws StandardException {\n Assert.assertEquals(1,impl.selectivity(null));\n }", "class_method_signature": "NonUniqueKeyStatisticsImplTest.testNullSelectivity()", "constructor": false, "full_signature": "@Test public void testNullSelectivity()",...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "frequenciesSketch", "modifier": "private",...
{ "body": "@Override\n public long selectivity(ExecRow element) {\n // Frequent Items\n long count = frequenciesSketch.getEstimate(element);\n if (count>0)\n return count;\n // Return Cardinality\n return (long) (quantilesSketch.getN()/thetaSketch.getEstimate()); // Sh...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_263
{ "fields": [], "file": "splice_machine/src/test/java/com/splicemachine/derby/impl/sql/execute/sequence/AbstractSequenceTest.java", "identifier": "AbstractSequenceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void singleThreaded100BlockWithStarting20Increment10WithRollover() throws Exception {\n\t\tSequence sequence = new SpliceTestSequence(100,10,20);\n\t\tfor (long i = 0; i< 1000; i++) {\n\t\t\tlong next = sequence.getNext();\n\t\t\tAssert.assertTrue((i*10+20)==next);\n\t\t}\n\t}", "class_me...
{ "fields": [ { "declarator": "remaining=new AtomicLong(0l)", "modifier": "protected final", "original_string": "protected final AtomicLong remaining=new AtomicLong(0l);", "type": "AtomicLong", "var_name": "remaining" }, { "declarator": "currPosition=new AtomicLong(0l)"...
{ "body": "public long getNext() throws StandardException{\n if(remaining.getAndDecrement()<=0)\n allocateBlock(false);\n return currPosition.getAndAdd(incrementSteps);\n }", "class_method_signature": "AbstractSequence.getNext()", "constructor": false, "full_signature": "public long ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_93
{ "fields": [ { "declarator": "cut = new CurrentDatetime()", "modifier": "private", "original_string": "private CurrentDatetime cut = new CurrentDatetime();", "type": "CurrentDatetime", "var_name": "cut" } ], "file": "db-engine/src/test/java/com/splicemachine/db/impl/sql/exec...
{ "body": "@Test\n public void testGetCurrentTime() {\n LocalTime local = LocalTime.now();\n Time time = cut.getCurrentTime();\n long difference = ChronoUnit.SECONDS.between(local, time.toLocalTime());\n assertTrue(difference <= 1);\n }", "class_method_signature": "CurrentDatetimeT...
{ "fields": [ { "declarator": "currentDateTime", "modifier": "private", "original_string": "private LocalDateTime currentDateTime;", "type": "LocalDateTime", "var_name": "currentDateTime" }, { "declarator": "currentDate", "modifier": "private", "original_str...
{ "body": "public Time getCurrentTime() {\n if (currentTime == null) {\n setCurrentDatetime();\n currentTime = Time.valueOf(currentDateTime.toLocalTime());\n }\n return currentTime;\n }", "class_method_signature": "CurrentDatetime.getCurrentTime()", "constructor": fal...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_234
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void toTimestamp() throws SQLException, ParseException {\n String format = \"yyyy/MM/dd HH:mm:ss.SSS\";\n String source = \"2014/06/24 12:13:14.123\";\n DateFormat formatter = new SimpleDateFormat(\"MM/dd/yy HH:mm:ss.SSS\");\n Timestamp date = new Timestamp(for...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Timestamp TO_TIMESTAMP(String source) throws SQLException {\n return TO_TIMESTAMP(source,null);\n }", "class_method_signature": "SpliceDateFunctions.TO_TIMESTAMP(String source)", "constructor": false, "full_signature": "public static Timestamp TO_TIMESTAMP(String source)", "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_185
{ "fields": [], "file": "utilities/src/test/java/com/splicemachine/collections/RingBufferTest.java", "identifier": "RingBufferTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void expand() {\n RingBuffer<Integer> buffer = new RingBuffer<Integer>(2);\n buffer.add(10);\n buffer.add(20);\n assertTrue(buffer.isFull());\n buffer.expand();\n assertFalse(buffer.isFull());\n buffer.add(30);\n buffer.add(40);\n ...
{ "fields": [ { "declarator": "mask", "modifier": "private", "original_string": "private int mask;", "type": "int", "var_name": "mask" }, { "declarator": "buffer", "modifier": "private", "original_string": "private Object[] buffer;", "type": "Object[]"...
{ "body": "public void expand() {\n buffer = Arrays.copyOf(buffer, 2 * buffer.length);\n mask = buffer.length - 1;\n }", "class_method_signature": "RingBuffer.expand()", "constructor": false, "full_signature": "public void expand()", "identifier": "expand", "invocations": [ "copyOf" ]...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_243
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void truncDate_throwsOnInvalidTimeFieldArg() throws ParseException, SQLException {\n expectedException.expect(SQLException.class);\n assertNull(TRUNC_DATE(timeStampT(\"2014/07/15 12:12:12.234\"), \"not-a-time-field\"));\n }", "class_method_signature": "SpliceDateFunctio...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Timestamp TRUNC_DATE(Timestamp source, String field) throws SQLException {\n if (source == null || field == null) return null;\n DateTime dt = new DateTime(source);\n field = field.toLowerCase();\n String lowerCaseField = field.toLowerCase();\n if (\"microse...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_214
{ "fields": [], "file": "splice_machine/src/test/java/com/splicemachine/derby/stream/function/QuoteTrackingTokenizerTest.java", "identifier": "QuoteTrackingTokenizerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void quotedMultiRowRecordWithOneLineRecordSetThrowsProperly() throws Exception {\n String invalidRow = \"\\\"hello\\\",\\\"wrong\\ncell\\\",goodbye\\n\";\n try {\n QuoteTrackingTokenizer qtt = new QuoteTrackingTokenizer(new StringReader(invalidRow), CsvPreference....
{ "fields": [ { "declarator": "LOG = Logger.getLogger(QuoteTrackingTokenizer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(QuoteTrackingTokenizer.class);", "type": "Logger", "var_name": "LOG" }, { "de...
{ "body": "@Override\n public boolean readColumns(final List<String> columns) throws IOException {\n return readColumns(columns, null);\n }", "class_method_signature": "QuoteTrackingTokenizer.readColumns(final List<String> columns)", "constructor": false, "full_signature": "@Override public boolean...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_202
{ "fields": [], "file": "utilities/src/test/java/com/splicemachine/uuid/SnowflakeTest.java", "identifier": "SnowflakeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNoDuplicatesManyThreadsSameSnowflake() throws Exception {\n int numThreads=3;\n final int numIterations = 50000;\n ExecutorService executor = Executors.newFixedThreadPool(numThreads);\n final ConcurrentMap<Long,Boolean> existing = new ConcurrentHashMap...
{ "fields": [ { "declarator": "TIMESTAMP_MASK = 0x1ffffffffffl", "modifier": "public static final", "original_string": "public static final long TIMESTAMP_MASK = 0x1ffffffffffl;", "type": "long", "var_name": "TIMESTAMP_MASK" }, { "declarator": "TIMESTAMP_SHIFT = 12", ...
{ "body": "public long nextUUID(){\n long timestamp;\n /*\n * Get the timestamp to use.\n *\n * There are several reasons why we have to check against the latest timestamp:\n *\n * 1. Prevent duplicate UUIDs because we ask for too many UUID...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_193
{ "fields": [], "file": "utilities/src/test/java/com/splicemachine/concurrent/CountDownLatchesTest.java", "identifier": "CountDownLatchesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUncheckedAwait() throws Exception {\n final CountDownLatch latch = new CountDownLatch(1);\n new Thread() {\n @Override\n public void run() {\n latch.countDown();\n }\n }.start();\n\n CountDownLatches.unch...
{ "fields": [], "file": "utilities/src/main/java/com/splicemachine/concurrent/CountDownLatches.java", "identifier": "CountDownLatches", "interfaces": "", "methods": [ { "class_method_signature": "CountDownLatches.uncheckedAwait(CountDownLatch countDownLatch)", "constructor": false, "full...
{ "body": "public static void uncheckedAwait(CountDownLatch countDownLatch) {\n try {\n countDownLatch.await();\n } catch (InterruptedException e) {\n throw new IllegalStateException(e);\n }\n }", "class_method_signature": "CountDownLatches.uncheckedAwait(CountDownLatch...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_255
{ "fields": [ { "declarator": "config = new ConfigurationBuilder().build(new EmptyConfigurationDefaultsList().addConfig(new TestConfig()),\n new ReflectingConfigurationSource())", "modifier": "private static final", ...
{ "body": "@Test\n public void correctlyCatchesNewServers() throws Exception{\n final List<String> servers = Arrays.asList(\"server1\",\"server2\");\n final String changeId = \"change\";\n final TickingClock clock = new IncrementingClock(0);\n final long timeout = 10l;\n\n final ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(AsynchronousDDLController.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(AsynchronousDDLController.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public String notifyMetadataChange(DDLChange change) throws StandardException {\n String changeId = communicator.createChangeNode(change);\n\n long availableTime =maximumWaitTime;\n long elapsedTime = 0;\n Collection<String> finishedServers =Collections.emptyList(...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_107
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java", "identifier": "IntArraysTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComplementMap2() throws Exception {\n int[] expected = new int[] {0,1,2};\n int[] input = new int[] {3,4,5};\n int size = expected.length + input.length;\n\n int[] complement = IntArrays.complementMap(input,size);\n Assert.assertArrayEquals(prin...
{ "fields": [], "file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java", "identifier": "IntArrays", "interfaces": "", "methods": [ { "class_method_signature": "IntArrays.IntArrays()", "constructor": true, "full_signature": "private IntArrays()", "identifier"...
{ "body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_31
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testAnySetBitBeyondBit() {\n assertEquals(4, bitset18.anySetBit(1));\n }", "class_method_signature": "FormatableBitSetTest.testAnySetBitBeyondBit()", "constructor": false, "full_signature": "@Test public void testAnySetBitBeyondBit()", "identifier": "testAnySetBitBeyondB...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public int anySetBit() {\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\t\tfinal int numbytes = getLengthInBytes();\n\t\tfor (int i = 0; i < numbytes; ++i) {\n\t\t\tfinal byte v = value[i];\n\t\t\tif (v == 0) continue;\n\t\t\treturn (umul8(i) +...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_89
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java", "identifier": "NonUniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testNullBeginSelectivity() throws StandardException {\n Assert.assertEquals(6000.0d,(double) impl.rangeSelectivity(null,row6000,true,false),50.0d);\n }", "class_method_signature": "NonUniqueKeyStatisticsImplTest.testNullBeginSelectivity()", "constructor": false, "full...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "frequenciesSketch", "modifier": "private",...
{ "body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_150
{ "fields": [ { "declarator": "conf = new Configuration()", "modifier": "", "original_string": "Configuration conf = new Configuration();", "type": "Configuration", "var_name": "conf" }, { "declarator": "hconf = new HBaseConfigurationSource(conf)", "modifier": "",...
{ "body": "@Test\n public void testInit() throws Exception {\n SConfiguration config = HConfiguration.getConfiguration();\n String auth = config.getAuthentication();\n assertEquals(\"NON-NATIVE\", auth);\n }", "class_method_signature": "HConfigurationTest.testInit()", "constructor": fal...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(\"splice.config\")", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(\"splice.config\");", "type": "Logger", "var_name": "LOG" }, { "declarator": "DEFAULT_CO...
{ "body": "private SConfiguration init() {\n SConfiguration config = INSTANCE;\n if (config == null) {\n synchronized (this) {\n config = INSTANCE;\n if (config == null) {\n HBaseConfigurationSource configSource = new HBaseConfigurationSource(S...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_66
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java", "identifier": "UniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testNullEndSelectivity() throws StandardException {\n Assert.assertEquals(8000.0d,(double) impl.rangeSelectivity(row2000,null,true,false),50.0d);\n }", "class_method_signature": "UniqueKeyStatisticsImplTest.testNullEndSelectivity()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_279
{ "fields": [ { "declarator": "kp=new KryoPool(1)", "modifier": "private static final", "original_string": "private static final KryoPool kp=new KryoPool(1);", "type": "KryoPool", "var_name": "kp" }, { "declarator": "pef", "modifier": "private", "original_st...
{ "body": "@Test\n public void testDoesNotWriteDataWhenGivenAnEmptyBulkWrite() throws Exception{\n byte[] table=Bytes.toBytes(\"1424\");\n TxnView txn=new ActiveWriteTxn(1l,1l,Txn.ROOT_TRANSACTION,true,Txn.IsolationLevel.SNAPSHOT_ISOLATION);\n Collection<BulkWrite> bwList=new ArrayList<>();\n\...
{ "fields": [ { "declarator": "LOG=Logger.getLogger(BulkWriteAction.class)", "modifier": "private static final", "original_string": "private static final Logger LOG=Logger.getLogger(BulkWriteAction.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "RETRY_...
{ "body": "@Override\n public WriteStats call() throws Exception{\n statusReporter.numExecutingFlushes.incrementAndGet();\n reportSize();\n long start=System.currentTimeMillis();\n try{\n Timer totalTimer=metricFactory.newTimer();\n totalTimer.startTiming();\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_146
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@Test\n public void testOffset() throws StandardException {\n StreamListener<ExecRow> sl = new StreamListener<>(-1, 60000);\n HostAndPort hostAndPort = server.getHostAndPort();\n server.register(sl);\n\n List<Tuple2<ExecRow,ExecRow>> manyRows = new ArrayList<>();\n for...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDD.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "DEFAUL...
{ "body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_70
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java", "identifier": "PrimaryKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testTotalCount() throws StandardException {\n Assert.assertEquals(10000,impl.totalCount());\n }", "class_method_signature": "PrimaryKeyStatisticsImplTest.testTotalCount()", "constructor": false, "full_signature": "@Test public void testTotalCount()", "identifier": "...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long totalCount() {\n return quantilesSketch.getN()+nullCount;\n }", "class_method_signature": "PrimaryKeyStatisticsImpl.totalCount()", "constructor": false, "full_signature": "@Override public long totalCount()", "identifier": "totalCount", "invocations": [ "g...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_280
{ "fields": [ { "declarator": "kp=new KryoPool(1)", "modifier": "private static final", "original_string": "private static final KryoPool kp=new KryoPool(1);", "type": "KryoPool", "var_name": "kp" }, { "declarator": "pef", "modifier": "private", "original_st...
{ "body": "@Test\n public void testDoesNotWriteDataWhenGivenBulkWriteWithNoRecords() throws Exception{\n byte[] table=Bytes.toBytes(\"1424\");\n TxnView txn=new ActiveWriteTxn(1l,1l,Txn.ROOT_TRANSACTION,true,Txn.IsolationLevel.SNAPSHOT_ISOLATION);\n Collection<BulkWrite> bwList=new ArrayList<>...
{ "fields": [ { "declarator": "LOG=Logger.getLogger(BulkWriteAction.class)", "modifier": "private static final", "original_string": "private static final Logger LOG=Logger.getLogger(BulkWriteAction.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "RETRY_...
{ "body": "@Override\n public WriteStats call() throws Exception{\n statusReporter.numExecutingFlushes.incrementAndGet();\n reportSize();\n long start=System.currentTimeMillis();\n try{\n Timer totalTimer=metricFactory.newTimer();\n totalTimer.startTiming();\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_111
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java", "identifier": "IntArraysTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComplementMap6() throws Exception {\n int[] expected = new int[] {0,1,2,3};\n int[] input = new int[] {4};\n int size = expected.length + input.length;\n\n int[] complement = IntArrays.complementMap(input,size);\n Assert.assertArrayEquals(printA...
{ "fields": [], "file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java", "identifier": "IntArrays", "interfaces": "", "methods": [ { "class_method_signature": "IntArrays.IntArrays()", "constructor": true, "full_signature": "private IntArrays()", "identifier"...
{ "body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_27
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testClearEmpty() {\n try {\n empty.clear(-8);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n try {\n empty.clear(-1);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n ...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public void clear(int position)\n\t{\n\t\tcheckPosition(position);\n\t\tfinal int byteIndex = udiv8(position);\n\t\tfinal byte bitIndex = umod8(position);\n\t\tvalue[byteIndex] &= ~(0x80>>bitIndex);\n\t}", "class_method_signature": "FormatableBitSet.clear(int position)", "constructor": false, "full_s...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_238
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void toTimestampISO8601Pattern2() throws Exception {\n String format = \"yyyy-MM-dd'T'HH:mm:ssz\";\n String source = \"2011-09-17T23:40:53GMT\";\n DateFormat formatter = new SimpleDateFormat(format);\n Timestamp date = new Timestamp(formatter.parse(source).getT...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Timestamp TO_TIMESTAMP(String source) throws SQLException {\n return TO_TIMESTAMP(source,null);\n }", "class_method_signature": "SpliceDateFunctions.TO_TIMESTAMP(String source)", "constructor": false, "full_signature": "public static Timestamp TO_TIMESTAMP(String source)", "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_7
{ "fields": [ { "declarator": "TYPENAME = \"VARCHAR\"", "modifier": "private static final", "original_string": "private static final String TYPENAME = \"VARCHAR\";", "type": "String", "var_name": "TYPENAME" }, { "declarator": "HEADER_LENGTH = 2", "modifier": "priv...
{ "body": "@Test\n public void testSkipFullyOnInvalidStreamCJK()\n throws IOException {\n final int charLength = 10;\n InputStream in = new ReaderToUTF8Stream(\n new LoopingAlphabetReader(charLength, CharAlphabet.cjkSubset()),\n charLength, 0, TYPENAME, new Ch...
{ "fields": [], "file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java", "identifier": "UTF8Util", "interfaces": "", "methods": [ { "class_method_signature": "UTF8Util.UTF8Util()", "constructor": true, "full_signature": "private UTF8Util()", "identifier": "U...
{ "body": "public static final long skipFully(InputStream in, long charsToSkip)\n throws EOFException, IOException {\n SkipCount skipped = internalSkip(in, charsToSkip);\n if (skipped.charsSkipped() != charsToSkip) {\n throw new EOFException(\"Reached end-of-stream prematurely at \...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_239
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void toTimestampDefaultWrongPattern() throws Exception {\n String source = \"2014-06-24 12:13:14.123\";\n DateFormat formatter = new SimpleDateFormat(\"MM/dd/yy HH:mm:ss.SSS\");\n Timestamp date = new Timestamp(formatter.parse(\"06/24/2014 12:13:14.123\").getTime());\...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Timestamp TO_TIMESTAMP(String source) throws SQLException {\n return TO_TIMESTAMP(source,null);\n }", "class_method_signature": "SpliceDateFunctions.TO_TIMESTAMP(String source)", "constructor": false, "full_signature": "public static Timestamp TO_TIMESTAMP(String source)", "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_6
{ "fields": [ { "declarator": "TYPENAME = \"VARCHAR\"", "modifier": "private static final", "original_string": "private static final String TYPENAME = \"VARCHAR\";", "type": "String", "var_name": "TYPENAME" }, { "declarator": "HEADER_LENGTH = 2", "modifier": "priv...
{ "body": "@Test\n public void testSkipFullyOnTooShortStreamCJK()\n throws IOException {\n final int charLength = 161019;\n InputStream in = new ReaderToUTF8Stream(\n new LoopingAlphabetReader(charLength, CharAlphabet.cjkSubset()),\n charLength, 0, TYPENAME, n...
{ "fields": [], "file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java", "identifier": "UTF8Util", "interfaces": "", "methods": [ { "class_method_signature": "UTF8Util.UTF8Util()", "constructor": true, "full_signature": "private UTF8Util()", "identifier": "U...
{ "body": "public static final long skipFully(InputStream in, long charsToSkip)\n throws EOFException, IOException {\n SkipCount skipped = internalSkip(in, charsToSkip);\n if (skipped.charsSkipped() != charsToSkip) {\n throw new EOFException(\"Reached end-of-stream prematurely at \...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_110
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java", "identifier": "IntArraysTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComplementMap5() throws Exception {\n int[] expected = new int[] {1,2,3,4};\n int[] input = new int[] {0};\n int size = expected.length + input.length;\n\n int[] complement = IntArrays.complementMap(input,size);\n Assert.assertArrayEquals(printA...
{ "fields": [], "file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java", "identifier": "IntArrays", "interfaces": "", "methods": [ { "class_method_signature": "IntArrays.IntArrays()", "constructor": true, "full_signature": "private IntArrays()", "identifier"...
{ "body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_26
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testSet() {\n try {\n bitset18.set(-8);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n try {\n bitset18.set(-1);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n bits...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public void set(int position)\n\t{\n\t\tcheckPosition(position);\n\t\tfinal int byteIndex = udiv8(position);\n\t\tfinal byte bitIndex = umod8(position);\n\t\tvalue[byteIndex] |= (0x80>>bitIndex);\n\t}", "class_method_signature": "FormatableBitSet.set(int position)", "constructor": false, "full_signat...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_281
{ "fields": [ { "declarator": "kp=new KryoPool(1)", "modifier": "private static final", "original_string": "private static final KryoPool kp=new KryoPool(1);", "type": "KryoPool", "var_name": "kp" }, { "declarator": "pef", "modifier": "private", "original_st...
{ "body": "@Test\n public void testCorrectlyRetriesWhenOneRegionStops() throws Exception{\n byte[] table=Bytes.toBytes(\"1424\");\n TxnView txn=new ActiveWriteTxn(1l,1l,Txn.ROOT_TRANSACTION,true,Txn.IsolationLevel.SNAPSHOT_ISOLATION);\n Collection<BulkWrite> bwList=new ArrayList<>(2);\n ...
{ "fields": [ { "declarator": "LOG=Logger.getLogger(BulkWriteAction.class)", "modifier": "private static final", "original_string": "private static final Logger LOG=Logger.getLogger(BulkWriteAction.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "RETRY_...
{ "body": "@Override\n public WriteStats call() throws Exception{\n statusReporter.numExecutingFlushes.incrementAndGet();\n reportSize();\n long start=System.currentTimeMillis();\n try{\n Timer totalTimer=metricFactory.newTimer();\n totalTimer.startTiming();\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_147
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@Test\n public void testConcurrentQueries() throws StandardException, ExecutionException, InterruptedException {\n final StreamListener<ExecRow> sl1 = new StreamListener<>();\n final StreamListener<ExecRow> sl2 = new StreamListener<>();\n final StreamListener<ExecRow> sl3 = new Stre...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDD.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "DEFAUL...
{ "body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_71
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java", "identifier": "PrimaryKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testMaxValue() throws StandardException {\n Assert.assertEquals(maxRow,impl.maxValue());\n }", "class_method_signature": "PrimaryKeyStatisticsImplTest.testMaxValue()", "constructor": false, "full_signature": "@Test public void testMaxValue()", "identifier": "testMax...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public ExecRow maxValue() {\n return quantilesSketch.getMaxValue();\n }", "class_method_signature": "PrimaryKeyStatisticsImpl.maxValue()", "constructor": false, "full_signature": "@Override public ExecRow maxValue()", "identifier": "maxValue", "invocations": [ "getMax...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...