id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
79246257_55
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void updateAlert() throws Exception {\n \t// ARRANGE\n \tlong id = LONG_ID;\n \tAlertObject alertObject = ImmutableAlertObject.builder().id(id).build();\n \tResponse<AlertObject>response = Response.success(alertObject);\n \t\n \t// ACT\n \t@SuppressWarnings(\"unchecke...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public AlertObject updateAlert(AlertObject alert) throws UnauthorizedException {\n Preconditions.checkNotNull(alert, \"Alert should not be null\");\n Preconditions.checkNotNull(alert.id(), \"Alert id should not be null\");\n return executeAndRetrieveBody(svc().updateAlert(authorization...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_96
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test(expectedExceptions = NullPointerException.class)\n public void deleteSubjectFailNPE() throws Exception {\n // ACT\n refocus.deleteSubject(null);\n }", "class_method_signature": "RefocusClientTest.deleteSubjectFailNPE()", "constructor": false, "full_signature": "@Test(expecte...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject deleteSubject(String subjectKey) throws UnauthorizedException {\n Preconditions.checkNotNull(subjectKey, \"Subject key (ID or path) should not be null\");\n return executeAndRetrieveBody(svc().deleteSubject(authorizationHeader(), subjectKey), null);\n }", "class_method_sig...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_79
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void retrieveSubjects() throws Exception {\n // ARRANGE\n List<Subject> responseData = Collections.singletonList(subject);\n\n Response<List<Subject>> response = Response.success(responseData);\n\n @SuppressWarnings(\"unchecked\")\n Call<List<Subject>> r...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public List<Subject> getSubjects(List<String> fields) throws UnauthorizedException {\n return executeAndRetrieveBody(svc().getSubjects(authorizationHeader(), fields), emptyList());\n }", "class_method_signature": "RefocusClient.getSubjects(List<String> fields)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_38
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testImmutableOrEmptySet() throws Exception {\n // ARRANGE\n Set<String> nullInput = null;\n Set<String> input = Collections.singleton(\"key\");\n\n // ACT\n Set<String> emptyOutput = CollectionUtils.immutableOrEmptySet(nullInput);\n Set<Strin...
{ "fields": [], "file": "plugin-api/src/main/java/com/salesforce/pyplyn/util/CollectionUtils.java", "identifier": "CollectionUtils", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtils.CollectionUtils()", "constructor": true, "full_signature": "private Collection...
{ "body": "public static <T> Set<T> immutableOrEmptySet(Set<T> input) {\n return Optional.ofNullable(input).map(HashSet::new).map(Collections::unmodifiableSet).orElse(Collections.emptySet());\n }", "class_method_signature": "CollectionUtils.immutableOrEmptySet(Set<T> input)", "constructor": false, "fu...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_80
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void retrieveSubjectsFailure() throws Exception {\n // ARRANGE\n ResponseBody errorBody = ResponseBody.create(MediaType.parse(\"\"), \"FAIL\");\n Response<List<Subject>> response = Response.error(400, errorBody);\n\n @SuppressWarnings(\"unchecked\")\n Ca...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public List<Subject> getSubjects(List<String> fields) throws UnauthorizedException {\n return executeAndRetrieveBody(svc().getSubjects(authorizationHeader(), fields), emptyList());\n }", "class_method_signature": "RefocusClient.getSubjects(List<String> fields)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_17
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/FormatUtilsTest.java", "identifier": "FormatUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseNonGMTDateTime() throws Exception {\n // ARRANGE\n String date = \"2016-12-31T12:13:14-07:00\";\n\n // ACT\n ZonedDateTime dateTime = FormatUtils.parseUTCTime(date);\n int year = dateTime.getYear();\n int dayOfMonth = dateTime.getDay...
{ "fields": [ { "declarator": "DEFAULT_VALUE_MESSAGE_TEMPLATE = \"Default value %s=%s\"", "modifier": "private static", "original_string": "private static String DEFAULT_VALUE_MESSAGE_TEMPLATE = \"Default value %s=%s\";", "type": "String", "var_name": "DEFAULT_VALUE_MESSAGE_TEMPLATE"...
{ "body": "public static ZonedDateTime parseUTCTime(String value) {\n try {\n // parses ms unix time and returns at UTC offset\n Instant instant = Instant.ofEpochMilli(Long.parseLong(value));\n return instant.atZone(ZoneOffset.UTC);\n\n } catch (NumberFormatException e) ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_40
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testImmutableSetDoesNotChangeOnSourceChange() throws Exception {\n // ARRANGE\n Set<String> input = new HashSet<>(Collections.singleton(\"key\"));\n\n // ACT\n Set<String> output = CollectionUtils.immutableSetOrNull(input);\n input.add(\"new_key\");...
{ "fields": [], "file": "plugin-api/src/main/java/com/salesforce/pyplyn/util/CollectionUtils.java", "identifier": "CollectionUtils", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtils.CollectionUtils()", "constructor": true, "full_signature": "private Collection...
{ "body": "public static <T> Set<T> immutableSetOrNull(Set<T> input) {\n return Optional.ofNullable(input).map(HashSet::new).map(Collections::unmodifiableSet).orElse(null);\n }", "class_method_signature": "CollectionUtils.immutableSetOrNull(Set<T> input)", "constructor": false, "full_signature": "publ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_4
{ "fields": [ { "declarator": "INVALID_CONFIGURATIONS = \"/configurations/invalid/\"", "modifier": "public static final", "original_string": "public static final String INVALID_CONFIGURATIONS = \"/configurations/invalid/\";", "type": "String", "var_name": "INVALID_CONFIGURATIONS" ...
{ "body": "@Test\n public void testNullConfigurationsDir() throws Exception {\n // ARRANGE\n ObjectMapper mapper = fixSerializationHelper(fixtures);\n ConfigurationIntake configurationIntake = new ConfigurationIntake(mapper);\n\n // ACT\n List<String> configurations = configurati...
{ "fields": [ { "declarator": "CONFIGURATIONS_READ_ERROR = \"Errors encountered reading configurations: \"", "modifier": "public static final", "original_string": "public static final String CONFIGURATIONS_READ_ERROR = \"Errors encountered reading configurations: \";", "type": "String", ...
{ "body": "List<String> getAllConfigurationsFromDisk(String dir) throws IOException {\n // nothing to do if configuration not passed\n if (isNull(dir)) {\n logger.warn(\"Null configuration dir passed, returning empty configuration list\");\n return Collections.emptyList();\n ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_56
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void loadAlert() throws Exception {\n // ARRANGE\n\t\tAlertObject alertObject = ImmutableAlertObject.builder().id(LONG_ID).build();\n\t\tResponse<AlertObject> response = Response.success(alertObject);\n\n // ACT\n @SuppressWarnings(\"unchecked\")\n Call<AlertOb...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public AlertObject loadAlert(long id) throws UnauthorizedException {\n return executeAndRetrieveBody(svc().getAlert(authorizationHeader(), id), null);\n }", "class_method_signature": "ArgusClient.loadAlert(long id)", "constructor": false, "full_signature": "public AlertObject loadAlert(long...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_95
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void deleteSubject() throws Exception {\n // ARRANGE\n Response<Subject> response = Response.success(subject);\n\n @SuppressWarnings(\"unchecked\")\n Call<Subject> responseCall = mock(Call.class);\n doReturn(response).when(responseCall).execute();\n ...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject deleteSubject(String subjectKey) throws UnauthorizedException {\n Preconditions.checkNotNull(subjectKey, \"Subject key (ID or path) should not be null\");\n return executeAndRetrieveBody(svc().deleteSubject(authorizationHeader(), subjectKey), null);\n }", "class_method_sig...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_83
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void upsertSamplesBulk() throws Exception {\n \t// ARRANGE\n Response<List<Sample>> response = Response.success(Collections.singletonList(sample));\n\n @SuppressWarnings(\"unchecked\")\n Call<List<Sample>> responseCall = mock(Call.class);\n doReturn(response...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public boolean upsertSamplesBulk(List<Sample> samples) throws UnauthorizedException {\n Preconditions.checkNotNull(samples, \"Samples should not be null\");\n return nonNull(executeAndRetrieveBody(svc().upsertSamplesBulk(authorizationHeader(), samples), null));\n }", "class_method_signat...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_8
{ "fields": [ { "declarator": "fixtures", "modifier": "", "original_string": "AppBootstrapFixtures fixtures;", "type": "AppBootstrapFixtures", "var_name": "fixtures" }, { "declarator": "executor", "modifier": "", "original_string": "ExecutorService executor;...
{ "body": "@Test(timeOut = 5_000L)\n public void testArgusNotQueriedIfShuttingDown() throws Exception {\n try {\n // ARRANGE\n fixtures.enableLatches()\n .oneArgusToRefocusConfigurationWithRepeatInterval(100)\n .callRealArgusExtractProcessor()\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ShutdownHook.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ShutdownHook.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "public void shutdown() {\n // shutdown all executors\n executors.forEach(ExecutorService::shutdown);\n\n // run shutdown ops\n operations.forEach(Runnable::run);\n\n // set the shutdown flag and latch to allow processes to stop gracefully\n isShutdown.set(true);\n ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_76
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void deleteDashboard() throws Exception {\n \t// ARRANGE\n \tlong dashboardId = LONG_ID;\n \tDashboardObject dashboardObj = ImmutableDashboardObject.builder().name(NAME).ownerName(OWNER_NAME).id(dashboardId).build();\n \tResponse<DashboardObject> response = Response.success(da...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public void deleteDashboard(long dashboardId) throws UnauthorizedException {\n Preconditions.checkNotNull(dashboardId, \"Dashboard id should not be null\");\n executeAndRetrieveBody(svc().deleteDashboard(authorizationHeader(), dashboardId), null);\n }", "class_method_signature": "ArgusCl...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_99
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test(expectedExceptions = NullPointerException.class)\n public void patchSubjectFailNPE() throws Exception {\n // ACT\n refocus.patchSubject(null);\n }", "class_method_signature": "RefocusClientTest.patchSubjectFailNPE()", "constructor": false, "full_signature": "@Test(expectedEx...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject patchSubject(Subject subject) throws UnauthorizedException {\n Preconditions.checkNotNull(subject, \"Subject should not be null\");\n String subjectKey = Optional.ofNullable(subject.id()).orElse(subject.name());\n return executeAndRetrieveBody(svc().patchSubject(authoriz...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_21
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/FormatUtilsTest.java", "identifier": "FormatUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFormatMillis() throws Exception {\n // ARRANGE\n Double input = 500.00d;\n\n // ACT\n String output = FormatUtils.formatMillisOrSeconds(input);\n\n // ASSERT\n assertThat(output, equalTo(\"500ms\"));\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "DEFAULT_VALUE_MESSAGE_TEMPLATE = \"Default value %s=%s\"", "modifier": "private static", "original_string": "private static String DEFAULT_VALUE_MESSAGE_TEMPLATE = \"Default value %s=%s\";", "type": "String", "var_name": "DEFAULT_VALUE_MESSAGE_TEMPLATE"...
{ "body": "public static String formatMillisOrSeconds(Number value) {\n // if value represents millis\n if (value.doubleValue() < 1000) {\n return decimalFormatSeconds.get().format(value) + \"ms\";\n\n // otherwise divide by 1000 and return seconds\n } else {\n return...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_37
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testImmutableSortedMapOrNull() throws Exception {\n // ARRANGE\n SortedMap<String, String> nullInput = null;\n SortedMap<String, String> input = new TreeMap<>(Collections.singletonMap(\"key\", \"val\"));\n\n // ACT\n SortedMap<String, String> nullOu...
{ "fields": [], "file": "plugin-api/src/main/java/com/salesforce/pyplyn/util/CollectionUtils.java", "identifier": "CollectionUtils", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtils.CollectionUtils()", "constructor": true, "full_signature": "private Collection...
{ "body": "public static <K, V> SortedMap<K, V> immutableSortedMapOrNull(SortedMap<K, V> input) {\n return Optional.ofNullable(input).map(TreeMap::new).map(Collections::unmodifiableSortedMap).orElse(null);\n }", "class_method_signature": "CollectionUtils.immutableSortedMapOrNull(SortedMap<K, V> input)", ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_60
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void deleteAlert() throws Exception {\n \t// ARRANGE\n \tlong alertId = LONG_ID;\n \tResponse<Void>response = Response.success((new Void[1])[0]);\n \t\n \t// ACT\n \t@SuppressWarnings(\"unchecked\")\n\t\tCall<Void>responseCall = mock(Call.class);\n \tdoReturn(response...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public void deleteAlert(long alertId) throws UnauthorizedException {\n Preconditions.checkNotNull(alertId, \"Alert id should not be null\");\n executeAndRetrieveBody(svc().deleteAlert(authorizationHeader(), alertId), null);\n }", "class_method_signature": "ArgusClient.deleteAlert(long al...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_61
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void loadTriggersForAlert() throws Exception {\n \t// ARRANGE\n \tString triggerName = \"triggerName\";\n \tlong id = LONG_ID;\n \tTriggerObject triggerObj = ImmutableTriggerObject.builder().name(triggerName).id(id).build();\n \tResponse<List<TriggerObject>> response = Resp...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public List<TriggerObject> loadTriggersForAlert(long alertId) throws UnauthorizedException {\n Preconditions.checkNotNull(alertId, \"Alert id should not be null\");\n return executeAndRetrieveBody(svc().getTriggersForAlert(authorizationHeader(), alertId), emptyList());\n }", "class_metho...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_36
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testImmutableSortedOrEmptyMap() throws Exception {\n // ARRANGE\n SortedMap<String, String> nullInput = null;\n SortedMap<String, String> input = new TreeMap<>(Collections.singletonMap(\"key\", \"val\"));\n\n // ACT\n SortedMap<String, String> empty...
{ "fields": [], "file": "plugin-api/src/main/java/com/salesforce/pyplyn/util/CollectionUtils.java", "identifier": "CollectionUtils", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtils.CollectionUtils()", "constructor": true, "full_signature": "private Collection...
{ "body": "public static <K, V> SortedMap<K, V> immutableSortedOrEmptyMap(SortedMap<K, V> input) {\n return Optional.ofNullable(input).map(TreeMap::new).map(Collections::unmodifiableSortedMap).orElse(Collections.emptySortedMap());\n }", "class_method_signature": "CollectionUtils.immutableSortedOrEmptyMap(...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_20
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/FormatUtilsTest.java", "identifier": "FormatUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFormatNumber() throws Exception {\n // ACT\n String decimalString = FormatUtils.formatNumber(new Double(\"1.234599\"));\n String integerString = FormatUtils.formatNumber(1);\n\n // ASSERT\n assertThat(decimalString, equalTo(\"1.2346\"));\n ...
{ "fields": [ { "declarator": "DEFAULT_VALUE_MESSAGE_TEMPLATE = \"Default value %s=%s\"", "modifier": "private static", "original_string": "private static String DEFAULT_VALUE_MESSAGE_TEMPLATE = \"Default value %s=%s\";", "type": "String", "var_name": "DEFAULT_VALUE_MESSAGE_TEMPLATE"...
{ "body": "public static String formatNumber(Number value) {\n return decimalFormatDefault.get().format(value);\n }", "class_method_signature": "FormatUtils.formatNumber(Number value)", "constructor": false, "full_signature": "public static String formatNumber(Number value)", "identifier": "formatNu...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_77
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void getDashboardById() throws Exception {\n \t// ARRANGE\n \tDashboardObject dashboardObj = ImmutableDashboardObject.builder().id(LONG_ID).build();\n \tResponse<DashboardObject> response = Response.success(dashboardObj);\n \t\n \t// ACT\n \t@SuppressWarnings(\"unchecked...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public DashboardObject getDashboardById(long dashboardId) throws UnauthorizedException {\n Preconditions.checkNotNull(dashboardId, \"Dashboard id should not be null\");\n return executeAndRetrieveBody(svc().getDashboardById(authorizationHeader(), dashboardId), null);\n }", "class_method_...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_98
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void patchSubjectFail() throws Exception {\n // ARRANGE\n ResponseBody errorBody = ResponseBody.create(MediaType.parse(\"\"), \"FAIL\");\n Response<Subject> response = Response.error(400, errorBody);\n\n @SuppressWarnings(\"unchecked\")\n Call<Subject> r...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject patchSubject(Subject subject) throws UnauthorizedException {\n Preconditions.checkNotNull(subject, \"Subject should not be null\");\n String subjectKey = Optional.ofNullable(subject.id()).orElse(subject.name());\n return executeAndRetrieveBody(svc().patchSubject(authoriz...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_9
{ "fields": [ { "declarator": "fixtures", "modifier": "", "original_string": "AppBootstrapFixtures fixtures;", "type": "AppBootstrapFixtures", "var_name": "fixtures" }, { "declarator": "executor", "modifier": "", "original_string": "ExecutorService executor;...
{ "body": "@Test(timeOut = 5_000L)\n public void testRefocusNotQueriedIfShuttingDown() throws Exception {\n try {\n // ARRANGE\n // bootstrap\n fixtures.enableLatches()\n .oneRefocusToRefocusConfigurationWithRepeatInterval(100)\n .callRe...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ShutdownHook.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ShutdownHook.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "public void shutdown() {\n // shutdown all executors\n executors.forEach(ExecutorService::shutdown);\n\n // run shutdown ops\n operations.forEach(Runnable::run);\n\n // set the shutdown flag and latch to allow processes to stop gracefully\n isShutdown.set(true);\n ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_82
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void getSamples() throws Exception {\n // ARRANGE\n Response<List<Sample>> response = Response.success(Collections.singletonList(sample));\n\n @SuppressWarnings(\"unchecked\")\n Call<ResponseBody> responseCall = mock(Call.class);\n doReturn(response).whe...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public List<Sample> getSamples(String name) throws UnauthorizedException {\n Preconditions.checkNotNull(name, \"Name should not be null\");\n return executeAndRetrieveBody(svc().getSample(authorizationHeader(), name), emptyList());\n }", "class_method_signature": "RefocusClient.getSample...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_94
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test(expectedExceptions = NullPointerException.class)\n public void putSubjectFailNPE() throws Exception {\n // ACT\n refocus.putSubject(null);\n }", "class_method_signature": "RefocusClientTest.putSubjectFailNPE()", "constructor": false, "full_signature": "@Test(expectedExceptio...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject putSubject(Subject subject) throws UnauthorizedException {\n Preconditions.checkNotNull(subject, \"Subject should not be null\");\n String subjectKey = Optional.ofNullable(subject.id()).orElse(subject.name());\n return executeAndRetrieveBody(svc().putSubject(authorizatio...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_5
{ "fields": [ { "declarator": "INVALID_CONFIGURATIONS = \"/configurations/invalid/\"", "modifier": "public static final", "original_string": "public static final String INVALID_CONFIGURATIONS = \"/configurations/invalid/\";", "type": "String", "var_name": "INVALID_CONFIGURATIONS" ...
{ "body": "@Test(expectedExceptions = IOException.class)\n public void testNonExistentConfigurationsDir() throws Exception {\n // ARRANGE\n ObjectMapper mapper = fixSerializationHelper(fixtures);\n ConfigurationIntake configurationIntake = new ConfigurationIntake(mapper);\n\n // ACT/ASS...
{ "fields": [ { "declarator": "CONFIGURATIONS_READ_ERROR = \"Errors encountered reading configurations: \"", "modifier": "public static final", "original_string": "public static final String CONFIGURATIONS_READ_ERROR = \"Errors encountered reading configurations: \";", "type": "String", ...
{ "body": "List<String> getAllConfigurationsFromDisk(String dir) throws IOException {\n // nothing to do if configuration not passed\n if (isNull(dir)) {\n logger.warn(\"Null configuration dir passed, returning empty configuration list\");\n return Collections.emptyList();\n ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_57
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n\tpublic void loadAllAlerts() throws Exception {\n\t\t// ARRANGE\n\t\tAlertObject alert = ImmutableAlertObject.builder().ownerName(OWNER_NAME).build();\n\t\tResponse<List<AlertObject>> response = Response.success(Collections.singletonList(alert));\n\n\t\t// ACT\n\t\t@SuppressWarnings(\"unchecked\")\...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public List<AlertObject> loadAllAlerts() throws UnauthorizedException {\n return executeAndRetrieveBody(svc().getAllAlerts(authorizationHeader()), emptyList());\n }", "class_method_signature": "ArgusClient.loadAllAlerts()", "constructor": false, "full_signature": "public List<AlertObject> l...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_41
{ "fields": [ { "declarator": "connector", "modifier": "", "original_string": "Connector connector;", "type": "Connector", "var_name": "connector" }, { "declarator": "client", "modifier": "", "original_string": "AbstractRemoteClientImpl client;", "type...
{ "body": "@Test\n public void testExecuteAndRetrieveBodySuccess() throws Exception {\n // ARRANGE\n Response<String> failure = createSuccessfulResponse();\n doReturn(failure).when(call).execute();\n\n // ACT\n String response = client.executeAndRetrieveBody(call, \"failed\");\n\...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AbstractRemoteClient.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AbstractRemoteClient.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "protected <T> T executeAndRetrieveBody(Call<T> call, T defaultFailResponse) throws UnauthorizedException {\n return Optional.ofNullable(executeCallInternalRetryIfUnauthorized(call))\n .map(Response::body)\n .orElse(defaultFailResponse);\n }", "class_method_signatur...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_16
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/FormatUtilsTest.java", "identifier": "FormatUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseUTCDateTime() throws Exception {\n // ARRANGE\n String date = \"2016-12-31T12:13:14Z\";\n\n // ACT\n ZonedDateTime dateTime = FormatUtils.parseUTCTime(date);\n int year = dateTime.getYear();\n int dayOfMonth = dateTime.getDayOfMonth(...
{ "fields": [ { "declarator": "DEFAULT_VALUE_MESSAGE_TEMPLATE = \"Default value %s=%s\"", "modifier": "private static", "original_string": "private static String DEFAULT_VALUE_MESSAGE_TEMPLATE = \"Default value %s=%s\";", "type": "String", "var_name": "DEFAULT_VALUE_MESSAGE_TEMPLATE"...
{ "body": "public static ZonedDateTime parseUTCTime(String value) {\n try {\n // parses ms unix time and returns at UTC offset\n Instant instant = Instant.ofEpochMilli(Long.parseLong(value));\n return instant.atZone(ZoneOffset.UTC);\n\n } catch (NumberFormatException e) ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_70
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void attachTriggerToNotification() throws Exception {\n \t// ARRANGE\n\t\tTriggerObject triggerObj = ImmutableTriggerObject.builder().alertId(LONG_ID).id(LONG_ID).notificationIds(LIST_OF_LONG_ID).build();\n \tResponse<TriggerObject> response = Response.success(triggerObj);\n \t\n...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public TriggerObject attachTriggerToNotification(long alertId, long notificationId, long triggerId) throws UnauthorizedException {\n Preconditions.checkNotNull(alertId, \"Alert id should not be null\");\n Preconditions.checkNotNull(notificationId, \"Notification id should not be null\");\n ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_27
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNullableArrayCopy() throws Exception {\n // ARRANGE\n Integer[] input = {1, 2};\n Integer[] nullInput = null;\n\n // ACT\n Integer[] output = CollectionUtils.nullableArrayCopy(input);\n Integer[] nullOutput = CollectionUtils.nullableArray...
{ "fields": [], "file": "plugin-api/src/main/java/com/salesforce/pyplyn/util/CollectionUtils.java", "identifier": "CollectionUtils", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtils.CollectionUtils()", "constructor": true, "full_signature": "private Collection...
{ "body": "public static <T> T[] nullableArrayCopy(T[] input) {\n return Optional.ofNullable(input).map(s -> Arrays.copyOf(s, s.length)).orElse(null);\n }", "class_method_signature": "CollectionUtils.nullableArrayCopy(T[] input)", "constructor": false, "full_signature": "public static T[] nullableArra...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_31
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testImmutableOrEmptyList() throws Exception {\n // ARRANGE\n List<String> nullInput = null;\n List<String> input = Arrays.asList(\"name1\", \"name2\");\n\n // ACT\n List<String> emptyOutput = CollectionUtils.immutableOrEmptyList(nullInput);\n ...
{ "fields": [], "file": "plugin-api/src/main/java/com/salesforce/pyplyn/util/CollectionUtils.java", "identifier": "CollectionUtils", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtils.CollectionUtils()", "constructor": true, "full_signature": "private Collection...
{ "body": "public static <T> List<T> immutableOrEmptyList(List<T> input) {\n return Optional.ofNullable(input).map(ArrayList::new).map(Collections::unmodifiableList).orElse(Collections.emptyList());\n }", "class_method_signature": "CollectionUtils.immutableOrEmptyList(List<T> input)", "constructor": fal...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_66
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void getNotificationsForAlert() throws Exception {\n \t// ARRANGE\n \tlong alertId = LONG_ID;\n \tNotificationObject notificationObj = ImmutableNotificationObject.builder().alertId(alertId).build();\n \tResponse<List<NotificationObject>> response = Response.success(Collections...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public List<NotificationObject> getNotificationsForAlert(long alertId) throws UnauthorizedException {\n Preconditions.checkNotNull(alertId, \"Alert id should not be null\");\n return executeAndRetrieveBody(svc().getNotificationsForAlert(authorizationHeader(), alertId), emptyList());\n }", ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_89
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void postSubject() throws Exception {\n // ARRANGE\n Response<Subject> response = Response.success(subject);\n\n @SuppressWarnings(\"unchecked\")\n Call<Subject> responseCall = mock(Call.class);\n doReturn(response).when(responseCall).execute();\n ...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject postSubject(Subject subject) throws UnauthorizedException {\n Preconditions.checkNotNull(subject, \"Subject should not be null\");\n return executeAndRetrieveBody(svc().postSubject(authorizationHeader(), subject), null);\n }", "class_method_signature": "RefocusClient.postS...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_11
{ "fields": [ { "declarator": "fixtures", "modifier": "", "original_string": "AppBootstrapFixtures fixtures;", "type": "AppBootstrapFixtures", "var_name": "fixtures" } ], "file": "duct/src/test/java/com/salesforce/pyplyn/duct/connector/SimpleConnectorProviderTest.java", "id...
{ "body": "@Test\n public void testProviderLoadsOneConnector() throws Exception {\n // ARRANGE\n fixtures.appConfigMocks()\n .connectorsPath(ConnectorTest.ONE_CONNECTOR);\n Injector injector = fixtures.initializeFixtures().injector();\n SimpleConnectorProvider provider = ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(SimpleConnectorProvider.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(SimpleConnectorProvider.class);", "type": "Logger", "var_name": "logge...
{ "body": "@Override\n public List<EndpointConnector> get() {\n return connectors;\n }", "class_method_signature": "SimpleConnectorProvider.get()", "constructor": false, "full_signature": "@Override public List<EndpointConnector> get()", "identifier": "get", "invocations": [], "modifiers": "@...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_46
{ "fields": [ { "declarator": "connector", "modifier": "", "original_string": "Connector connector;", "type": "Connector", "var_name": "connector" }, { "declarator": "client", "modifier": "", "original_string": "AbstractRemoteClientImpl client;", "type...
{ "body": "@Test\n public void testExecuteAndRetrieveHeaders() throws Exception {\n // ARRANGE\n Response<String> failure = createSuccessfulResponseWithHeaders();\n doReturn(failure).when(call).execute();\n\n // ACT\n Headers headers = client.executeAndRetrieveHeaders(call);\n\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AbstractRemoteClient.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AbstractRemoteClient.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "protected <T> Headers executeAndRetrieveHeaders(Call<T> call) throws UnauthorizedException {\n return Optional.ofNullable(executeCallInternal(call))\n .map(Response::headers)\n .orElse(null);\n }", "class_method_signature": "AbstractRemoteClient.executeAndRetrieveH...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_50
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/cache/CacheEntryTest.java", "identifier": "CacheEntryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExpired() throws Exception {\n // ARRANGE\n CacheEntry<Double> entry = new CacheEntry<>(1.0d, 1);\n\n // ACT\n await().atLeastMs(2);\n boolean isExpired = entry.expired();\n\n // ASSERT\n assertThat(\"Cache entry should have expire...
{ "fields": [ { "declarator": "value", "modifier": "private final", "original_string": "private final T value;", "type": "T", "var_name": "value" }, { "declarator": "expiresAt", "modifier": "private final", "original_string": "private final long expiresAt;",...
{ "body": "public boolean expired() {\n return System.currentTimeMillis() >= expiresAt;\n }", "class_method_signature": "CacheEntry.expired()", "constructor": false, "full_signature": "public boolean expired()", "identifier": "expired", "invocations": [ "currentTimeMillis" ], "modifiers": ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_2
{ "fields": [], "file": "duct/src/test/java/com/salesforce/pyplyn/duct/appconfig/AppConfigFileLoaderTest.java", "identifier": "AppConfigFileLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = ConfigParseException.class)\n public void testFailWithoutCorrectParam() throws Exception {\n // ARRANGE\n String[] args = new String[]{\"--invalid\"};\n\n // ACT/ASSERT\n AppConfigFileLoader.loadFromCLI(\"programName\", args);\n }", "class_meth...
{ "fields": [], "file": "duct/src/main/java/com/salesforce/pyplyn/duct/appconfig/AppConfigFileLoader.java", "identifier": "AppConfigFileLoader", "interfaces": "", "methods": [ { "class_method_signature": "AppConfigFileLoader.AppConfigFileLoader()", "constructor": true, "full_signature": ...
{ "body": "public static String loadFromCLI(String programName, String... args) throws ConfigParseException {\n ArgumentParser parser = ArgumentParsers.newArgumentParser(\"java -jar \" + programName + \"-[VERSION].jar\").defaultHelp(true);\n parser.addArgument(\"--config\").metavar(\"/path/to/app-config...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_93
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void putSubjectFail() throws Exception {\n ResponseBody errorBody = ResponseBody.create(MediaType.parse(\"\"), \"FAIL\");\n Response<Subject> response = Response.error(400, errorBody);\n\n @SuppressWarnings(\"unchecked\")\n Call<Subject> responseCall = mock(Cal...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject putSubject(Subject subject) throws UnauthorizedException {\n Preconditions.checkNotNull(subject, \"Subject should not be null\");\n String subjectKey = Optional.ofNullable(subject.id()).orElse(subject.name());\n return executeAndRetrieveBody(svc().putSubject(authorizatio...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_102
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void postAspect() throws Exception {\n \t// ARRANGE\n \tAspect aspect = ImmutableAspect.builder().name(\"name\").build();\n \tResponse<Aspect>response = Response.success(aspect);\n \t\n \t// ACT\n \t@SuppressWarnings(\"unchecked\")\n\t\tCall<Aspect>responseCall = mock(Ca...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Aspect postAspect(Aspect aspect) throws UnauthorizedException {\n Preconditions.checkNotNull(aspect, \"Aspect should not be null\");\n return executeAndRetrieveBody(svc().postAspect(authorizationHeader(), aspect), null);\n }", "class_method_signature": "RefocusClient.postAspect(As...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_85
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void getSubjects() throws Exception {\n \t// ARRANGE\n Response<List<Subject>> response = Response.success(Collections.singletonList(subject));\n\n @SuppressWarnings(\"unchecked\")\n Call<List<Subject>> responseCall = mock(Call.class);\n doReturn(response).w...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public List<Subject> getSubjects(List<String> fields) throws UnauthorizedException {\n return executeAndRetrieveBody(svc().getSubjects(authorizationHeader(), fields), emptyList());\n }", "class_method_signature": "RefocusClient.getSubjects(List<String> fields)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_84
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void deleteSample() throws Exception {\n \t// ARRANGE\n Response<Sample> response = Response.success(sample);\n\n @SuppressWarnings(\"unchecked\")\n Call<Sample> responseCall = mock(Call.class);\n doReturn(response).when(responseCall).execute();\n doR...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Sample deleteSample(String key) throws UnauthorizedException {\n Preconditions.checkNotNull(key, \"Key should not be null\");\n return executeAndRetrieveBody(svc().deleteSample(authorizationHeader(), key), null);\n }", "class_method_signature": "RefocusClient.deleteSample(String k...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_103
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void patchAspect() throws Exception {\n \tAspect aspect = ImmutableAspect.builder().name(\"name\").build();\n \tResponse<Aspect>response = Response.success(aspect);\n \t\n \t// ACT\n \t@SuppressWarnings(\"unchecked\")\n\t\tCall<Aspect>responseCall = mock(Call.class);\n \...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Aspect patchAspect(Aspect aspect) throws UnauthorizedException {\n Preconditions.checkNotNull(aspect, \"Aspect should not be null\");\n return executeAndRetrieveBody(svc().patchAspect(authorizationHeader(), aspect.name(), aspect), null);\n }", "class_method_signature": "RefocusCli...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_92
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void putSubject() throws Exception {\n // ARRANGE\n Response<Subject> response = Response.success(subject);\n\n @SuppressWarnings(\"unchecked\")\n Call<Subject> responseCall = mock(Call.class);\n doReturn(response).when(responseCall).execute();\n ...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject putSubject(Subject subject) throws UnauthorizedException {\n Preconditions.checkNotNull(subject, \"Subject should not be null\");\n String subjectKey = Optional.ofNullable(subject.id()).orElse(subject.name());\n return executeAndRetrieveBody(svc().putSubject(authorizatio...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_51
{ "fields": [ { "declarator": "CACHE_KEY = \"cacheKey\"", "modifier": "static final", "original_string": "static final String CACHE_KEY = \"cacheKey\";", "type": "String", "var_name": "CACHE_KEY" }, { "declarator": "expected", "modifier": "@Mock", "original_...
{ "body": "@Test\n public void testCacheKeyNotFound() throws Exception {\n // ACT\n Cacheable actual = cache.isCached(\"invalidKey\");\n\n // ASSERT\n assertThat(\"There should be no object cached for that key\", actual, is(nullValue()));\n }", "class_method_signature": "Concurrent...
{ "fields": [ { "declarator": "cache = new ConcurrentHashMap<>()", "modifier": "private final", "original_string": "private final Map<String, SoftReference<CacheEntry<T>>> cache = new ConcurrentHashMap<>();", "type": "Map<String, SoftReference<CacheEntry<T>>>", "var_name": "cache" ...
{ "body": "@Override\n public T isCached(final String key) {\n // retrieve reference from cache and then attempt to retrieve the entry\n final SoftReference<CacheEntry<T>> entryRef = cache.get(key);\n\n // stop here if cache entry does not exist\n if (isNull(entryRef)) {\n re...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_3
{ "fields": [ { "declarator": "fixtures", "modifier": "", "original_string": "AppBootstrapFixtures fixtures;", "type": "AppBootstrapFixtures", "var_name": "fixtures" } ], "file": "duct/src/test/java/com/salesforce/pyplyn/duct/systemstatus/SystemStatusRunnableTest.java", "id...
{ "body": "@Test\n public void testRun() throws Exception {\n // ARRANGE\n // app-config params\n fixtures.appConfigMocks()\n .enableAlerts()\n .runOnce()\n\n // we don't want the LoadFailure meter to fail in this test\n .checkMeter(\...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(SystemStatusRunnable.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(SystemStatusRunnable.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public void run() {\n final List<StatusMessage> messages = new ArrayList<>();\n\n // iterate through all registered meters\n for (Map.Entry<String, Meter> entry : registry.getMeters().entrySet()) {\n String meterName = entry.getKey();\n double meter...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_47
{ "fields": [ { "declarator": "connector", "modifier": "", "original_string": "Connector connector;", "type": "Connector", "var_name": "connector" }, { "declarator": "client", "modifier": "", "original_string": "AbstractRemoteClientImpl client;", "type...
{ "body": "@Test\n public void testClientWithProxy() throws Exception {\n // ARRANGE\n connector = ImmutableConnector.builder().from(connector)\n .proxyHost(\"127.0.0.1\")\n .proxyPort(8901)\n .build();\n\n // ACT\n client = new AbstractRemot...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AbstractRemoteClient.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AbstractRemoteClient.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "public S svc() {\n return svc;\n }", "class_method_signature": "AbstractRemoteClient.svc()", "constructor": false, "full_signature": "public S svc()", "identifier": "svc", "invocations": [], "modifiers": "public", "parameters": "()", "return": "S", "signature": "S svc()", "tes...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_10
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private final static", "original_string": "private final static ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" } ], "file": "duct/src/test/java/com/salesforce/p...
{ "body": "@Test(timeOut = 5000L)\n public void testAppRuns() throws Exception {\n // ARRANGE\n Path configurations = Files.createTempDirectory(\"test-configurations\");\n Path connectors = createConnector();\n Path appConfig = createAppConfig(configurations, connectors);\n\n // ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(DuctMain.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(DuctMain.class);", "type": "Logger", "var_name": "logger" }, { "declara...
{ "body": "public static void main(String... args) {\n execute(AppBootstrap.class, args);\n }", "class_method_signature": "DuctMain.main(String... args)", "constructor": false, "full_signature": "public static void main(String... args)", "identifier": "main", "invocations": [ "execute" ], ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_67
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void createNotification() throws Exception {\n \t// ARRANGE\n \tNotificationObject notificationObj = ImmutableNotificationObject.builder().alertId(LONG_ID).name(NAME).build();\n \tResponse<List<NotificationObject>> response = Response.success(Collections.singletonList(notificatio...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public List<NotificationObject> createNotification(long alertId, NotificationObject notification) throws UnauthorizedException {\n Preconditions.checkNotNull(alertId, \"Alert id should not be null\");\n Preconditions.checkNotNull(notification, \"Notification should not be null\");\n re...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_88
{ "fields": [ { "declarator": "AUTHORIZATION_HEADER = \"Authorization: fake\"", "modifier": "private static final", "original_string": "private static final String AUTHORIZATION_HEADER = \"Authorization: fake\";", "type": "String", "var_name": "AUTHORIZATION_HEADER" }, { ...
{ "body": "@Test\n public void getSubjectFailResponse() throws Exception {\n // ARRANGE\n ResponseBody errorBody = ResponseBody.create(MediaType.parse(\"\"), \"FAIL\");\n Response<Subject> response = Response.error(400, errorBody);\n\n @SuppressWarnings(\"unchecked\")\n Call<Subj...
{ "fields": [ { "declarator": "accessToken", "modifier": "private volatile", "original_string": "private volatile byte[] accessToken;", "type": "byte[]", "var_name": "accessToken" } ], "file": "client/refocus-client/src/main/java/com/salesforce/refocus/RefocusClient.java", ...
{ "body": "public Subject getSubject(String key, List<String> fields) throws UnauthorizedException {\n Preconditions.checkNotNull(key, \"Key should not be null\");\n return executeAndRetrieveBody(svc().getSubject(authorizationHeader(), key, fields), null);\n }", "class_method_signature": "RefocusCl...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_30
{ "fields": [], "file": "plugin-api/src/test/java/com/salesforce/pyplyn/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNullableByteArrayCopy() throws Exception {\n // ARRANGE\n byte[] input = {1, 2};\n byte[] nullInput = null;\n\n // ACT\n byte[] output = CollectionUtils.nullableArrayCopy(input);\n byte[] nullOutput = CollectionUtils.nullableArrayCopy(nul...
{ "fields": [], "file": "plugin-api/src/main/java/com/salesforce/pyplyn/util/CollectionUtils.java", "identifier": "CollectionUtils", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtils.CollectionUtils()", "constructor": true, "full_signature": "private Collection...
{ "body": "public static <T> T[] nullableArrayCopy(T[] input) {\n return Optional.ofNullable(input).map(s -> Arrays.copyOf(s, s.length)).orElse(null);\n }", "class_method_signature": "CollectionUtils.nullableArrayCopy(T[] input)", "constructor": false, "full_signature": "public static T[] nullableArra...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_26
{ "fields": [ { "declarator": "provider", "modifier": "@Mock", "original_string": "@Mock\n SerializerProvider provider;", "type": "SerializerProvider", "var_name": "provider" }, { "declarator": "generator", "modifier": "@Mock", "original_string": "@Mock\n...
{ "body": "@Test\n public void testSerialize() throws Exception {\n // ARRANGE\n byte[] bytes = \"bytes\".getBytes(Charset.defaultCharset());\n\n // ACT\n serializer.serialize(bytes, generator, provider);\n\n // ASSERT\n\n // tests the fact that the password is serialized ...
{ "fields": [], "file": "plugin-api/src/main/java/com/salesforce/pyplyn/util/SensitiveByteArraySerializer.java", "identifier": "SensitiveByteArraySerializer", "interfaces": "", "methods": [ { "class_method_signature": "SensitiveByteArraySerializer.serialize(byte[] bytes, JsonGenerator jsonGenerator,...
{ "body": "@Override\n public void serialize(byte[] bytes, JsonGenerator jsonGenerator, SerializerProvider provider) throws IOException {\n jsonGenerator.writeUTF8String(bytes, 0, bytes.length);\n }", "class_method_signature": "SensitiveByteArraySerializer.serialize(byte[] bytes, JsonGenerator jsonGene...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
79246257_71
{ "fields": [ { "declarator": "LONG_ID = 1L", "modifier": "private static final", "original_string": "private static final long LONG_ID = 1L;", "type": "long", "var_name": "LONG_ID" }, { "declarator": "LIST_OF_LONG_ID = Collections.singletonList(LONG_ID)", "modifi...
{ "body": "@Test\n public void removeTriggerFromNotification() throws Exception {\n \t// ARRANGE\n \tTriggerObject triggerObj = ImmutableTriggerObject.builder().alertId(LONG_ID).id(LONG_ID).notificationIds(LIST_OF_LONG_ID).build();\n \tResponse<TriggerObject> response = Response.success(triggerObj);\n ...
{ "fields": [ { "declarator": "AUTH_HEADER_PREFIX = \"Bearer \"", "modifier": "private static final", "original_string": "private static final String AUTH_HEADER_PREFIX = \"Bearer \";", "type": "String", "var_name": "AUTH_HEADER_PREFIX" }, { "declarator": "accessToken",...
{ "body": "public void removeTriggerFromNotification(long alertId, long notificationId, long triggerId) throws UnauthorizedException {\n Preconditions.checkNotNull(alertId, \"Alert id should not be null\");\n Preconditions.checkNotNull(notificationId, \"Notification id should not be null\");\n Pr...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79246257, "size": 1631, "stargazer_count": 18, "stars": null, "updates": null, "url": "https://github.com/salesforce/pyplyn" }
32098238_6
{ "fields": [], "file": "jee7-class-service/src/test/java/ch/demo/dom/StudentClassTest.java", "identifier": "StudentClassTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldTestNotEq() {\n\t\tStudentClass s1 = new StudentClass(\"GER101\", Discipline.GERMAN, \"001\", \"002\");\n\t\tStudentClass s2 = new StudentClass(\"GER102\", Discipline.GERMAN, \"001\", \"002\");\n\t\tAssert.assertFalse(\"s1=s2\", s1.equals(s2));\n\t\ts1 = new StudentClass(\"GER101...
{ "fields": [ { "declarator": "serialVersionUID = -1369317473509616839L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1369317473509616839L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id"...
{ "body": "@Override\n\tpublic boolean equals(final Object obj) {\n\t\tif (obj == null || getClass() != obj.getClass()) {\n\t\t\treturn false;\n\t\t}\n\t\tfinal StudentClass other = (StudentClass) obj;\n\t\treturn Objects.equals(this.classId, other.classId) && Objects.equals(this.discipline, other.discipline)\n\t\t\t...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_7
{ "fields": [], "file": "jee7-class-service/src/test/java/ch/demo/dom/StudentClassTest.java", "identifier": "StudentClassTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldToString() throws Exception {\n\t\tStudentClass s1 = new StudentClass(\"GER101\", Discipline.GERMAN, \"001\", \"002\");\n\t\tAssert.assertEquals(\"s1.toString()\" , \"{id:0, classId:GER101, discipline:German, students:[001, 002]}\", s1.toString());\n\t}", "class_method_signatur...
{ "fields": [ { "declarator": "serialVersionUID = -1369317473509616839L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1369317473509616839L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id"...
{ "body": "@Override\n\tpublic String toString() { \n\t\treturn \"{id:\" + id + \", classId:\" + classId + \", discipline:\" + discipline + \", students:\"\n\t\t\t\t+ students + \"}\";\n\t}", "class_method_signature": "StudentClass.toString()", "constructor": false, "full_signature": "@Override public String t...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_11
{ "fields": [], "file": "jee7-grade-service/src/test/java/ch/demo/dom/GradeTest.java", "identifier": "GradeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldTestHashCode() {\n\t\tDate date = new Date();\n\t\tGrade g1 = new Grade(\"0001\", date, Discipline.BIOLOGY, 40);\n\t\tGrade g2 = new Grade(\"0001\", date, Discipline.BIOLOGY, 40);\n\t\tAssert.assertEquals(\"g1.hashcode=g2.hashcode\", g1.hashCode(), g2.hashCode());\n\t}", "class...
{ "fields": [ { "declarator": "serialVersionUID = -1369317473509616839L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1369317473509616839L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id"...
{ "body": "@Override\n\tpublic int hashCode() {\n\t\treturn Objects.hash(studentId, date, discipline, grade);\n\t}", "class_method_signature": "Grade.hashCode()", "constructor": false, "full_signature": "@Override public int hashCode()", "identifier": "hashCode", "invocations": [ "hash" ], "modifier...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_0
{ "fields": [ { "declarator": "sut", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate StudentServiceRs sut;", "type": "StudentServiceRs", "var_name": "sut" } ], "file": "jee7-students-service/src/test/java/ch/demo/business/service/StudentServiceRsTest....
{ "body": "@Test\n\tpublic void shouldNbStudentReturnTheCurrentNbOfStudents() {\n\t\t// We mostly test the return codes, syntax and encoding.\n\t\tString result = sut.getNbStudent();\n\t\tSystem.out.println(result);\n\t\tAssert.assertTrue(result.contains(\"nbStudents\"));\n\t}", "class_method_signature": "StudentSe...
{ "fields": [ { "declarator": "service", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate StudentService service;", "type": "StudentService", "var_name": "service" } ], "file": "jee7-students-service/src/main/java/ch/demo/business/service/StudentServic...
{ "body": "@GET\n\t@Path(\"/nbStudents\")\n\t@Produces({ \"application/json\" })\n\tpublic String getNbStudent() {\n\t\treturn \"{\\\"nbStudents\\\":\\\"\" + service.getNbStudent() + \"\\\"}\";\n\t}", "class_method_signature": "StudentServiceRs.getNbStudent()", "constructor": false, "full_signature": "@GET @Pat...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_1
{ "fields": [ { "declarator": "sut", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate StudentServiceRs sut;", "type": "StudentServiceRs", "var_name": "sut" } ], "file": "jee7-students-service/src/test/java/ch/demo/business/service/StudentServiceRsTest....
{ "body": "@Test\n\tpublic void shouldGetUnkownIdReturn404() {\n\t\t// We mostly test the return codes, syntax and encoding.\n\t\tResponse result = sut.getStudentsByStudentId(\"972\");\t\t\n\t\tAssert.assertEquals(404, result.getStatus());\n\t}", "class_method_signature": "StudentServiceRsTest.shouldGetUnkownIdRetu...
{ "fields": [ { "declarator": "service", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate StudentService service;", "type": "StudentService", "var_name": "service" } ], "file": "jee7-students-service/src/main/java/ch/demo/business/service/StudentServic...
{ "body": "@GET\n\t@Path(\"/byStudentId/{studentId}\")\n\t@Produces({ \"application/json\" })\n\tpublic Response getStudentsByStudentId(\n\t\t\t@NotNull @Digits(integer = 7, fraction = 0) @PathParam(\"studentId\") String studentId) {\n\t\tStudent s = null;\n\t\ttry {\n\t\t\ts = service.getStudentByKey(studentId);\n\t...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_10
{ "fields": [ { "declarator": "service", "modifier": "@Inject", "original_string": "@Inject\n\tGradeService service;", "type": "GradeService", "var_name": "service" }, { "declarator": "em", "modifier": "@PersistenceContext", "original_string": "@PersistenceC...
{ "body": "@Test\n\tpublic void shouldAddAGrade() {\n\n\t\t\n\t\tTypedQuery<Grade> query = em.createQuery(\"SELECT g FROM Grade g\", Grade.class);\n\t\tList<Grade> results = query.getResultList();\n\t\tint numberOfGrades = results.size();\n\n\t\tquery = em.createQuery(\"SELECT g FROM Grade g where g.studentId = :stud...
{ "fields": [ { "declarator": "serialVersionUID = 1386508985359072399L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1386508985359072399L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "entit...
{ "body": "@Override\n\tpublic void addGrade(Grade g) {\n\t\tentityManager.persist(g);\n\t}", "class_method_signature": "GradeServiceImpl.addGrade(Grade g)", "constructor": false, "full_signature": "@Override public void addGrade(Grade g)", "identifier": "addGrade", "invocations": [ "persist" ], "mo...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_2
{ "fields": [ { "declarator": "sut", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate StudentServiceRs sut;", "type": "StudentServiceRs", "var_name": "sut" } ], "file": "jee7-students-service/src/test/java/ch/demo/business/service/StudentServiceRsTest....
{ "body": "@Test\n\tpublic void shouldAddReturnTheNewURI() throws URISyntaxException {\n\t\t// We mostly test the return codes, syntax and encoding.\n\t\tStudent student = new Student(\"Doe\", \"Jow\", new Date(), new PhoneNumber(\"+33698075273\"));\n\t\tResponse result = sut.add(student);\n\t\tAssert.assertEquals(20...
{ "fields": [ { "declarator": "service", "modifier": "@Inject\n\tprivate", "original_string": "@Inject\n\tprivate StudentService service;", "type": "StudentService", "var_name": "service" } ], "file": "jee7-students-service/src/main/java/ch/demo/business/service/StudentServic...
{ "body": "@PUT\n\t@Path(\"/add\")\n\t@Produces({ \"application/json\" })\n\tpublic Response add(@NotNull Student student) throws URISyntaxException {\n\t\tservice.add(student);\n\t\treturn Response.status(201).contentLocation(new URI(\"students/byStudentId/\" + student.getStudentId())).build();\n\t}", "class_metho...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_13
{ "fields": [], "file": "jee7-grade-service/src/test/java/ch/demo/dom/GradeTest.java", "identifier": "GradeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldToString() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate date = dateFormat.parse(\"2013-12-4\");\n\t\t\n\t\tGrade g1 = new Grade(\"0001\", date, Discipline.BIOLOGY, 40);\n\t\tAssert.assertTrue(\"g1.toString()\" , g1.toString().co...
{ "fields": [ { "declarator": "serialVersionUID = -1369317473509616839L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1369317473509616839L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id"...
{ "body": "@Override\n\tpublic String toString() {\n\t\treturn \"Grade [id=\" + getId() + \", studentId=\" + studentId + \", date=\" + date + \", discipline=\" + discipline\n\t\t\t\t+ \"]\";\n\t}", "class_method_signature": "Grade.toString()", "constructor": false, "full_signature": "@Override public String toS...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_12
{ "fields": [], "file": "jee7-grade-service/src/test/java/ch/demo/dom/GradeTest.java", "identifier": "GradeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldTestNotEq() throws InterruptedException {\n\t\tGrade g1 = new Grade(\"0001\", new Date(), Discipline.BIOLOGY, 40);\n\t\tAssert.assertFalse(g1.equals(null));\n\t\tThread.sleep(3);\n\t\tGrade g2 = new Grade(\"0001\", new Date(), Discipline.BIOLOGY, 40);\n\t\tAssert.assertFalse(\"g1...
{ "fields": [ { "declarator": "serialVersionUID = -1369317473509616839L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1369317473509616839L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id"...
{ "body": "@Override\n\tpublic boolean equals(final Object obj) {\n\t\tif (obj == null || getClass() != obj.getClass()) {\n\t\t\treturn false;\n\t\t}\n\t\tfinal Grade other = (Grade) obj;\n\t\treturn Objects.equals(this.studentId, other.studentId) && Objects.equals(this.date, other.date)\n\t\t\t\t&& Objects.equals(th...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_3
{ "fields": [], "file": "jee7-students-service/src/test/java/ch/demo/dom/PhoneNumberTest.java", "identifier": "PhoneNumberTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldToStringHaveTheRightform() throws Exception {\n\t\tPhoneNumber p1 = new PhoneNumber(33, 123, 456);\n\t\tAssert.assertEquals(\"a.toString()\", \"+33-0123-0456\",\n\t\t\t\tp1.toString());\n\t\tPhoneNumber p4 = new PhoneNumber(\"+33-0123-0456\");\n\t\tAssert.assertEquals(\"a.toStrin...
{ "fields": [ { "declarator": "serialVersionUID = -238688791921667729L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -238688791921667729L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "count...
{ "body": "@Override\n\tpublic String toString() {\n\t\treturn getAsString(this);\n\t}", "class_method_signature": "PhoneNumber.toString()", "constructor": false, "full_signature": "@Override public String toString()", "identifier": "toString", "invocations": [ "getAsString" ], "modifiers": "@Overri...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_8
{ "fields": [], "file": "jee7-search-service/src/test/java/ch/demo/dom/StudentTest.java", "identifier": "StudentTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldTestNotEq() {\n\t\tStudent s1 = new Student(\"Steve\", \"Hostettler\", new Date());\n\t\tStudent s2 = new Student(\"Steve\", \"Gostettler\", new Date());\n\t\tAssert.assertFalse(\"s1=s2\", s1.equals(s2));\n\n\t}", "class_method_signature": "StudentTest.shouldTestNotEq()", "co...
{ "fields": [ { "declarator": "serialVersionUID = -6146935825517747043L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -6146935825517747043L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id"...
{ "body": "@Override\n public boolean equals(final Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj instanceof Student) {\n if (this.lastName.equals(((Student) obj).lastName)\n && this.firstName.equals(((Student) obj).firstName)\n ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_4
{ "fields": [], "file": "jee7-students-service/src/test/java/ch/demo/dom/PhoneNumberTest.java", "identifier": "PhoneNumberTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldIdenticalPhoneNumberHaveSameHashcode() throws Exception {\n\t\tPhoneNumber p1 = new PhoneNumber(33, 123, 456);\n\t\tPhoneNumber p4 = new PhoneNumber(\"+33-0123-0456\");\n\t\tAssert.assertEquals(\"p1.hashCode() = p4.hashCode()\", p1.hashCode(), p4.hashCode());\t\n\t}", "class_me...
{ "fields": [ { "declarator": "serialVersionUID = -238688791921667729L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -238688791921667729L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "count...
{ "body": "@Override\n\tpublic int hashCode() {\n\t\tint hash = this.getAreaCode();\n\t\thash ^= this.getCountryCode();\n\t\thash ^= this.getNumber();\n\t\treturn hash;\n\t}", "class_method_signature": "PhoneNumber.hashCode()", "constructor": false, "full_signature": "@Override public int hashCode()", "identi...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_5
{ "fields": [], "file": "jee7-students-service/src/test/java/ch/demo/dom/StudentTest.java", "identifier": "StudentTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldCopyFromStudentBeEqualToSource() {\n\t\tStudent s1 = new Student(\"Steve\", \"Hostettler\", new Date(), new PhoneNumber(\"+33698075273\"));\n\t\tStudent s2 = new Student(\"John\", \"Doe\", new Date(), new PhoneNumber(\"+33698075273\"));\n\t\ts1.copyBusinessFieldsFrom(s2);\n\t\tAs...
{ "fields": [ { "declarator": "serialVersionUID = -6146935825517747043L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -6146935825517747043L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id"...
{ "body": "public void copyBusinessFieldsFrom(Student student) {\n\t\tthis.setAddress(student.getAddress());\n\t\tthis.setBirthDate(student.getBirthDate());\n\t\tthis.setLastName(student.getLastName());\n\t\tthis.setFirstName(student.getFirstName());\n\t\tthis.setPhoneNumber(student.getPhoneNumber());\n\t\tthis.setGe...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
32098238_9
{ "fields": [], "file": "jee7-search-service/src/test/java/ch/demo/dom/StudentTest.java", "identifier": "StudentTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldToString() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate date = dateFormat.parse(\"2013-12-4\");\n\t\t\n\t\tStudent s1 = new Student(\"Steve\", \"Hostettler\", date);\n\t\tAssert.assertTrue(\"s1.toString()\" , s1.toString().contai...
{ "fields": [ { "declarator": "serialVersionUID = -6146935825517747043L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -6146935825517747043L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id"...
{ "body": "@Override\n public String toString() {\n return \"Student [id=\" + getId() + \", lastName=\" + lastName\n + \", firstName=\" + firstName + \", birthDate=\" + birthDate\n + \", phoneNumber=\" + phoneNumber + \", grades=\" + grades\n + \"]\";\n }", ...
{ "created": null, "fork": null, "fork_count": 6, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32098238, "size": 9305, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/hostettler/JEE7-Demo" }
183523285_11
{ "fields": [], "file": "mantis-connector-publish/src/test/java/io/mantisrx/connector/publish/core/QueryRegistryTest.java", "identifier": "QueryRegistryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void registerQueryTest() {\n try {\n QueryRegistry queryRegistry = new QueryRegistry.Builder().build();\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n\n QueryRegistry queryRegistry = new QueryRegistry.Builder().withClientIdPrefix(...
{ "fields": [ { "declarator": "ANY = \"ANY\"", "modifier": "public static final", "original_string": "public static final String ANY = \"ANY\";", "type": "String", "var_name": "ANY" }, { "declarator": "LOGGER = LoggerFactory.getLogger(QueryRegistry.class)", "modif...
{ "body": "public void registerQuery(String targetApp, String subId, String query) {\n registerQuery(targetApp, subId, query, this.emptyMap, false);\n\n }", "class_method_signature": "QueryRegistry.registerQuery(String targetApp, String subId, String query)", "constructor": false, "full_signature": "p...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_0
{ "fields": [], "file": "mantis-connector-kafka/src/test/java/io/mantisrx/connector/kafka/source/MantisKafkaConsumerConfigTest.java", "identifier": "MantisKafkaConsumerConfigTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testJobParamOverrides() {\n Context context = mock(Context.class);\n String testTopic = \"topic123\";\n String testConsumerGroupId = \"testKafkaConsumer-1\";\n Parameters params = ParameterTestUtils.createParameters(KafkaSourceParameters.TOPIC, testTopic,\...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MantisKafkaConsumerConfig.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MantisKafkaConsumerConfig.class);", "type": "Logger", "var_name": "L...
{ "body": "public Map<String, Object> getConsumerProperties() {\n return values().entrySet().stream()\n .filter(x -> x.getKey() != null && x.getValue() != null)\n .collect(Collectors.toMap(x -> x.getKey(),\n x -> (Object) x.getValue()));\n }", "cl...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_1
{ "fields": [], "file": "mantis-connector-kafka/src/test/java/io/mantisrx/connector/kafka/sink/MantisKafkaProducerConfigTest.java", "identifier": "MantisKafkaProducerConfigTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaultKafkaProducerConfig() {\n Context context = mock(Context.class);\n Parameters params = ParameterTestUtils.createParameters();\n\n when(context.getParameters()).then((Answer<Parameters>) invocation -> params);\n\n MantisKafkaProducerConfig mantis...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MantisKafkaProducerConfig.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MantisKafkaProducerConfig.class);", "type": "Logger", "var_name": "L...
{ "body": "public Map<String, Object> getProducerProperties() {\n return values().entrySet().stream()\n .filter(x -> x.getKey() != null && x.getValue() != null)\n .collect(Collectors.toMap(x -> x.getKey(),\n x -> (Object) x.getValue()));\n }", "cl...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_10
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private", "original_string": "private ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" } ], "file": "mantis-connector-publish/src/test/java/io/mantisrx/connector/...
{ "body": "@Test\n public void missingSubIdParamAlwaysPasses() throws JsonProcessingException {\n String clientId = \"myClientId\";\n EventFilter filter = new EventFilter(clientId);\n\n Map<String, List<String>> params = new HashMap<>();\n\n Func1<String, Boolean> materializedFilter = f...
{ "fields": [ { "declarator": "LOGGER = Logger.getLogger(EventFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = Logger.getLogger(EventFilter.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "c...
{ "body": "@Override\n public Func1<String, Boolean> call(Map<String, List<String>> parameters) {\n Func1<String, Boolean> filter = t1 -> true;\n\n if (parameters != null) {\n if (parameters.containsKey(MantisSourceJobConstants.FILTER_PARAM_NAME)) {\n String filterBy = param...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_6
{ "fields": [ { "declarator": "scheduler", "modifier": "private", "original_string": "private TestScheduler scheduler;", "type": "TestScheduler", "var_name": "scheduler" }, { "declarator": "subscriber", "modifier": "private", "original_string": "private Test...
{ "body": "@Test\n void shouldInitializeWithExistingTable() {\n IcebergWriterStage stage = new IcebergWriterStage();\n assertDoesNotThrow(() -> stage.init(context));\n }", "class_method_signature": "IcebergWriterStageTest.shouldInitializeWithExistingTable()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IcebergWriterStage.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(IcebergWriterStage.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "@Override\n public void init(Context context) {\n transformer = newTransformer(context);\n }", "class_method_signature": "IcebergWriterStage.init(Context context)", "constructor": false, "full_signature": "@Override public void init(Context context)", "identifier": "init", "invocatio...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_7
{ "fields": [ { "declarator": "scheduler", "modifier": "private", "original_string": "private TestScheduler scheduler;", "type": "TestScheduler", "var_name": "scheduler" }, { "declarator": "subscriber", "modifier": "private", "original_string": "private Test...
{ "body": "@Test\n void shouldFailToInitializeWithMissingTable() {\n when(catalog.loadTable(any())).thenThrow(new RuntimeException());\n IcebergWriterStage stage = new IcebergWriterStage();\n assertThrows(RuntimeException.class, () -> stage.init(context));\n }", "class_method_signature": ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IcebergWriterStage.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(IcebergWriterStage.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "@Override\n public void init(Context context) {\n transformer = newTransformer(context);\n }", "class_method_signature": "IcebergWriterStage.init(Context context)", "constructor": false, "full_signature": "@Override public void init(Context context)", "identifier": "init", "invocatio...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_4
{ "fields": [ { "declarator": "scheduler", "modifier": "private", "original_string": "private TestScheduler scheduler;", "type": "TestScheduler", "var_name": "scheduler" }, { "declarator": "subscriber", "modifier": "private", "original_string": "private Test...
{ "body": "@Test\n void shouldInitializeWithExistingTable() {\n IcebergCommitterStage stage = new IcebergCommitterStage();\n assertDoesNotThrow(() -> stage.init(context));\n }", "class_method_signature": "IcebergCommitterStageTest.shouldInitializeWithExistingTable()", "constructor": false, "...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IcebergCommitterStage.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(IcebergCommitterStage.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public void init(Context context) {\n transformer = newTransformer(context);\n }", "class_method_signature": "IcebergCommitterStage.init(Context context)", "constructor": false, "full_signature": "@Override public void init(Context context)", "identifier": "init", "invoca...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_8
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private", "original_string": "private ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" } ], "file": "mantis-connector-publish/src/test/java/io/mantisrx/connector/...
{ "body": "@Test\n public void basicFilterTest() throws JsonProcessingException {\n String clientId = \"myClientId\";\n EventFilter filter = new EventFilter(clientId);\n\n Map<String, List<String>> params = new HashMap<>();\n List<String> subIdParam = new ArrayList<>();\n\n subId...
{ "fields": [ { "declarator": "LOGGER = Logger.getLogger(EventFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = Logger.getLogger(EventFilter.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "c...
{ "body": "@Override\n public Func1<String, Boolean> call(Map<String, List<String>> parameters) {\n Func1<String, Boolean> filter = t1 -> true;\n\n if (parameters != null) {\n if (parameters.containsKey(MantisSourceJobConstants.FILTER_PARAM_NAME)) {\n String filterBy = param...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_9
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private", "original_string": "private ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" } ], "file": "mantis-connector-publish/src/test/java/io/mantisrx/connector/...
{ "body": "@Test\n public void basicEmptyEventFilterTest() throws JsonProcessingException {\n String clientId = \"myClientId\";\n EventFilter filter = new EventFilter(clientId);\n\n Map<String, List<String>> params = new HashMap<>();\n List<String> subIdParam = new ArrayList<>();\n\n ...
{ "fields": [ { "declarator": "LOGGER = Logger.getLogger(EventFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = Logger.getLogger(EventFilter.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "c...
{ "body": "@Override\n public Func1<String, Boolean> call(Map<String, List<String>> parameters) {\n Func1<String, Boolean> filter = t1 -> true;\n\n if (parameters != null) {\n if (parameters.containsKey(MantisSourceJobConstants.FILTER_PARAM_NAME)) {\n String filterBy = param...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_5
{ "fields": [ { "declarator": "scheduler", "modifier": "private", "original_string": "private TestScheduler scheduler;", "type": "TestScheduler", "var_name": "scheduler" }, { "declarator": "subscriber", "modifier": "private", "original_string": "private Test...
{ "body": "@Test\n void shouldFailToInitializeWithMissingTable() {\n when(catalog.loadTable(any())).thenThrow(new RuntimeException());\n IcebergCommitterStage stage = new IcebergCommitterStage();\n assertThrows(RuntimeException.class, () -> stage.init(context));\n }", "class_method_signat...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(IcebergCommitterStage.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(IcebergCommitterStage.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public void init(Context context) {\n transformer = newTransformer(context);\n }", "class_method_signature": "IcebergCommitterStage.init(Context context)", "constructor": false, "full_signature": "@Override public void init(Context context)", "identifier": "init", "invoca...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_2
{ "fields": [], "file": "mantis-connector-kafka/src/test/java/io/mantisrx/connector/kafka/sink/MantisKafkaProducerConfigTest.java", "identifier": "MantisKafkaProducerConfigTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testJobParamOverrides() {\n Context context = mock(Context.class);\n Parameters params = ParameterTestUtils.createParameters(KafkaSinkJobParameters.PREFIX + ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);\n\n when(context.getParameters()).the...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MantisKafkaProducerConfig.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MantisKafkaProducerConfig.class);", "type": "Logger", "var_name": "L...
{ "body": "public Map<String, Object> getProducerProperties() {\n return values().entrySet().stream()\n .filter(x -> x.getKey() != null && x.getValue() != null)\n .collect(Collectors.toMap(x -> x.getKey(),\n x -> (Object) x.getValue()));\n }", "cl...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_12
{ "fields": [], "file": "mantis-connector-publish/src/test/java/io/mantisrx/connector/publish/core/QueryRegistryTest.java", "identifier": "QueryRegistryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @Disabled(\"time-based, non-deterministic\")\n void deregisterQueryTest() throws InterruptedException {\n try {\n QueryRegistry queryRegistry = new QueryRegistry.Builder().build();\n fail();\n } catch (IllegalArgumentException ignored) { }\n\n QueryR...
{ "fields": [ { "declarator": "ANY = \"ANY\"", "modifier": "public static final", "original_string": "public static final String ANY = \"ANY\";", "type": "String", "var_name": "ANY" }, { "declarator": "LOGGER = LoggerFactory.getLogger(QueryRegistry.class)", "modif...
{ "body": "public boolean deregisterQuery(String targetApp, String subId, String query) {\n appToSubscriptionMap.computeIfPresent(targetApp, (k, v) -> {\n v.deregisterQuery(subId, query);\n return v;\n });\n\n return true;\n }", "class_method_signature": "QueryRegistry....
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
183523285_3
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(KafkaSourceTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(KafkaSourceTest.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Test\n public void testKafkaSink() throws InterruptedException {\n String testTopic = \"testTopic\" + topicNum.incrementAndGet();\n int numPartitions = 1;\n kafkaServer.createTopic(testTopic, numPartitions);\n int numMessages = 10;\n\n\n KafkaSink<String> kafkaSink = ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KafkaSink.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(KafkaSink.class);", "type": "Logger", "var_name": "logger" }, { "decla...
{ "body": "KafkaSink(Registry registry, Func1<T, byte[]> encoder) {\n this.encoder = encoder;\n this.registry = registry;\n }", "class_method_signature": "KafkaSink.KafkaSink(Registry registry, Func1<T, byte[]> encoder)", "constructor": true, "full_signature": " KafkaSink(Registry registry, Fu...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 183523285, "size": 326, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/Netflix/mantis-connectors" }
811072_0
{ "fields": [ { "declarator": "helloEJB", "modifier": "@EJB\n private", "original_string": "@EJB\n private HelloEJB helloEJB;", "type": "HelloEJB", "var_name": "helloEJB" } ], "file": "ejb31-gfembedded/src/test/java/org/jboss/arquillian/examples/gfembedded/HelloEJBTest....
{ "body": "@Test\n public void testHelloEJB() {\n String result = helloEJB.sayHelloEJB(\"Michael\");\n assertEquals(\"Hello Michael\", result);\n }", "class_method_signature": "HelloEJBTest.testHelloEJB()", "constructor": false, "full_signature": "@Test public void testHelloEJB()", "identi...
{ "fields": [], "file": "ejb31-gfembedded/src/main/java/org/jboss/arquillian/examples/gfembedded/HelloEJB.java", "identifier": "HelloEJB", "interfaces": "", "methods": [ { "class_method_signature": "HelloEJB.sayHelloEJB(String name)", "constructor": false, "full_signature": "public Strin...
{ "body": "public String sayHelloEJB(String name) {\n\n\t\treturn \"Hello \" + name;\n\t}", "class_method_signature": "HelloEJB.sayHelloEJB(String name)", "constructor": false, "full_signature": "public String sayHelloEJB(String name)", "identifier": "sayHelloEJB", "invocations": [], "modifiers": "public"...
{ "created": null, "fork": null, "fork_count": 220, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 811072, "size": 321, "stargazer_count": 158, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-examples" }
44343498_1
{ "fields": [], "file": "core/tags/1.0/binding/src/test/java/org/extensiblecatalog/ncip/v2/binding/jaxb/TestDatatypeConverter.java", "identifier": "TestDatatypeConverter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void noMilliseconds() throws DatatypeConfigurationException {\n\n GregorianCalendar wellKnownDate\n = (GregorianCalendar)GregorianCalendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n // This July 8, 1957 at 3:30 in the afternoon UTC (10:30 a.m. Eastern US time)....
{ "fields": [ { "declarator": "LOG = Logger.getLogger(DatatypeConverter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(DatatypeConverter.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public static String printDateTime(XMLGregorianCalendar calendar) {\n\n String result;\n TimeZone tz = calendar.getTimeZone(DatatypeConstants.FIELD_UNDEFINED);\n if ( tz.hasSameRules(UTC_TIMEZONE) ) {\n\n result = javax.xml.bind.DatatypeConverter.printDateTime(calendar.toGre...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_10
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TestSchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TestSchemeValuePair.class);", "type": "Logger", "var_name": "LOG" } ], "file": "core/t...
{ "body": "@Test\n public void testEquals() throws InvocationTargetException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException {\n\n // TODO: Remove all the tests that aren't testing equals\n\n SchemeValuePair.mapBehavior(AgencyId.class.getName(), SchemeValueBehavior.ALLOW_ANY);\...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SchemeValuePair.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "CL...
{ "body": "@Override\n public boolean equals(Object o) {\n\n if (o == this) {\n return true;\n }\n if (!(o instanceof SchemeValuePair)) {\n return false;\n }\n\n if (!this.isComparableSVPSubclass(o)) {\n return false;\n }\n\n SchemeV...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_11
{ "fields": [], "file": "core/trunk/common/src/test/java/org/extensiblecatalog/ncip/v2/common/TestTranslatorFactory.java", "identifier": "TestTranslatorFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGenericWithProperties() throws ToolkitException {\n Properties properties = new Properties();\n properties.setProperty(TranslatorConfiguration.TRANSLATOR_CLASS_NAME_KEY, FakeTranslator.class.getName());\n Translator translator = TranslatorFactory.buildTransla...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TranslatorFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TranslatorFactory.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public static Translator buildTranslator() throws ToolkitException {\n\n return buildTranslator(null, null);\n\n }", "class_method_signature": "TranslatorFactory.buildTranslator()", "constructor": false, "full_signature": "public static Translator buildTranslator()", "identifier": "buildT...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_0
{ "fields": [ { "declarator": "instance", "modifier": "", "original_string": "SymphonyRenewItemService instance;", "type": "SymphonyRenewItemService", "var_name": "instance" }, { "declarator": "remote", "modifier": "", "original_string": "SymphonyJSONRemoteS...
{ "body": "@Test\n public void testPerformService() throws Exception {\n Assert.assertTrue(true);\n }", "class_method_signature": "SymphonyRenewItemServiceTest.testPerformService()", "constructor": false, "full_signature": "@Test public void testPerformService()", "identifier": "testPerformServic...
{ "fields": [], "file": "connectors/symphony/branches/ncsu-json-branch/jar/src/main/java/org/extensiblecatalog/ncip/v2/symphony/SymphonyRenewItemService.java", "identifier": "SymphonyRenewItemService", "interfaces": "implements RenewItemService", "methods": [ { "class_method_signature": "SymphonyRen...
{ "body": "@Override\n public RenewItemResponseData performService(RenewItemInitiationData initData, ServiceContext serviceContext, RemoteServiceManager serviceManager) throws ServiceException {\n try {\n return getServiceManager(serviceManager).doRenewItem(initData);\n } catch( HttpExcept...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_7
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TestSchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TestSchemeValuePair.class);", "type": "Logger", "var_name": "LOG" } ], "file": "core/t...
{ "body": "@Test\n public void testToString() {\n\n AgencyId agencyId = new AgencyId(\"Some Scheme\", \"Some Value\");\n Assert.assertNotNull(\"AgencyId.toString() should not return null.\", agencyId.toString());\n }", "class_method_signature": "TestSchemeValuePair.testToString()", "constructo...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SchemeValuePair.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "CL...
{ "body": "@Override\n public String toString() {\n return ReflectionToStringBuilder.reflectionToString(this);\n }", "class_method_signature": "SchemeValuePair.toString()", "constructor": false, "full_signature": "@Override public String toString()", "identifier": "toString", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_9
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TestSchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TestSchemeValuePair.class);", "type": "Logger", "var_name": "LOG" } ], "file": "core/t...
{ "body": "@Test\n public void testMatches() {\n\n // Test matches even if Scheme is null\n SchemeValuePair.allowNullScheme(FiscalActionType.class.getName());\n FiscalActionType fiscalActionTypeWithNullScheme\n = new FiscalActionType(null, Version1FiscalActionType.CANCEL.getValue())...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SchemeValuePair.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "CL...
{ "body": "public boolean matches(SchemeValuePair svp) {\n\n if (isComparableSVPSubclass(svp)) {\n\n return matches(svp.getScheme(), svp.getValue());\n\n } else {\n\n return false;\n }\n\n }", "class_method_signature": "SchemeValuePair.matches(SchemeValuePair svp)", "...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_8
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TestSchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TestSchemeValuePair.class);", "type": "Logger", "var_name": "LOG" } ], "file": "core/t...
{ "body": "@Test\n public void testFind() {\n\n String AGENCY_SCHEME = \"http://dummy\";\n String AGENCY_ONE_VALUE = \"One\";\n\n SchemeValuePair.mapBehavior(AgencyId.class.getName(), SchemeValueBehavior.ALLOW_ANY);\n\n // Test find method of a sub-class that is configured to allow any ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SchemeValuePair.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "CL...
{ "body": "protected static <SVP extends SchemeValuePair> SchemeValuePair find(final String scheme, final String value,\n List<SVP> values, Class<SVP> svpClass)\n throws ServiceException {\n\n // TODO: Reorganize this so we match...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_4
{ "fields": [ { "declarator": "TEST_FILE = \"src/test/data/LookupItemWithExampleItemIdentifierType.xml\"", "modifier": "protected static", "original_string": "protected static String TEST_FILE = \"src/test/data/LookupItemWithExampleItemIdentifierType.xml\";", "type": "String", "var_n...
{ "body": "@Test\n public void testExampleItemIdentifierType() throws FileNotFoundException, ToolkitException, ServiceException, ValidationException {\n\n Properties properties = new Properties();\n properties.put(\"CoreConfiguration.AddedSVPClasses\",\n \"org.extensiblecatalog.ncip.v2.exa...
{ "fields": [ { "declarator": "EXAMPLE_ITEM_IDENTIFIER_TYPE\n = \"http://www.extensiblecatalog.ncip.v2.org/schemes/itemidentifiertype/exampleitemidentifiertype.scm\"", "modifier": "public static final", "original_string": "public static final String EXAMPLE_ITEM_IDENTIFIER_TYPE\n =...
{ "body": "protected ExampleItemIdentifierType(String scheme, String value) {\n super(scheme, value);\n }", "class_method_signature": "ExampleItemIdentifierType.ExampleItemIdentifierType(String scheme, String value)", "constructor": true, "full_signature": "protected ExampleItemIdentifierType(String ...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_12
{ "fields": [], "file": "core/trunk/common/src/test/java/org/extensiblecatalog/ncip/v2/common/TestTranslatorFactory.java", "identifier": "TestTranslatorFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppNameWithProperties() throws ToolkitException {\n Properties properties = new Properties();\n properties.setProperty(TranslatorConfiguration.TRANSLATOR_CLASS_NAME_KEY, FakeTranslator.class.getName());\n Translator translator = TranslatorFactory.buildTransla...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TranslatorFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TranslatorFactory.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public static Translator buildTranslator() throws ToolkitException {\n\n return buildTranslator(null, null);\n\n }", "class_method_signature": "TranslatorFactory.buildTranslator()", "constructor": false, "full_signature": "public static Translator buildTranslator()", "identifier": "buildT...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_3
{ "fields": [], "file": "core/tags/1.1/service/src/test/java/org/extensiblecatalog/ncip/v2/service/TestSchemeValuePair.java", "identifier": "TestSchemeValuePair", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEquals() {\n\n // TODO: Identify which tests are tests of symmetry, transitivity and consistency (see Bloch pp. 27-32).\n\n Assert.assertEquals(Version1Language.AAR, Version1Language.AAR);\n Assert.assertNotSame(Version1Language.AAR, Version1Language.ENG);\n...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SchemeValuePair.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SchemeValuePair.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "CL...
{ "body": "@Override\n public boolean equals(Object o) {\n\n if ( o == this ) {\n return true;\n }\n if (!(o instanceof SchemeValuePair)) {\n return false;\n }\n\n if ( ! this.isComparableSVPSubclass(o) ) {\n return false;\n }\n\n Sc...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_2
{ "fields": [], "file": "core/tags/1.0/binding/src/test/java/org/extensiblecatalog/ncip/v2/binding/jaxb/TestDatatypeConverter.java", "identifier": "TestDatatypeConverter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void withMilliseconds() throws DatatypeConfigurationException {\n\n GregorianCalendar wellKnownDate\n = (GregorianCalendar)GregorianCalendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n // This July 8, 1957 at 3:30 in the afternoon UTC (10:30 a.m. Eastern US time...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(DatatypeConverter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(DatatypeConverter.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public static String printDateTime(XMLGregorianCalendar calendar) {\n\n String result;\n TimeZone tz = calendar.getTimeZone(DatatypeConstants.FIELD_UNDEFINED);\n if ( tz.hasSameRules(UTC_TIMEZONE) ) {\n\n result = javax.xml.bind.DatatypeConverter.printDateTime(calendar.toGre...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
44343498_13
{ "fields": [ { "declarator": "TEST_FILE = \"src/test/data/LookupItemWithExampleItemIdentifierType.xml\"", "modifier": "protected static", "original_string": "protected static String TEST_FILE = \"src/test/data/LookupItemWithExampleItemIdentifierType.xml\";", "type": "String", "var_n...
{ "body": "@Test\n public void testExampleItemIdentifierType() throws FileNotFoundException, ToolkitException, ServiceException, ValidationException {\n\n Properties properties = new Properties();\n properties.put(CoreConfiguration.CORE_SCHEME_VALUE_PAIR_ADDED_CLASSES_LIST_KEY, ExampleItemIdentifierT...
{ "fields": [ { "declarator": "EXAMPLE_ITEM_IDENTIFIER_TYPE\n = \"http://www.extensiblecatalog.ncip.v2.org/schemes/itemidentifiertype/exampleitemidentifiertype.scm\"", "modifier": "public static final", "original_string": "public static final String EXAMPLE_ITEM_IDENTIFIER_TYPE\n =...
{ "body": "protected ExampleItemIdentifierType(String scheme, String value) {\n super(scheme, value);\n }", "class_method_signature": "ExampleItemIdentifierType.ExampleItemIdentifierType(String scheme, String value)", "constructor": true, "full_signature": "protected ExampleItemIdentifierType(String ...
{ "created": null, "fork": null, "fork_count": 5, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44343498, "size": 3870, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/eXtensibleCatalog/NCIP2-Toolkit" }
993994_7
{ "fields": [ { "declarator": "dbUserService", "modifier": "private", "original_string": "private DbUserService dbUserService;", "type": "DbUserService", "var_name": "dbUserService" }, { "declarator": "jdbcTemplate", "modifier": "private", "original_string":...
{ "body": "@Test\n public void testCheckUser() throws Exception {\n final long userId = createUser();\n assertTrue(dbUserService.checkUser(userId, \"123\"));\n assertFalse(dbUserService.checkUser(userId * 2, \"11\"));\n assertFalse(dbUserService.checkUser(userId * 3, \"123\"));\n ...
{ "fields": [ { "declarator": "jdbcTemplate", "modifier": "private", "original_string": "private SimpleJdbcTemplate jdbcTemplate;", "type": "SimpleJdbcTemplate", "var_name": "jdbcTemplate" }, { "declarator": "USER_INFO_MAPPER = new ParameterizedRowMapper<UserInfo>() {\n...
{ "body": "public boolean checkUser(final long userId, final String passwd) {\n return 0 < jdbcTemplate.queryForInt(\n \"select count(*) from auth_user where user_id = ? and passwd_hash = ?\",\n userId, passwd\n );\n }", "class_method_signature": "DbUserService.checkUs...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 993994, "size": 16765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/smarthoas/xfresh" }
993994_6
{ "fields": [ { "declarator": "dbUserService", "modifier": "private", "original_string": "private DbUserService dbUserService;", "type": "DbUserService", "var_name": "dbUserService" }, { "declarator": "jdbcTemplate", "modifier": "private", "original_string":...
{ "body": "@Test\n public void testGetUser() throws Exception {\n final long userId = createUser();\n final UserInfo userInfo = dbUserService.getUser(userId);\n assertEquals(\"xxx\", userInfo.getLogin());\n assertEquals(\"x x\", userInfo.getFio());\n assertEquals(\"123\", userInf...
{ "fields": [ { "declarator": "jdbcTemplate", "modifier": "private", "original_string": "private SimpleJdbcTemplate jdbcTemplate;", "type": "SimpleJdbcTemplate", "var_name": "jdbcTemplate" }, { "declarator": "USER_INFO_MAPPER = new ParameterizedRowMapper<UserInfo>() {\n...
{ "body": "public UserInfo getUser(final long userId) {\n final List<UserInfo> users = jdbcTemplate.query(\n \"select * from auth_user where user_id = ?\", USER_INFO_MAPPER, userId);\n if (users.isEmpty()) {\n return null;\n }\n return users.get(0);\n }", "cl...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 993994, "size": 16765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/smarthoas/xfresh" }
993994_1
{ "fields": [], "file": "xfresh-core/src/test/java/net/sf/xfresh/ext/HttpLoaderTest.java", "identifier": "HttpLoaderTest", "interfaces": "", "superclass": "extends AbstractJettyTest" }
{ "body": "@Test\n public void testNonTimeout() throws Throwable {\n HttpLoader httpLoader = new HttpLoader();\n final LoadedXml loadedXml = httpLoader.load(\"http://localhost:33333/test-timeout.xml?_ox&sleep=100\", 300);\n assertFalse(loadedXml.isEmpty());\n }", "class_method_signature":...
{ "fields": [ { "declarator": "log = Logger.getLogger(HttpLoader.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(HttpLoader.class);", "type": "Logger", "var_name": "log" }, { "declarator": "DOCUMENT_BUI...
{ "body": "public LoadedXml load(final String url, final int timeout) {\n try {\n final InputStream stream = loadAsStream(url, timeout);\n final DocumentBuilder builder = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder();\n final Document document = builder.parse(stream);\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 993994, "size": 16765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/smarthoas/xfresh" }
993994_0
{ "fields": [], "file": "xfresh-core/src/test/java/net/sf/xfresh/ext/HttpLoaderTest.java", "identifier": "HttpLoaderTest", "interfaces": "", "superclass": "extends AbstractJettyTest" }
{ "body": "@Test\n public void testTimeout() throws Throwable {\n HttpLoader httpLoader = new HttpLoader();\n final LoadedXml loadedXml = httpLoader.load(\"http://localhost:33333/test-timeout.xml?_ox&sleep=200\", 100);\n assertTrue(loadedXml.isEmpty());\n }", "class_method_signature": "Ht...
{ "fields": [ { "declarator": "log = Logger.getLogger(HttpLoader.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(HttpLoader.class);", "type": "Logger", "var_name": "log" }, { "declarator": "DOCUMENT_BUI...
{ "body": "public LoadedXml load(final String url, final int timeout) {\n try {\n final InputStream stream = loadAsStream(url, timeout);\n final DocumentBuilder builder = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder();\n final Document document = builder.parse(stream);\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 993994, "size": 16765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/smarthoas/xfresh" }
993994_3
{ "fields": [ { "declarator": "TEST_CONTENT = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<page><a>тест</a><data id=\\\"addTestInfo\\\"/></page>\";", "modifier": "private static final", "original_string": "private static final String TEST_CONTENT = \"<?xml version=\\\"1.0\\\" encoding...
{ "body": "@Test\n public void testTransformFile() throws Exception {\n request = new SimpleInternalRequest(null, \"./xfresh-core/src/test/resources/test.xml\");\n\n yaletProcessor.process(request, response, new RedirHandler(null));\n assertEquals(TEST_TRANSFORMED_CONTENT.toLowerCase(),\n ...
{ "fields": [ { "declarator": "log = Logger.getLogger(YaletProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(YaletProcessor.class);", "type": "Logger", "var_name": "log" }, { "declarator": "DEFA...
{ "body": "public void process(final HttpServletRequest req,\n final HttpServletResponse res,\n final String realPath) throws UnsupportedEncodingException, ServletException {\n req.setCharacterEncoding(encoding);\n res.setCharacterEncoding(encoding);\n\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 993994, "size": 16765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/smarthoas/xfresh" }
993994_2
{ "fields": [ { "declarator": "TEST_CONTENT = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<page><a>тест</a><data id=\\\"addTestInfo\\\"/></page>\";", "modifier": "private static final", "original_string": "private static final String TEST_CONTENT = \"<?xml version=\\\"1.0\\\" encoding...
{ "body": "@Test\n public void testProcessFile() throws Exception {\n request = new SimpleInternalRequest(null, \"./xfresh-core/src/test/resources/test.xml\");\n request.setNeedTransform(false);\n yaletProcessor.process(request, response, new RedirHandler(null));\n assertEquals(TEST_CON...
{ "fields": [ { "declarator": "log = Logger.getLogger(YaletProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(YaletProcessor.class);", "type": "Logger", "var_name": "log" }, { "declarator": "DEFA...
{ "body": "public void process(final HttpServletRequest req,\n final HttpServletResponse res,\n final String realPath) throws UnsupportedEncodingException, ServletException {\n req.setCharacterEncoding(encoding);\n res.setCharacterEncoding(encoding);\n\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 993994, "size": 16765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/smarthoas/xfresh" }
993994_5
{ "fields": [ { "declarator": "dbUserService", "modifier": "private", "original_string": "private DbUserService dbUserService;", "type": "DbUserService", "var_name": "dbUserService" }, { "declarator": "jdbcTemplate", "modifier": "private", "original_string":...
{ "body": "@Test\n public void testAddUser() throws Exception {\n final long userId = createUser();\n assertEquals(1, removeUser(userId));\n }", "class_method_signature": "DbUserServiceTest.testAddUser()", "constructor": false, "full_signature": "@Test public void testAddUser()", "identifi...
{ "fields": [ { "declarator": "jdbcTemplate", "modifier": "private", "original_string": "private SimpleJdbcTemplate jdbcTemplate;", "type": "SimpleJdbcTemplate", "var_name": "jdbcTemplate" }, { "declarator": "USER_INFO_MAPPER = new ParameterizedRowMapper<UserInfo>() {\n...
{ "body": "public long addUser(final String login, final String fio, final String passwd, final String passwdAdd) throws UserCreationException {\n\n final UserInfo user = getUser(login);\n if (user != null) {\n throw new UserCreationException(UserCreationException.Type.ALREADY_EXISTS);\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 993994, "size": 16765, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/smarthoas/xfresh" }