id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
220952727_17
{ "fields": [ { "declarator": "username = \"gary\"", "modifier": "private", "original_string": "private String username = \"gary\";", "type": "String", "var_name": "username" }, { "declarator": "password = \"123456\"", "modifier": "private", "original_string...
{ "body": "@Test\n public void login() {\n userController.login(createUserLoginDto());\n }", "class_method_signature": "UserControllerTest.login()", "constructor": false, "full_signature": "@Test public void login()", "identifier": "login", "invocations": [ "login", "createUserLoginDto"...
{ "fields": [ { "declarator": "userService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private UserService userService;", "type": "UserService", "var_name": "userService" } ], "file": "upms/upms-domain/upms-domain-biz/src/main/java/com/yofish/...
{ "body": "@Override\n @PostMapping(\"/login\")\n public Result<UserLoginRspDTO> login(@Valid @RequestBody UserLoginReqDTO userLoginReqDTO) {\n return ok(userService.login(userLoginReqDTO));\n }", "class_method_signature": "UserController.login(@Valid @RequestBody UserLoginReqDTO userLoginReqDTO)", ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_10
{ "fields": [ { "declarator": "instanceController", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private InstanceController instanceController;", "type": "InstanceController", "var_name": "instanceController" }, { "declarator": "namespaceRe...
{ "body": "@Test\n public void getInstanceCountByNamespace() {\n Long namespaceId = namespaceRepository.findAll().get(0).getId();\n instanceController.getInstanceCountByNamespace(namespaceId);\n }", "class_method_signature": "InstanceControllerTest.getInstanceCountByNamespace()", "constructor"...
{ "fields": [ { "declarator": "instanceService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private InstanceService instanceService;", "type": "InstanceService", "var_name": "instanceService" }, { "declarator": "RELEASES_SPLITTER = Splitt...
{ "body": "@ApiOperation(\"所有实例数\")\n @RequestMapping(value = \"/namespaceId/{namespaceId}/count\", method = RequestMethod.GET)\n public Result<Number> getInstanceCountByNamespace(@PathVariable Long namespaceId) {\n\n int count = instanceService.getInstanceCountByNamepsace(namespaceId);\n return R...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_0
{ "fields": [ { "declarator": "appService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppService appService;", "type": "AppService", "var_name": "appService" }, { "declarator": "departmentRepository", "modifier": "@Autowire...
{ "body": "@Test\n public void createApp() {\n List<Department> departmentList = this.departmentRepository.findAll();\n Assert.assertTrue(!ObjectUtils.isEmpty(departmentList));\n\n List<User> allUser = userRepository.findAll();\n Assert.assertTrue(!ObjectUtils.isEmpty(allUser));\n\n ...
{ "fields": [ { "declarator": "appRepository", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppRepository appRepository;", "type": "AppRepository", "var_name": "appRepository" }, { "declarator": "userService", "modifier": "@Au...
{ "body": "@Transactional(rollbackFor = Exception.class)\n public App createApp(@Valid AppModel appModel) {\n App app = appFactory.createApp(appModel);\n\n return app;\n }", "class_method_signature": "AppService.createApp(@Valid AppModel appModel)", "constructor": false, "full_signature": "@...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_1
{ "fields": [ { "declarator": "appEnvClusterNamespaceService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppEnvClusterNamespaceService appEnvClusterNamespaceService;", "type": "AppEnvClusterNamespaceService", "var_name": "appEnvClusterNamespac...
{ "body": "@Test\n public void findNamespaceVOsTest() {\n String appCode = \"apollo-mini\";\n String env = \"dev\";\n String cluster = \"default\";\n List<NamespaceVO> namespaceVOs = this.appEnvClusterNamespaceService.findNamespaceVOs(appCode, env, cluster);\n\n }", "class_method_s...
{ "fields": [ { "declarator": "appEnvClusterNamespaceRepository", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppEnvClusterNamespaceRepository appEnvClusterNamespaceRepository;", "type": "AppEnvClusterNamespaceRepository", "var_name": "appEnvClu...
{ "body": "public List<NamespaceVO> findNamespaceVOs(String appCode, String env, String clusterName) {\n AppEnvCluster appEnvCluster = appEnvClusterRepository.findByApp_AppCodeAndEnvAndName(appCode, env, clusterName);\n if (ObjectUtils.isEmpty(appEnvCluster)) {\n throw new BizException(BaseRe...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_11
{ "fields": [ { "declarator": "instanceController", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private InstanceController instanceController;", "type": "InstanceController", "var_name": "instanceController" }, { "declarator": "namespaceRe...
{ "body": "@Test\n public void getByReleasesNotIn() {\n }", "class_method_signature": "InstanceControllerTest.getByReleasesNotIn()", "constructor": false, "full_signature": "@Test public void getByReleasesNotIn()", "identifier": "getByReleasesNotIn", "invocations": [], "modifiers": "@Test public", ...
{ "fields": [ { "declarator": "instanceService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private InstanceService instanceService;", "type": "InstanceService", "var_name": "instanceService" }, { "declarator": "RELEASES_SPLITTER = Splitt...
{ "body": "@ApiOperation(\"使用的非最新配置的实例\")\n @RequestMapping(value = \"/namespaceId/{namespaceId}/releaseIds/{releaseIds}/by-namespace-and-releases-not-in\", method = RequestMethod.GET)\n public Result<List<InstanceDTO>> getByReleasesNotIn(@RequestParam Long namespaceId, @RequestParam String releaseIds) {\n\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_2
{ "fields": [ { "declarator": "appNamespaceService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppNamespaceService appNamespaceService;", "type": "AppNamespaceService", "var_name": "appNamespaceService" } ], "file": "apollo/apollo-port...
{ "body": "@Test\n public void findAllPublicAppNamespace() {\n List<AppNamespace> allPublicAppNamespace = appNamespaceService.findAllPublicAppNamespace();\n Assert.assertTrue(!ObjectUtils.isEmpty(allPublicAppNamespace));\n }", "class_method_signature": "AppNamespaceServiceTest.findAllPublicAppNa...
{ "fields": [ { "declarator": "appNamespaceRepository", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppNamespaceRepository appNamespaceRepository;", "type": "AppNamespaceRepository", "var_name": "appNamespaceRepository" }, { "decla...
{ "body": "public List<AppNamespace> findAllPublicAppNamespace() {\n List<AppNamespace> appNamespaces = appNamespaceRepository.findAllByAppNamespaceType(AppNamespaceType.Public);\n return appNamespaces;\n }", "class_method_signature": "AppNamespaceService.findAllPublicAppNamespace()", "constructo...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_12
{ "fields": [ { "declarator": "appController", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppController appController;", "type": "AppController", "var_name": "appController" }, { "declarator": "appRepository", "modifier": "@...
{ "body": "@Test\n public void create() {\n User user = userRepository.findAll().get(0);\n\n AppModel appModel = new AppModel(\"阿波罗测试项目\", \"apollo-test\", user.getDepartment().getId(), user.getId(), null);\n Result<App> appResult = appController.create(appModel);\n\n Assert.assertTrue(...
{ "fields": [ { "declarator": "appService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppService appService;", "type": "AppService", "var_name": "appService" }, { "declarator": "serverConfigUtil", "modifier": "@Autowired\n ...
{ "body": "@PostMapping\n @ApiOperation(\"创建项目\")\n @AppPreAuthorize(AppPreAuthorize.Authorize.SuperAdmin)\n public Result<App> create(@Valid @RequestBody AppModel appModel) {\n\n\n App app = appService.createApp(appModel);\n\n return ok(app);\n }", "class_method_signature": "AppController...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_13
{ "fields": [ { "declarator": "appController", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppController appController;", "type": "AppController", "var_name": "appController" }, { "declarator": "appRepository", "modifier": "@...
{ "body": "@Test\n public void searchByAppCodeOrAppName() {\n Result<PageData<App>> pageDataResult = appController.searchByAppCodeOrAppName(\"apollo\", 1, 10);\n\n Assert.assertTrue(pageDataResult.success());\n }", "class_method_signature": "AppControllerTest.searchByAppCodeOrAppName()", "cons...
{ "fields": [ { "declarator": "appService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppService appService;", "type": "AppService", "var_name": "appService" }, { "declarator": "serverConfigUtil", "modifier": "@Autowired\n ...
{ "body": "@GetMapping(\"/search\")\n @ApiOperation(\"查询项目\")\n public Result<PageData<App>> searchByAppCodeOrAppName(@RequestParam(required = false) String query, @RequestParam(defaultValue = \"1\") int page, @RequestParam(defaultValue = \"20\") int size) {\n Pageable pageable = PageRequest.of(page - 1,...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_3
{ "fields": [ { "declarator": "appNamespaceService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppNamespaceService appNamespaceService;", "type": "AppNamespaceService", "var_name": "appNamespaceService" } ], "file": "apollo/apollo-port...
{ "body": "@Test\n public void findAllProtectAppNamespaceByAuthorized() {\n String appCode = \"apollo-mini\";\n List<AppNamespace> allProtectAppNamespaceByAuthorized = appNamespaceService.findAllProtectAppNamespaceByAuthorized(appCode);\n\n Assert.assertTrue(!ObjectUtils.isEmpty(allProtectAppN...
{ "fields": [ { "declarator": "appNamespaceRepository", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppNamespaceRepository appNamespaceRepository;", "type": "AppNamespaceRepository", "var_name": "appNamespaceRepository" }, { "decla...
{ "body": "public List<AppNamespace> findAllProtectAppNamespaceByAuthorized(String appCode) {\n App app = appRepository.findByAppCode(appCode);\n YyAssert.paramCheck(ObjectUtils.isEmpty(app), \"appCode not exists\");\n List<AppNamespace> appNamespaces = appNamespaceRepository.findAllByAppNamespac...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_4
{ "fields": [ { "declarator": "appEnvClusterService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppEnvClusterService appEnvClusterService;", "type": "AppEnvClusterService", "var_name": "appEnvClusterService" } ], "file": "apollo/apollo...
{ "body": "@Test\n public void findClusters() {\n String env = \"dev\";\n long appId = 35l;\n List<AppEnvCluster> clusters = appEnvClusterService.findClusters(env, appId);\n }", "class_method_signature": "AppEnvClusterServiceTest.findClusters()", "constructor": false, "full_signature"...
{ "fields": [ { "declarator": "appEnvClusterFactory", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppEnvClusterFactory appEnvClusterFactory;", "type": "AppEnvClusterFactory", "var_name": "appEnvClusterFactory" }, { "declarator": "a...
{ "body": "public List<AppEnvCluster> findClusters(String env, long appId) {\n return appEnvClusterRepository.findByAppIdAndEnv(appId, env);\n }", "class_method_signature": "AppEnvClusterService.findClusters(String env, long appId)", "constructor": false, "full_signature": "public List<AppEnvCluster> ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_14
{ "fields": [ { "declarator": "appController", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppController appController;", "type": "AppController", "var_name": "appController" }, { "declarator": "appRepository", "modifier": "@...
{ "body": "@Test\n public void update() {\n App app = appRepository.findAll().get(0);\n AppModel appModel = new AppModel(\"配置中心演示项目\", \"apollo-test\", app.getDepartment().getId(), app.getAppOwner().getId(), null);\n\n Result<App> updateResult = appController.update(app.getId(), appModel);\n ...
{ "fields": [ { "declarator": "appService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppService appService;", "type": "AppService", "var_name": "appService" }, { "declarator": "serverConfigUtil", "modifier": "@Autowired\n ...
{ "body": "@PutMapping(\"/{appId:\\\\d+}\")\n @ApiOperation(\"修改项目信息\")\n @AppPreAuthorize(AppPreAuthorize.Authorize.AppOwner)\n public Result<App> update(@PathVariable Long appId, @Valid @RequestBody AppModel appModel) {\n App app = new App(appModel);\n app.setId(appId);\n\n App updated...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_8
{ "fields": [ { "declarator": "instanceController", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private InstanceController instanceController;", "type": "InstanceController", "var_name": "instanceController" }, { "declarator": "namespaceRe...
{ "body": "@Test\n public void getByRelease() {\n\n PageQuery<Long> longPageQuery = new PageQuery();\n Result<PageDTO<InstanceDTO>> byRelease = instanceController.getByRelease(longPageQuery);\n\n }", "class_method_signature": "InstanceControllerTest.getByRelease()", "constructor": false, "fu...
{ "fields": [ { "declarator": "instanceService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private InstanceService instanceService;", "type": "InstanceService", "var_name": "instanceService" }, { "declarator": "RELEASES_SPLITTER = Splitt...
{ "body": "@ApiOperation(\"使用最新配置实例\")\n @PostMapping(value = \"by-release\")\n public Result<PageDTO<InstanceDTO>> getByRelease(@RequestBody PageQuery<Long> releasePage) {\n Pageable pageable = PageRequest.of(releasePage.getPageNo(), releasePage.getPageSize());\n //最新的releaseId\n Long rele...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_18
{ "fields": [ { "declarator": "username = \"gary\"", "modifier": "private", "original_string": "private String username = \"gary\";", "type": "String", "var_name": "username" }, { "declarator": "password = \"123456\"", "modifier": "private", "original_string...
{ "body": "@Test\n public void addUser() {\n\n UserAddReqDTO userAddReqDTO = createUserAddReqDTO();\n userController.add(userAddReqDTO);\n }", "class_method_signature": "UserControllerTest.addUser()", "constructor": false, "full_signature": "@Test public void addUser()", "identifier": "add...
{ "fields": [ { "declarator": "userService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private UserService userService;", "type": "UserService", "var_name": "userService" } ], "file": "upms/upms-domain/upms-domain-biz/src/main/java/com/yofish/...
{ "body": "@Override\n @PostMapping(\"/add\")\n public Result<Long> add(@Valid @RequestBody UserAddReqDTO userAddReqDTO) {\n Long userId = userService.add(userAddReqDTO);\n return ok(userId);\n }", "class_method_signature": "UserController.add(@Valid @RequestBody UserAddReqDTO userAddReqDTO)"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_9
{ "fields": [ { "declarator": "instanceController", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private InstanceController instanceController;", "type": "InstanceController", "var_name": "instanceController" }, { "declarator": "namespaceRe...
{ "body": "@Test\n public void getByNamespace() {\n Long namespaceId = namespaceRepository.findAll().get(0).getId();\n\n PageQuery<InstanceNamespaceReq> instanceNamespaceReqPageQuery = createPageQuery(namespaceId);\n instanceController.getByNamespace(instanceNamespaceReqPageQuery);\n }", ...
{ "fields": [ { "declarator": "instanceService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private InstanceService instanceService;", "type": "InstanceService", "var_name": "instanceService" }, { "declarator": "RELEASES_SPLITTER = Splitt...
{ "body": "@ApiOperation(\"所有实例\")\n @PostMapping(value = \"by-namespace\")\n public Result<PageDTO<InstanceDTO>> getByNamespace(@RequestBody PageQuery<InstanceNamespaceReq> instancePageQuery) {\n Pageable pageable = PageRequest.of(instancePageQuery.getPageNo(), instancePageQuery.getPageSize());\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_15
{ "fields": [ { "declarator": "appController", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppController appController;", "type": "AppController", "var_name": "appController" }, { "declarator": "appRepository", "modifier": "@...
{ "body": "@Test\n public void getAppByCode() {\n Result<App> appByCode = appController.getAppByCode(\"apollo-test\");\n\n Assert.assertTrue(appByCode.success());\n }", "class_method_signature": "AppControllerTest.getAppByCode()", "constructor": false, "full_signature": "@Test public void ge...
{ "fields": [ { "declarator": "appService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppService appService;", "type": "AppService", "var_name": "appService" }, { "declarator": "serverConfigUtil", "modifier": "@Autowired\n ...
{ "body": "@GetMapping(\"/code/{appCode:[0-9a-zA-Z_.-]+}\")\n @ApiOperation(\"查询项目信息\")\n public Result<App> getAppByCode(@PathVariable String appCode) {\n App app = appService.getAppByCode(appCode);\n if (app == null) {\n throw new BizException(BaseResultCode.REQUEST_PARAMS_WRONG, \"项目...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
220952727_5
{ "fields": [ { "declarator": "appEnvClusterService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppEnvClusterService appEnvClusterService;", "type": "AppEnvClusterService", "var_name": "appEnvClusterService" } ], "file": "apollo/apollo...
{ "body": "@Test\n public void createAppEnvCluster() {\n String clusterName = \"cluster-test\";\n String env = \"dev\";\n App app = new App(35L);\n AppEnvCluster appEnvCluster = new AppEnvCluster(clusterName, env, app);\n\n// appEnvCluster = appEnvClusterService.createAppEnvClust...
{ "fields": [ { "declarator": "appEnvClusterFactory", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private AppEnvClusterFactory appEnvClusterFactory;", "type": "AppEnvClusterFactory", "var_name": "appEnvClusterFactory" }, { "declarator": "a...
{ "body": "public List<AppEnvCluster> createAppEnvCluster(CreateClusterReqDTO createClusterReqDTO) {\n return appEnvClusterFactory.createAppEnvClusters(createClusterReqDTO);\n }", "class_method_signature": "AppEnvClusterService.createAppEnvCluster(CreateClusterReqDTO createClusterReqDTO)", "constructor"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 220952727, "size": 21529, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/garyxiong123/yyconfig" }
32289221_1
{ "fields": [ { "declarator": "KEY = \"submarine\"", "modifier": "private static final", "original_string": "private static final String KEY = \"submarine\";", "type": "String", "var_name": "KEY" }, { "declarator": "FAMILY = \"family\"", "modifier": "private stati...
{ "body": "@Test\n public void testFormatKey() throws Exception {\n assertEquals(KEY, mFormatter.formatKey(null, KEY, null));\n assertEquals(FAMILY + \"_\" + KEY, mFormatter.formatKey(null, KEY, FAMILY));\n assertEquals(PREFIX + FAMILY + \"_\" + KEY, mFormatter.formatKey(PREFIX, KEY, FAMILY));...
{ "fields": [], "file": "resourcemirror/src/main/java/uk/co/alt236/resourcemirror/reflectors/base/ResourceKeyFormatter.java", "identifier": "ResourceKeyFormatter", "interfaces": "", "methods": [ { "class_method_signature": "ResourceKeyFormatter.formatKey(@NonNull final String name,\n ...
{ "body": "public String formatKey(@NonNull final String name,\n @Nullable final String family) {\n if (TextUtils.isEmpty(family)) {\n return name;\n } else {\n return family.concat(\"_\").concat(name);\n }\n }", "class_method_signature": "Res...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32289221, "size": 609, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/alt236/Resource-Mirror---Android" }
32289221_0
{ "fields": [ { "declarator": "KEY = \"submarine\"", "modifier": "private static final", "original_string": "private static final String KEY = \"submarine\";", "type": "String", "var_name": "KEY" }, { "declarator": "FAMILY = \"family\"", "modifier": "private stati...
{ "body": "@Test\n public void testFormatKey1() throws Exception {\n assertEquals(KEY, mFormatter.formatKey(KEY, null));\n assertEquals(FAMILY + \"_\" + KEY, mFormatter.formatKey(KEY, FAMILY));\n }", "class_method_signature": "ResourceKeyFormatterTest.testFormatKey1()", "constructor": false, ...
{ "fields": [], "file": "resourcemirror/src/main/java/uk/co/alt236/resourcemirror/reflectors/base/ResourceKeyFormatter.java", "identifier": "ResourceKeyFormatter", "interfaces": "", "methods": [ { "class_method_signature": "ResourceKeyFormatter.formatKey(@NonNull final String name,\n ...
{ "body": "public String formatKey(@NonNull final String name,\n @Nullable final String family) {\n if (TextUtils.isEmpty(family)) {\n return name;\n } else {\n return family.concat(\"_\").concat(name);\n }\n }", "class_method_signature": "Res...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32289221, "size": 609, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/alt236/Resource-Mirror---Android" }
58555246_26
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private final", "original_string": "private final ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" }, { "declarator": "commitCompletedTransformer = new Comm...
{ "body": "@Test\n public void should_transform_commit_completed_event_to_object() throws Exception {\n // given\n NSQMessage nsqMessage = mock(NSQMessage.class);\n when(nsqMessage.getMessage()).thenReturn((\"\" +\n \"{\" +\n \" 'header':{\" +\n \...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CommitCompletedTransformer.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CommitCompletedTransformer.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n public CommitCompletedEvent apply(NSQMessage nsqMessage) throws Exception {\n CommitCompleted payload = objectMapper.readValue(nsqMessage.getMessage(), CommitCompleted.class);\n\n LOGGER.debug(\"received an new CommitSuccesEvent with cid {}\", payload.getHeader().getCorrelation...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_30
{ "fields": [ { "declarator": "nsqDispatcher = mock(NSQDispatcher.class)", "modifier": "private final", "original_string": "private final NSQDispatcher nsqDispatcher = mock(NSQDispatcher.class);", "type": "NSQDispatcher", "var_name": "nsqDispatcher" }, { "declarator": "...
{ "body": "@Test\n public void should_not_send_event_to_dispatcher_when_application_is_null() throws Exception {\n // given\n context.put(\"application\", null);\n doThrow(new RuntimeException()).when(nsqDispatcher).sendCommitRequested(commitRequestedEvent, \"hap\", \"app\", \"ptf\", \"bind\")...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CommitRequestedSubscriber.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CommitRequestedSubscriber.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void accept(CommitRequestedEvent commitRequestedEvent) {\n\n EntryPoint configuration = commitRequestedEvent.getConfiguration();\n Map<String, String> context = configuration.getContext();\n\n Optional.ofNullable(context.get(\"application\")).ifPresent(application...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_67
{ "fields": [], "file": "admin/admin-consul/src/test/java/com/vsct/dt/strowgr/admin/repository/consul/ConsulReaderTest.java", "identifier": "ConsulReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_throw_exception_when_status_out_of_range_200_299() {\n for (int status = 100; status < 600; status++) {\n if (status >= 200 && status < 300) continue; // skip\n // given\n HttpResponse httpResponse = mock(HttpResponse.class);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConsulReader.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConsulReader.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "<T> Optional<T> parseHttpResponse(HttpResponse httpResponse, Function<HttpEntity, Optional<T>> method) throws ClientProtocolException {\n return parseHttpResponse(httpResponse, method, false);\n }", "class_method_signature": "ConsulReader.parseHttpResponse(HttpResponse httpResponse, Function<Ht...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_10
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void server_registration_should_do_nothing_if_there_is_no_configuration_at_all() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n IncomingEntryPointBackendServer server = new IncomingEntryPointBackendServer(\"ijklm\", \"10.98.71.1\", \"9090\", new HashMa...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_2
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void try_commit_pending_applies_with_right_key() throws IncompleteConfigurationException {\n // Given\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n String correlationId = CorrelationId.newCorrelationId();\n TryCommitPendingConfigurationEve...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_47
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void try_commit_pending_entry_point_should_send_event_to_subscriber() throws Exception {\n // given\n String entryPointKey = \"entryPointKey\";\n @SuppressWarnings(\"unchecked\")\n ArgumentCaptor<TryCommitPendingConfigurationEvent> tryCommitPendingEntryPointCap...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@POST\n @Path(\"/{id : .+}/try-commit-pending\")\n @Produces(MediaType.TEXT_PLAIN)\n public String tryCommitPending(@Auth final User user, @PathParam(\"id\") String id) {\n TryCommitPendingConfigurationEvent event = new TryCommitPendingConfigurationEvent(CorrelationId.newCorrelationId(), ne...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_51
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void send_commit_failure_should_send_event_to_subscriber() throws Exception {\n // given\n ArgumentCaptor<CommitFailedEvent> commitFailureCaptor = ArgumentCaptor.forClass(CommitFailedEvent.class);\n\n // when\n entryPointResources.sendCommitFailure(USER_PROD, \...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@POST\n @Path(\"/{id : .+}/send-commit-failure/{correlationId}\")\n @Produces(MediaType.TEXT_PLAIN)\n public String sendCommitFailure(@Auth final User user,\n \t\t\t\t\t\t\t\t\t@PathParam(\"id\") String id, @PathParam(\"correlationId\") String correlationId) {\n CommitFailedEvent event =...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_50
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void send_commit_success_should_send_event_to_subscriber() throws Exception {\n // given\n ArgumentCaptor<CommitCompletedEvent> commitSuccessCaptor = ArgumentCaptor.forClass(CommitCompletedEvent.class);\n\n // when\n entryPointResources.sendCommitSuccess(USER_P...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@POST\n @Path(\"/{id : .+}/send-commit-success/{correlationId}\")\n @Produces(MediaType.TEXT_PLAIN)\n public String sendCommitSuccess(@Auth final User user, \n \t\t\t\t\t\t\t\t\t@PathParam(\"id\") String id, @PathParam(\"correlationId\") String correlationId) {\n CommitCompletedEvent eve...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_3
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void try_commit_pending_with_no_autoreload_haproxy() throws IncompleteConfigurationException {\n // Given\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n String correlationId = CorrelationId.newCorrelationId();\n TryCommitPendingConfiguratio...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_46
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void should_return_500_when_repository_cannot_remove_entry_point_delete_entry_point() {\n // given\n when(entryPointRepository.removeEntrypoint(any(EntryPointKey.class))).thenReturn(Optional.empty());\n when(entryPointRepository.getCurrentConfiguration(any(EntryPointK...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@DELETE\n @Path(\"/{id : .+}\")\n @Timed\n public Response deleteEntrypoint(@Auth final User user, @PathParam(\"id\") String id) {\n final Response response;\n\n // first get the current entrypoint configuration, if exists\n EntryPointKeyVsctImpl entryPointKey = EntryPointKeyV...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_11
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void server_registration_should_change_configuration_based_on_pending_one() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n IncomingEntryPointBackendServer server = new IncomingEntryPointBackendServer(\"ijklm\", \"10.98.71.1\", \"9090\", new HashMap<>()...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_66
{ "fields": [], "file": "admin/admin-consul/src/test/java/com/vsct/dt/strowgr/admin/repository/consul/ConsulRepositoryTest.java", "identifier": "ConsulRepositoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalStateException.class)\n public void should_throw_exception_if_all_port_used() throws IOException {\n // given\n ConsulReader consulReader = mock(ConsulReader.class);\n CloseableHttpClient closeableHttpClient = mock(CloseableHttpClient.class);\n try {\n...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConsulRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConsulRepository.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public Integer newPort(String key) {\n int newPort = -1;\n try {\n boolean failToPutNewPort = true;\n while (failToPutNewPort) {\n HttpGet getPortById = new HttpGet(\"http://\" + host + \":\" + port + \"/v1/kv/ports\");\n Opti...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_31
{ "fields": [ { "declarator": "nsqDispatcher = mock(NSQDispatcher.class)", "modifier": "private final", "original_string": "private final NSQDispatcher nsqDispatcher = mock(NSQDispatcher.class);", "type": "NSQDispatcher", "var_name": "nsqDispatcher" }, { "declarator": "...
{ "body": "@Test\n public void should_not_send_event_to_dispatcher_when_platform_is_null() throws Exception {\n // given\n context.put(\"platform\", null);\n doThrow(new RuntimeException()).when(nsqDispatcher).sendCommitRequested(commitRequestedEvent, \"hap\", \"app\", \"ptf\", \"bind\");\n\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CommitRequestedSubscriber.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CommitRequestedSubscriber.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void accept(CommitRequestedEvent commitRequestedEvent) {\n\n EntryPoint configuration = commitRequestedEvent.getConfiguration();\n Map<String, String> context = configuration.getContext();\n\n Optional.ofNullable(context.get(\"application\")).ifPresent(application...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_27
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private final", "original_string": "private final ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" }, { "declarator": "registerServerTransformer = new Regis...
{ "body": "@Test\n public void should_transform_register_server_event_to_object() throws Exception {\n // given\n NSQMessage nsqMessage = mock(NSQMessage.class);\n when(nsqMessage.getMessage()).thenReturn((\"\" +\n \"{\" +\n \" 'header':{\" +\n \"...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(RegisterServerTransformer.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RegisterServerTransformer.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public RegisterServerEvent apply(NSQMessage nsqMessage) throws Exception {\n RegisterServer payload = objectMapper.readValue(nsqMessage.getMessage(), RegisterServer.class);\n\n LOGGER.debug(\"received an new RegisterServerEvent with cid {}\", payload.getHeader().getCorrelationI...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_16
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void server_registration_should_erase_hostname_ip_port_and_context_attributed_to_the_same_server_id() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n Map<String, String> oldServerContext = new HashMap<>();\n oldServerContext.put(\"key1\", \"value...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_4
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void commit_success_event_does_nothing_if_commit_correlationid_does_not_exists() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n CommitCompletedEvent event = new CommitCompletedEvent(CorrelationId.newCorrelationId(), key);\n\n when(stateManager.l...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_41
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void add_entry_point_should_call_resume_with_error_on_handler_error() throws Exception {\n // given\n EntryPointMappingJson entryPoint = mock(EntryPointMappingJson.class);\n AsyncResponse asyncResponse = mock(AsyncResponse.class);\n String entryPointKey = \"ent...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@PUT\n @Path(\"/{id : .+}\")\n @Timed\n public void addEntryPoint(@Auth final User user, @Suspended AsyncResponse asyncResponse, @PathParam(\"id\") String key, @Valid EntryPointMappingJson configuration) {\n EntryPointKey entryPointKey = new EntryPointKeyDefaultImpl(key);\n\n addEntr...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_57
{ "fields": [ { "declarator": "repository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository repository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "repository" }, { ...
{ "body": "@Test\n public void should_build_empty_flowable_when_repository_throws_exception() throws Exception {\n // given\n when(repository.getEntryPointsId()).thenThrow(new RuntimeException());\n\n // when\n Flowable<String> flowable = entryPointPublisher.apply(0L);\n\n // the...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointPublisher.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointPublisher.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@Override\n public Flowable<T> apply(Long n) {\n try {\n return Flowable.fromIterable(entryPointRepository.getEntryPointsId()).map(provider);\n } catch (Exception e) {\n LOGGER.error(\"Unable to lookup entry points.\", e);\n return Flowable.empty();\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_8
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void commit_failure_event_does_nothing_if_the_correlation_id_does_not_match_the_event_that_trigerred_it() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n CommitFailedEvent commitFailedEvent = new CommitFailedEvent(CorrelationId.newCorrelationId(), key);...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_20
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void should_update_configuration_when_entry_point_has_committing_configuration() {\n // given\n EntryPoint committing = mock(EntryPoint.class);\n EntryPoint expected = mock(EntryPoint.class);\n when(committing.mergeWithUpdate(updatedEntryPoint)).thenReturn(expe...
{ "fields": [ { "declarator": "stateManager", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager;", "type": "EntryPointStateManager", "var_name": "stateManager" } ], "file": "admin/admin-core/src/main/java/com/vsct/dt/strowgr/ad...
{ "body": "@Override\n public void accept(UpdateEntryPointEvent updateEntryPointEvent) {\n\n EntryPointKey entryPointKey = updateEntryPointEvent.getKey();\n\n try {\n\n if (!this.stateManager.lock(entryPointKey)) {\n throw new IllegalStateException(\"Could not acquire lock f...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_36
{ "fields": [], "file": "admin/admin-gui/src/test/java/com/vsct/dt/strowgr/admin/gui/resource/api/AdminResourcesTest.java", "identifier": "AdminResourcesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_return_current_version() throws IOException, URISyntaxException {\n // given\n String versionExpected = new String(Files.readAllBytes(Paths.get(ClassLoader.getSystemResource(\"version-expected\").toURI())));\n\n // test\n String version = new AdminR...
{ "fields": [ { "declarator": "nsqLookup", "modifier": "private final", "original_string": "private final NSQLookup nsqLookup;", "type": "NSQLookup", "var_name": "nsqLookup" } ], "file": "admin/admin-gui/src/main/java/com/vsct/dt/strowgr/admin/gui/resource/api/AdminResources....
{ "body": "@GET\n @Path(\"/version\")\n public String version() throws IOException, URISyntaxException {\n return new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/version\"))).readLine();\n }", "class_method_signature": "AdminResources.version()", "constructor": false, ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_61
{ "fields": [], "file": "admin/admin-consul/src/test/java/com/vsct/dt/strowgr/admin/repository/consul/ConsulRepositoryTest.java", "identifier": "ConsulRepositoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_return_autoreload_false_if_entrypoint_disabled_key_is_absent() throws IOException {\n // given\n ConsulReader consulReader = mock(ConsulReader.class);\n CloseableHttpClient closeableHttpClient = mock(CloseableHttpClient.class);\n ConsulRepository co...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConsulRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConsulRepository.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public boolean isAutoreloaded(EntryPointKey entryPointKey) {\n boolean isAutoreloaded = false;\n HttpGet getEntryPointAutoreloadKey = new HttpGet(\"http://\" + host + \":\" + port + \"/v1/kv/admin/\" + entryPointKey.getID() + \"/autoreload?raw\");\n try {\n Op...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_60
{ "fields": [], "file": "admin/admin-gui/src/test/java/com/vsct/dt/strowgr/admin/gui/cli/ConfigurationCommandTest.java", "identifier": "ConfigurationCommandTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_generate_default_configuration_without_null() throws JsonProcessingException {\n // given\n ConfigurationCommand configurationCommand = new ConfigurationCommand();\n\n // test\n String configuration = configurationCommand.generateConfiguration();\n ...
{ "fields": [], "file": "admin/admin-gui/src/main/java/com/vsct/dt/strowgr/admin/gui/cli/ConfigurationCommand.java", "identifier": "ConfigurationCommand", "interfaces": "", "methods": [ { "class_method_signature": "ConfigurationCommand.ConfigurationCommand()", "constructor": true, "full_...
{ "body": "String generateConfiguration() throws JsonProcessingException {\n // initialize configuration\n StrowgrConfiguration configuration = new StrowgrConfiguration();\n configuration.setConsulRepositoryFactory(new ConsulRepositoryFactory());\n configuration.setNsqLookupfactory(new NSQ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_37
{ "fields": [], "file": "admin/admin-gui/src/test/java/com/vsct/dt/strowgr/admin/gui/resource/api/AdminResourcesTest.java", "identifier": "AdminResourcesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_return_list_of_nsqlookup() throws IOException, URISyntaxException {\n // given\n NSQLookup nsqLookup = mock(NSQLookup.class);\n HashSet<ServerAddress> serverAddresses = new HashSet<>();\n serverAddresses.add(new ServerAddress(\"localhost\", 1234));\...
{ "fields": [ { "declarator": "nsqLookup", "modifier": "private final", "original_string": "private final NSQLookup nsqLookup;", "type": "NSQLookup", "var_name": "nsqLookup" } ], "file": "admin/admin-gui/src/main/java/com/vsct/dt/strowgr/admin/gui/resource/api/AdminResources....
{ "body": "@GET\n @Path(\"/nsqlookup/{topic : .+}\")\n public String lookupTopic(@PathParam(\"topic\") String topic) throws IOException, URISyntaxException {\n \tLoggerFactory.getLogger(AdminResources.class).debug(\"lookup for topic {}\", topic);\n return nsqLookup.lookup(topic).stream().map(ServerAdd...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_21
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void should_update_configuration_when_entry_point_has_no_pending_and_no_committing_configuration() {\n // given\n EntryPoint current = mock(EntryPoint.class);\n EntryPoint expected = mock(EntryPoint.class);\n when(current.mergeWithUpdate(updatedEntryPoint)).the...
{ "fields": [ { "declarator": "stateManager", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager;", "type": "EntryPointStateManager", "var_name": "stateManager" } ], "file": "admin/admin-core/src/main/java/com/vsct/dt/strowgr/ad...
{ "body": "@Override\n public void accept(UpdateEntryPointEvent updateEntryPointEvent) {\n\n EntryPointKey entryPointKey = updateEntryPointEvent.getKey();\n\n try {\n\n if (!this.stateManager.lock(entryPointKey)) {\n throw new IllegalStateException(\"Could not acquire lock f...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_9
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void commit_failure_event_removes_committing_configuration_if_correlation_id_matches() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n String correlationId = CorrelationId.newCorrelationId();\n CommitFailedEvent commitFailedEvent = new CommitFail...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_56
{ "fields": [ { "declarator": "repository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository repository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "repository" }, { ...
{ "body": "@Test\n public void should_build_flowable_with_mapped_list_of_entry_points_from_repository() throws Exception {\n // given\n when(repository.getEntryPointsId()).thenReturn(new HashSet<>(Arrays.asList(\"ep1\", \"ep2\")));\n\n // when\n Flowable<String> flowable = entryPointPub...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointPublisher.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointPublisher.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@Override\n public Flowable<T> apply(Long n) {\n try {\n return Flowable.fromIterable(entryPointRepository.getEntryPointsId()).map(provider);\n } catch (Exception e) {\n LOGGER.error(\"Unable to lookup entry points.\", e);\n return Flowable.empty();\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_5
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void commit_success_event_does_nothing_if_commit_correlationid_does_not_match() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n CommitCompletedEvent event = new CommitCompletedEvent(CorrelationId.newCorrelationId(), key);\n\n when(stateManager.lo...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_40
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void add_entry_point_should_return_created_response_on_handler_success() throws Exception {\n // given\n EntryPointMappingJson entryPoint = mock(EntryPointMappingJson.class);\n AsyncResponse asyncResponse = mock(AsyncResponse.class);\n String entryPointKey = \"...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@PUT\n @Path(\"/{id : .+}\")\n @Timed\n public void addEntryPoint(@Auth final User user, @Suspended AsyncResponse asyncResponse, @PathParam(\"id\") String key, @Valid EntryPointMappingJson configuration) {\n EntryPointKey entryPointKey = new EntryPointKeyDefaultImpl(key);\n\n addEntr...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_17
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void server_registration_should_not_erase_user_provided_context_attributed_to_the_same_server_id() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n Map<String, String> oldServerContext = new HashMap<>();\n oldServerContext.put(\"key1\", \"value1\"...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_38
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void swap_auto_reload_should_return_partial_response_on_handler_success() throws Exception {\n // given\n AsyncResponse asyncResponse = mock(AsyncResponse.class);\n String entryPointKey = \"entryPointKey\";\n ArgumentCaptor<Response> responseCaptor = ArgumentCa...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@PATCH\n @Path(\"/{id : .+}/autoreload/swap\")\n public void swapAutoReload(@Auth final User user, @Suspended AsyncResponse asyncResponse, @PathParam(\"id\") String key) {\n\n EntryPointKey entryPointKey = new EntryPointKeyDefaultImpl(key);\n\n autoReloadConfigSubscriber.onNext(new Auto...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_55
{ "fields": [ { "declarator": "repository = mock(ConsulRepository.class)", "modifier": "private", "original_string": "private ConsulRepository repository = mock(ConsulRepository.class);", "type": "ConsulRepository", "var_name": "repository" }, { "declarator": "HAProxyPu...
{ "body": "@Test\n public void should_publish_empty_actions_when_repository_throws_exception() {\n // given\n when(repository.getHaproxyIds()).thenThrow(new RuntimeException());\n\n // when\n Flowable<HAProxyAction> flowable = HAProxyPublisher.apply(0L);\n\n // then\n List...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(HAProxyPublisher.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(HAProxyPublisher.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public Flowable<HAProxyAction> apply(Long n) {\n\n LOGGER.debug(\"Lookup registration actions for HAProxy instances\");\n\n try {\n\n List<HAProxyAction> actions = new ArrayList<>();\n\n final Set<String> currentIdSet = repository.getHaproxyIds();\n\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_6
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void commit_success_event_applies_commit_if_correlation_id_matches() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n String correlationId = CorrelationId.newCorrelationId();\n CommitCompletedEvent event = new CommitCompletedEvent(correlationId, k...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_43
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void update_entry_point_should_call_resume_with_error_on_handler_error() throws Exception {\n // given\n UpdatedEntryPointMappingJson updatedEntryPointMappingJson = mock(UpdatedEntryPointMappingJson.class);\n AsyncResponse asyncResponse = mock(AsyncResponse.class);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@PATCH\n @Path(\"/{id : .+}\")\n @Timed\n public void updateEntryPoint(@Auth final User user, @Suspended AsyncResponse asyncResponse, @PathParam(\"id\") String id, @Valid UpdatedEntryPointMappingJson updatedConfiguration) {\n\n updateEntryPointSubscriber.onNext(new UpdateEntryPointEvent(Cor...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_14
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void server_registration_should_create_a_new_backend_with_no_context_if_the_backend_does_not_exists() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n IncomingEntryPointBackendServer server = new IncomingEntryPointBackendServer(\"ijklm\", \"10.98.71.1\",...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_63
{ "fields": [], "file": "admin/admin-consul/src/test/java/com/vsct/dt/strowgr/admin/repository/consul/ConsulRepositoryTest.java", "identifier": "ConsulRepositoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_return_autoreload_false_if_consul_request_fails() throws IOException {\n // given\n ConsulReader consulReader = mock(ConsulReader.class);\n CloseableHttpClient closeableHttpClient = mock(CloseableHttpClient.class);\n ConsulRepository consulRepositor...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConsulRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConsulRepository.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public boolean isAutoreloaded(EntryPointKey entryPointKey) {\n boolean isAutoreloaded = false;\n HttpGet getEntryPointAutoreloadKey = new HttpGet(\"http://\" + host + \":\" + port + \"/v1/kv/admin/\" + entryPointKey.getID() + \"/autoreload?raw\");\n try {\n Op...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_34
{ "fields": [ { "declarator": "flowable = Mockito.mock(FlowableNSQConsumer.class)", "modifier": "private final", "original_string": "private final FlowableNSQConsumer flowable = Mockito.mock(FlowableNSQConsumer.class);", "type": "FlowableNSQConsumer", "var_name": "flowable" }, ...
{ "body": "@Test\n public void should_shutdown_flowable_when_managed_consumer_is_stopped() throws Exception {\n // given\n\n // when\n managedNSQConsumer.stop();\n\n // then\n verify(flowable).shutdown();\n }", "class_method_signature": "ManagedNSQConsumerTest.should_shutdow...
{ "fields": [ { "declarator": "flowableNSQConsumer", "modifier": "private final", "original_string": "private final FlowableNSQConsumer<?> flowableNSQConsumer;", "type": "FlowableNSQConsumer<?>", "var_name": "flowableNSQConsumer" } ], "file": "admin/admin-gui/src/main/java/co...
{ "body": "@Override\n public void stop() throws Exception {\n flowableNSQConsumer.shutdown();\n }", "class_method_signature": "ManagedNSQConsumer.stop()", "constructor": false, "full_signature": "@Override public void stop()", "identifier": "stop", "invocations": [ "shutdown" ], "modif...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_22
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void should_call_on_error_when_entry_point_could_not_be_updated() {\n // given\n EntryPoint current = mock(EntryPoint.class);\n EntryPoint expected = mock(EntryPoint.class);\n when(stateManager.lock(entryPointKey)).thenReturn(true);\n when(stateManager.g...
{ "fields": [ { "declarator": "stateManager", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager;", "type": "EntryPointStateManager", "var_name": "stateManager" } ], "file": "admin/admin-core/src/main/java/com/vsct/dt/strowgr/ad...
{ "body": "@Override\n public void accept(UpdateEntryPointEvent updateEntryPointEvent) {\n\n EntryPointKey entryPointKey = updateEntryPointEvent.getKey();\n\n try {\n\n if (!this.stateManager.lock(entryPointKey)) {\n throw new IllegalStateException(\"Could not acquire lock f...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_59
{ "fields": [ { "declarator": "nsqConsumerBuilder = mock(Function.class)", "modifier": "@SuppressWarnings(\"unchecked\")\n private final", "original_string": "@SuppressWarnings(\"unchecked\")\n private final Function<String, FlowableNSQConsumer<Integer>> nsqConsumerBuilder = mock(Function....
{ "body": "@Test\n public void should_shutdown_nsq_consumer_on_unregister_action() throws Exception {\n // given\n @SuppressWarnings(\"unchecked\")\n FlowableNSQConsumer<Integer> nsqConsumer = mock(FlowableNSQConsumer.class);\n when(nsqConsumer.flowable()).thenReturn(Flowable.range(0, 1...
{ "fields": [ { "declarator": "nsqConsumers = new HashMap<>()", "modifier": "private final", "original_string": "private final Map<String, FlowableNSQConsumer<U>> nsqConsumers = new HashMap<>();", "type": "Map<String, FlowableNSQConsumer<U>>", "var_name": "nsqConsumers" }, { ...
{ "body": "@Override\n public void onNext(HAProxyPublisher.HAProxyAction action) {\n if (action.isRegistration()) {\n createNSQConsumer(action.getId());\n } else {\n deleteNSQConsumer(action.getId());\n }\n }", "class_method_signature": "HAProxySubscriber.onNext(HAPr...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_18
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void server_registration_should_remove_the_backend_from_the_backends_where_it_was_previously_registered_and_preserve_its_original_user_provided_context() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n\n Map<String, String> serverContext = new HashMap<>...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_19
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void should_update_configuration_when_entry_point_has_pending_configuration() {\n // given\n EntryPoint pending = mock(EntryPoint.class);\n EntryPoint expected = mock(EntryPoint.class);\n when(pending.mergeWithUpdate(updatedEntryPoint)).thenReturn(expected);\n ...
{ "fields": [ { "declarator": "stateManager", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager;", "type": "EntryPointStateManager", "var_name": "stateManager" } ], "file": "admin/admin-core/src/main/java/com/vsct/dt/strowgr/ad...
{ "body": "@Override\n public void accept(UpdateEntryPointEvent updateEntryPointEvent) {\n\n EntryPointKey entryPointKey = updateEntryPointEvent.getKey();\n\n try {\n\n if (!this.stateManager.lock(entryPointKey)) {\n throw new IllegalStateException(\"Could not acquire lock f...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_58
{ "fields": [ { "declarator": "nsqConsumerBuilder = mock(Function.class)", "modifier": "@SuppressWarnings(\"unchecked\")\n private final", "original_string": "@SuppressWarnings(\"unchecked\")\n private final Function<String, FlowableNSQConsumer<Integer>> nsqConsumerBuilder = mock(Function....
{ "body": "@Test\n public void should_create_nsq_consumer_on_ha_proxy_register_action_and_forward_nsq_consumers_messages_to_subscriber() throws Exception {\n // given\n @SuppressWarnings(\"unchecked\")\n FlowableNSQConsumer<Integer> nsqConsumer1 = mock(FlowableNSQConsumer.class);\n when...
{ "fields": [ { "declarator": "nsqConsumers = new HashMap<>()", "modifier": "private final", "original_string": "private final Map<String, FlowableNSQConsumer<U>> nsqConsumers = new HashMap<>();", "type": "Map<String, FlowableNSQConsumer<U>>", "var_name": "nsqConsumers" }, { ...
{ "body": "@Override\n public void onNext(HAProxyPublisher.HAProxyAction action) {\n if (action.isRegistration()) {\n createNSQConsumer(action.getId());\n } else {\n deleteNSQConsumer(action.getId());\n }\n }", "class_method_signature": "HAProxySubscriber.onNext(HAPr...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_23
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void should_call_on_error_when_entry_point_has_no_configuration_at_all() {\n // given\n when(stateManager.lock(entryPointKey)).thenReturn(true);\n when(stateManager.getCommittingConfiguration(entryPointKey)).thenReturn(Optional.empty());\n when(stateManager.get...
{ "fields": [ { "declarator": "stateManager", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager;", "type": "EntryPointStateManager", "var_name": "stateManager" } ], "file": "admin/admin-core/src/main/java/com/vsct/dt/strowgr/ad...
{ "body": "@Override\n public void accept(UpdateEntryPointEvent updateEntryPointEvent) {\n\n EntryPointKey entryPointKey = updateEntryPointEvent.getKey();\n\n try {\n\n if (!this.stateManager.lock(entryPointKey)) {\n throw new IllegalStateException(\"Could not acquire lock f...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_35
{ "fields": [ { "declarator": "testScheduler = new TestScheduler()", "modifier": "private final", "original_string": "private final TestScheduler testScheduler = new TestScheduler();", "type": "TestScheduler", "var_name": "testScheduler" }, { "declarator": "managedSched...
{ "body": "@Test\n public void should_not_start_item_emission_when_not_started() throws Exception {\n // given\n List<Long> results = new ArrayList<>();\n managedScheduledFlowable.getFlowable().subscribe(results::add);\n\n // when\n testScheduler.advanceTimeBy(2, TimeUnit.SECONDS...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ManagedScheduledFlowable.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ManagedScheduledFlowable.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public Flowable<Long> getFlowable() {\n return flowable;\n }", "class_method_signature": "ManagedScheduledFlowable.getFlowable()", "constructor": false, "full_signature": "public Flowable<Long> getFlowable()", "identifier": "getFlowable", "invocations": [], "modifiers": "public", "p...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_62
{ "fields": [], "file": "admin/admin-consul/src/test/java/com/vsct/dt/strowgr/admin/repository/consul/ConsulRepositoryTest.java", "identifier": "ConsulRepositoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_return_autoreload_false_if_entrypoint_disabled_key_valued_at_true() throws IOException {\n // given\n ConsulReader consulReader = mock(ConsulReader.class);\n CloseableHttpClient closeableHttpClient = mock(CloseableHttpClient.class);\n ConsulReposito...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConsulRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConsulRepository.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public boolean isAutoreloaded(EntryPointKey entryPointKey) {\n boolean isAutoreloaded = false;\n HttpGet getEntryPointAutoreloadKey = new HttpGet(\"http://\" + host + \":\" + port + \"/v1/kv/admin/\" + entryPointKey.getID() + \"/autoreload?raw\");\n try {\n Op...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_15
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void server_registration_should_not_erase_backend_context_if_backend_already_exists() {\n\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n IncomingEntryPointBackendServer server = new IncomingEntryPointBackendServer(\"ijklm\", \"10.98.71.1\", \"9090\", new...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_7
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void commit_failure_event_does_nothing_if_there_is_no_committing_configuration() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n CommitFailedEvent commitFailedEvent = new CommitFailedEvent(CorrelationId.newCorrelationId(), key);\n\n when(stateMan...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_42
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void update_entry_point_should_return_ok_response_on_handler_success() throws Exception {\n // given\n UpdatedEntryPointMappingJson updatedEntryPointMappingJson = mock(UpdatedEntryPointMappingJson.class);\n EntryPoint expected = mock(EntryPoint.class);\n AsyncR...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@PATCH\n @Path(\"/{id : .+}\")\n @Timed\n public void updateEntryPoint(@Auth final User user, @Suspended AsyncResponse asyncResponse, @PathParam(\"id\") String id, @Valid UpdatedEntryPointMappingJson updatedConfiguration) {\n\n updateEntryPointSubscriber.onNext(new UpdateEntryPointEvent(Cor...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_54
{ "fields": [ { "declarator": "repository = mock(ConsulRepository.class)", "modifier": "private", "original_string": "private ConsulRepository repository = mock(ConsulRepository.class);", "type": "ConsulRepository", "var_name": "repository" }, { "declarator": "HAProxyPu...
{ "body": "@Test\n public void should_publish_unregistration_actions_when_repository_returns_less_elements_than_previous_call() {\n // given\n when(repository.getHaproxyIds()).thenReturn(new HashSet<>(asList(\"hap1\", \"hap2\", \"hap3\", \"hap4\")));\n\n // when\n Flowable<HAProxyAction...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(HAProxyPublisher.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(HAProxyPublisher.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public Flowable<HAProxyAction> apply(Long n) {\n\n LOGGER.debug(\"Lookup registration actions for HAProxy instances\");\n\n try {\n\n List<HAProxyAction> actions = new ArrayList<>();\n\n final Set<String> currentIdSet = repository.getHaproxyIds();\n\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_39
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void swap_auto_reload_should_call_resume_with_error_on_handler_error() throws Exception {\n // given\n AsyncResponse asyncResponse = mock(AsyncResponse.class);\n String entryPointKey = \"entryPointKey\";\n RuntimeException exception = new RuntimeException();\n\...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@PATCH\n @Path(\"/{id : .+}/autoreload/swap\")\n public void swapAutoReload(@Auth final User user, @Suspended AsyncResponse asyncResponse, @PathParam(\"id\") String key) {\n\n EntryPointKey entryPointKey = new EntryPointKeyDefaultImpl(key);\n\n autoReloadConfigSubscriber.onNext(new Auto...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_65
{ "fields": [], "file": "admin/admin-consul/src/test/java/com/vsct/dt/strowgr/admin/repository/consul/ConsulRepositoryTest.java", "identifier": "ConsulRepositoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_init_ports_if_absent() throws IOException {\n // given\n ConsulReader consulReader = mock(ConsulReader.class);\n CloseableHttpClient closeableHttpClient = mock(CloseableHttpClient.class);\n ConsulRepository consulRepository = new ConsulRepository(\"...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConsulRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConsulRepository.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public void init() {\n try {\n putIfAbsent(\"ports\", \"{}\");\n putIfAbsent(\"haproxyversions\", \"[]\");\n putIfAbsent(\"haproxy/\", \"\");\n putIfAbsent(\"admin/\", \"\");\n } catch (Exception e) {\n LOGGER.warn(\"Can't ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_32
{ "fields": [ { "declarator": "nsqDispatcher = mock(NSQDispatcher.class)", "modifier": "private final", "original_string": "private final NSQDispatcher nsqDispatcher = mock(NSQDispatcher.class);", "type": "NSQDispatcher", "var_name": "nsqDispatcher" }, { "declarator": "...
{ "body": "@Test\n public void should_send_event_to_nsq_dispatcher() throws Exception {\n\n // when\n deleteEntryPointSubscriber.accept(deleteEntryPointEvent);\n\n // then\n verify(nsqDispatcher).sendDeleteRequested(\"cId\", \"hap\", \"app\", \"ptf\");\n }", "class_method_signature...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(DeleteEntryPointSubscriber.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(DeleteEntryPointSubscriber.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n public void accept(DeleteEntryPointEvent deleteEntryPointEvent) {\n\n try {\n nsqDispatcher.sendDeleteRequested(deleteEntryPointEvent.getCorrelationId(), deleteEntryPointEvent.getHaproxyName(), deleteEntryPointEvent.getApplication(), deleteEntryPointEvent.getPlatform());\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_24
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void should_call_on_error_when_lock_can_not_be_acquired() {\n // given\n when(stateManager.lock(entryPointKey)).thenReturn(false);\n\n // when\n updateEntryPointSubscriber.accept(event);\n\n // then\n verify(stateManager, never()).prepare(any(), a...
{ "fields": [ { "declarator": "stateManager", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager;", "type": "EntryPointStateManager", "var_name": "stateManager" } ], "file": "admin/admin-core/src/main/java/com/vsct/dt/strowgr/ad...
{ "body": "@Override\n public void accept(UpdateEntryPointEvent updateEntryPointEvent) {\n\n EntryPointKey entryPointKey = updateEntryPointEvent.getKey();\n\n try {\n\n if (!this.stateManager.lock(entryPointKey)) {\n throw new IllegalStateException(\"Could not acquire lock f...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_49
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void register_server_should_send_event_to_subscriber() throws Exception {\n // given\n IncomingEntryPointBackendServerJsonRepresentation incomingEntryPoint = mock(IncomingEntryPointBackendServerJsonRepresentation.class);\n ArgumentCaptor<RegisterServerEvent> registerS...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@POST\n @Path(\"/{id : .+}/backend/{backend}/register-server\")\n @Produces(MediaType.TEXT_PLAIN)\n public String registerServer( @Auth final User user, \n \t\t\t\t\t\t\t@PathParam(\"id\") String id,\n @PathParam(\"backend\") String backend,\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_28
{ "fields": [ { "declarator": "nsqDispatcher = mock(NSQDispatcher.class)", "modifier": "private final", "original_string": "private final NSQDispatcher nsqDispatcher = mock(NSQDispatcher.class);", "type": "NSQDispatcher", "var_name": "nsqDispatcher" }, { "declarator": "...
{ "body": "@Test\n public void should_send_event_to_dispatcher() throws Exception {\n // when\n commitRequestedSubscriber.accept(commitRequestedEvent);\n\n // then\n verify(nsqDispatcher).sendCommitRequested(commitRequestedEvent, \"hap\", \"app\", \"ptf\", \"bind\");\n }", "class_m...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CommitRequestedSubscriber.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CommitRequestedSubscriber.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void accept(CommitRequestedEvent commitRequestedEvent) {\n\n EntryPoint configuration = commitRequestedEvent.getConfiguration();\n Map<String, String> context = configuration.getContext();\n\n Optional.ofNullable(context.get(\"application\")).ifPresent(application...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_53
{ "fields": [ { "declarator": "repository = mock(ConsulRepository.class)", "modifier": "private", "original_string": "private ConsulRepository repository = mock(ConsulRepository.class);", "type": "ConsulRepository", "var_name": "repository" }, { "declarator": "HAProxyPu...
{ "body": "@Test\n public void should_publish_registration_actions_when_repository_returns_more_elements_than_previous_call() {\n // given\n when(repository.getHaproxyIds()).thenReturn(new HashSet<>(asList(\"hap1\", \"hap2\")));\n\n // when\n Flowable<HAProxyAction> flowable1 = HAProxyP...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(HAProxyPublisher.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(HAProxyPublisher.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public Flowable<HAProxyAction> apply(Long n) {\n\n LOGGER.debug(\"Lookup registration actions for HAProxy instances\");\n\n try {\n\n List<HAProxyAction> actions = new ArrayList<>();\n\n final Set<String> currentIdSet = repository.getHaproxyIds();\n\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_0
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void try_commit_current_applies_with_right_key() throws IncompleteConfigurationException {\n // Given\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n String correlationId = CorrelationId.newCorrelationId();\n TryCommitCurrentConfigurationEve...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_45
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void should_not_post_delete_event_and_return_404_when_delete_an_non_existing_entry_point() {\n // given\n when(entryPointRepository.getCurrentConfiguration(any(EntryPointKey.class))).thenReturn(Optional.of(new EntryPoint(\"default-name\", \"hapadm\", \"hapVersion\", 0, new H...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@DELETE\n @Path(\"/{id : .+}\")\n @Timed\n public Response deleteEntrypoint(@Auth final User user, @PathParam(\"id\") String id) {\n final Response response;\n\n // first get the current entrypoint configuration, if exists\n EntryPointKeyVsctImpl entryPointKey = EntryPointKeyV...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_12
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void otherwise_server_registration_should_create_pending_configuration_based_on_committing_one() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n IncomingEntryPointBackendServer server = new IncomingEntryPointBackendServer(\"ijklm\", \"10.98.71.1\", \"90...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_13
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void otherwise_server_registration_should_create_pending_configuration_based_on_current_one() {\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n IncomingEntryPointBackendServer server = new IncomingEntryPointBackendServer(\"ijklm\", \"10.98.71.1\", \"9090\...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_1
{ "fields": [ { "declarator": "stateManager = mock(EntryPointStateManager.class)", "modifier": "private final", "original_string": "private final EntryPointStateManager stateManager = mock(EntryPointStateManager.class);", "type": "EntryPointStateManager", "var_name": "stateManager" ...
{ "body": "@Test\n public void try_commit_current_with_no_autoreload_haproxy() throws IncompleteConfigurationException {\n // Given\n EntryPointKey key = new EntryPointKeyDefaultImpl(\"some_key\");\n String correlationId = CorrelationId.newCorrelationId();\n TryCommitCurrentConfiguratio...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointEventHandler.class);", "type": "Logger", "var_name": "LOGGER"...
{ "body": "public void handle(RegisterServerEvent event) {\n LOGGER.info(\"handles {}\", event);\n EntryPointKey key = event.getKey();\n try {\n\n if (this.stateManager.lock(key)) {\n Optional<EntryPoint> existingConfiguration = Optional.ofNullable(\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_44
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void should_send_delete_entry_point_event_and_return_204_when_delete_an_entry_point() {\n // given\n when(entryPointRepository.removeEntrypoint(any(EntryPointKey.class))).thenReturn(Optional.of(Boolean.TRUE));\n when(entryPointRepository.getCurrentConfiguration(any(En...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@DELETE\n @Path(\"/{id : .+}\")\n @Timed\n public Response deleteEntrypoint(@Auth final User user, @PathParam(\"id\") String id) {\n final Response response;\n\n // first get the current entrypoint configuration, if exists\n EntryPointKeyVsctImpl entryPointKey = EntryPointKeyV...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_52
{ "fields": [ { "declarator": "haproxyRepository = mock(HaproxyRepository.class)", "modifier": "static", "original_string": "static HaproxyRepository haproxyRepository = mock(HaproxyRepository.class);", "type": "HaproxyRepository", "var_name": "haproxyRepository" }, { "...
{ "body": "@Test\n public void should_get_all_ids(){\n\n Set<String> ids = new HashSet<>();\n ids.add(\"id1\");\n ids.add(\"id2\");\n when(haproxyRepository.getHaproxyIds()).thenReturn(ids);\n\n Set<String> result = resources.client().target(\"/haproxy/ids\").request().get(Set.cl...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(HaproxyResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(HaproxyResources.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@GET\n @Path(\"/ids\")\n @Produces(MediaType.APPLICATION_JSON)\n public Set<String> getHaproxyIds(@Auth final User user) {\n return repository.getHaproxyIds();\n }", "class_method_signature": "HaproxyResources.getHaproxyIds(@Auth final User user)", "constructor": false, "full_signa...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_29
{ "fields": [ { "declarator": "nsqDispatcher = mock(NSQDispatcher.class)", "modifier": "private final", "original_string": "private final NSQDispatcher nsqDispatcher = mock(NSQDispatcher.class);", "type": "NSQDispatcher", "var_name": "nsqDispatcher" }, { "declarator": "...
{ "body": "@Test\n public void should_handle_exceptions_from_dispatcher() throws Exception {\n // given\n doThrow(new RuntimeException()).when(nsqDispatcher).sendCommitRequested(commitRequestedEvent, \"hap\", \"app\", \"ptf\", \"bind\");\n\n // when\n commitRequestedSubscriber.accept(co...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CommitRequestedSubscriber.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CommitRequestedSubscriber.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void accept(CommitRequestedEvent commitRequestedEvent) {\n\n EntryPoint configuration = commitRequestedEvent.getConfiguration();\n Map<String, String> context = configuration.getContext();\n\n Optional.ofNullable(context.get(\"application\")).ifPresent(application...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_68
{ "fields": [], "file": "admin/admin-consul/src/test/java/com/vsct/dt/strowgr/admin/repository/consul/ConsulReaderTest.java", "identifier": "ConsulReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_throw_exception_with_no_entity_when_status_out_of_range_200_299() {\n for (int status = 100; status < 600; status++) {\n if (status >= 200 && status < 300) continue; // skip\n // given\n HttpResponse httpResponse = mock(HttpResponse.clas...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConsulReader.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConsulReader.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "<T> Optional<T> parseHttpResponse(HttpResponse httpResponse, Function<HttpEntity, Optional<T>> method) throws ClientProtocolException {\n return parseHttpResponse(httpResponse, method, false);\n }", "class_method_signature": "ConsulReader.parseHttpResponse(HttpResponse httpResponse, Function<Ht...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_48
{ "fields": [ { "declarator": "entryPointRepository = mock(EntryPointRepository.class)", "modifier": "private final", "original_string": "private final EntryPointRepository entryPointRepository = mock(EntryPointRepository.class);", "type": "EntryPointRepository", "var_name": "entryPo...
{ "body": "@Test\n public void try_commit_current_entry_point_should_send_event_to_subscriber() throws Exception {\n // given\n String entryPointKey = \"entryPointKey\";\n @SuppressWarnings(\"unchecked\")\n ArgumentCaptor<TryCommitCurrentConfigurationEvent> tryCommitCurrentEntryPointCap...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EntryPointResources.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EntryPointResources.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@POST\n @Path(\"/{id : .+}/try-commit-current\")\n @Produces(MediaType.TEXT_PLAIN)\n public String tryCommitCurrent(@Auth final User user, @PathParam(\"id\") String id) {\n TryCommitCurrentConfigurationEvent event = new TryCommitCurrentConfigurationEvent(CorrelationId.newCorrelationId(), ne...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_25
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private final", "original_string": "private final ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" }, { "declarator": "commitFailedTransformer = new CommitF...
{ "body": "@Test\n public void should_transform_commit_failed_event_to_object() throws Exception {\n // given\n NSQMessage nsqMessage = mock(NSQMessage.class);\n when(nsqMessage.getMessage()).thenReturn((\"\" +\n \"{\" +\n \" 'header':{\" +\n \" ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CommitCompletedTransformer.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CommitCompletedTransformer.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n public CommitFailedEvent apply(NSQMessage nsqMessage) throws Exception {\n CommitFailed payload = objectMapper.readValue(nsqMessage.getMessage(), CommitFailed.class);\n\n LOGGER.debug(\"received an new CommitFailedEvent with cid {}\", payload.getHeader().getCorrelationId());\n\...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_33
{ "fields": [ { "declarator": "nsqDispatcher = mock(NSQDispatcher.class)", "modifier": "private final", "original_string": "private final NSQDispatcher nsqDispatcher = mock(NSQDispatcher.class);", "type": "NSQDispatcher", "var_name": "nsqDispatcher" }, { "declarator": "...
{ "body": "@Test\n public void should_handle_exceptions_from_nsq_dispatcher() throws Exception {\n // given\n doThrow(new RuntimeException()).when(nsqDispatcher).sendDeleteRequested(\"cId\", \"hap\", \"app\", \"ptf\");\n\n // when\n deleteEntryPointSubscriber.accept(deleteEntryPointEven...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(DeleteEntryPointSubscriber.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(DeleteEntryPointSubscriber.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n public void accept(DeleteEntryPointEvent deleteEntryPointEvent) {\n\n try {\n nsqDispatcher.sendDeleteRequested(deleteEntryPointEvent.getCorrelationId(), deleteEntryPointEvent.getHaproxyName(), deleteEntryPointEvent.getApplication(), deleteEntryPointEvent.getPlatform());\n ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
58555246_64
{ "fields": [], "file": "admin/admin-consul/src/test/java/com/vsct/dt/strowgr/admin/repository/consul/ConsulRepositoryTest.java", "identifier": "ConsulRepositoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_return_autoreload_true_if_autoreload_key_valued_at_true() throws IOException {\n // given\n ConsulReader consulReader = mock(ConsulReader.class);\n CloseableHttpClient closeableHttpClient = mock(CloseableHttpClient.class);\n ConsulRepository consulR...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConsulRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConsulRepository.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public boolean isAutoreloaded(EntryPointKey entryPointKey) {\n boolean isAutoreloaded = false;\n HttpGet getEntryPointAutoreloadKey = new HttpGet(\"http://\" + host + \":\" + port + \"/v1/kv/admin/\" + entryPointKey.getID() + \"/autoreload?raw\");\n try {\n Op...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 58555246, "size": 2819, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/voyages-sncf-technologies/strowgr" }
69239703_0
{ "fields": [ { "declarator": "authRepository", "modifier": "private", "original_string": "private AuthRepositoryImpl authRepository;", "type": "AuthRepositoryImpl", "var_name": "authRepository" }, { "declarator": "mockDataSourceFactory", "modifier": "@Mock\n p...
{ "body": "@Test\n public void shouldNotLoginOnNullInput() {\n //when\n Observable<Boolean> loginResult = authRepository.login(null);\n\n //then\n loginResult.test().assertError(VoteException.class);\n }", "class_method_signature": "AuthRepositoryImplTest.shouldNotLoginOnNullInput(...
{ "fields": [ { "declarator": "mDataSourceFactory", "modifier": "private final", "original_string": "private final DataSourceFactory mDataSourceFactory;", "type": "DataSourceFactory", "var_name": "mDataSourceFactory" } ], "file": "app/src/main/java/ro/code4/monitorizarevot/da...
{ "body": "@Override\n public Observable<Boolean> login(LoginDataParams params) {\n if(params == null || isEmpty(params.getPhoneNumber()) || isEmpty(params.getPinNumber())) {\n return Observable.error(new VoteException(MessageType.EMPTY_CREDENTIALS));\n }\n\n ApiDataSource apiDataSo...
{ "created": null, "fork": null, "fork_count": 31, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69239703, "size": 1810, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/code4romania/monitorizare-vot-android" }
69239703_1
{ "fields": [ { "declarator": "authRepository", "modifier": "private", "original_string": "private AuthRepositoryImpl authRepository;", "type": "AuthRepositoryImpl", "var_name": "authRepository" }, { "declarator": "mockDataSourceFactory", "modifier": "@Mock\n p...
{ "body": "@Test\n public void shouldNotLoginOnEmptyPhoneNumber() {\n //given\n LoginDataParams loginDataParams = new LoginDataParams(null, null, null);\n\n //when\n Observable<Boolean> loginResult = authRepository.login(loginDataParams);\n\n //then\n loginResult.test().as...
{ "fields": [ { "declarator": "mDataSourceFactory", "modifier": "private final", "original_string": "private final DataSourceFactory mDataSourceFactory;", "type": "DataSourceFactory", "var_name": "mDataSourceFactory" } ], "file": "app/src/main/java/ro/code4/monitorizarevot/da...
{ "body": "@Override\n public Observable<Boolean> login(LoginDataParams params) {\n if(params == null || isEmpty(params.getPhoneNumber()) || isEmpty(params.getPinNumber())) {\n return Observable.error(new VoteException(MessageType.EMPTY_CREDENTIALS));\n }\n\n ApiDataSource apiDataSo...
{ "created": null, "fork": null, "fork_count": 31, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69239703, "size": 1810, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/code4romania/monitorizare-vot-android" }
69239703_2
{ "fields": [ { "declarator": "authRepository", "modifier": "private", "original_string": "private AuthRepositoryImpl authRepository;", "type": "AuthRepositoryImpl", "var_name": "authRepository" }, { "declarator": "mockDataSourceFactory", "modifier": "@Mock\n p...
{ "body": "@Test\n public void shouldNotLoginOnEmptyPinNumber() {\n //given\n LoginDataParams loginDataParams = new LoginDataParams(PHONE_NO, null, null);\n\n //when\n Observable<Boolean> loginResult = authRepository.login(loginDataParams);\n\n //then\n loginResult.test()....
{ "fields": [ { "declarator": "mDataSourceFactory", "modifier": "private final", "original_string": "private final DataSourceFactory mDataSourceFactory;", "type": "DataSourceFactory", "var_name": "mDataSourceFactory" } ], "file": "app/src/main/java/ro/code4/monitorizarevot/da...
{ "body": "@Override\n public Observable<Boolean> login(LoginDataParams params) {\n if(params == null || isEmpty(params.getPhoneNumber()) || isEmpty(params.getPinNumber())) {\n return Observable.error(new VoteException(MessageType.EMPTY_CREDENTIALS));\n }\n\n ApiDataSource apiDataSo...
{ "created": null, "fork": null, "fork_count": 31, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69239703, "size": 1810, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/code4romania/monitorizare-vot-android" }
69239703_3
{ "fields": [ { "declarator": "authRepository", "modifier": "private", "original_string": "private AuthRepositoryImpl authRepository;", "type": "AuthRepositoryImpl", "var_name": "authRepository" }, { "declarator": "mockDataSourceFactory", "modifier": "@Mock\n p...
{ "body": "@Test\n public void shouldLogin() {\n //given\n LoginDataParams loginDataParams = new LoginDataParams(PHONE_NO, PIN, UUID);\n when(mockDataSourceFactory.dataSource(anyBoolean())).thenReturn(mockApiDataSource);\n\n //when\n authRepository.login(loginDataParams);\n ...
{ "fields": [ { "declarator": "mDataSourceFactory", "modifier": "private final", "original_string": "private final DataSourceFactory mDataSourceFactory;", "type": "DataSourceFactory", "var_name": "mDataSourceFactory" } ], "file": "app/src/main/java/ro/code4/monitorizarevot/da...
{ "body": "@Override\n public Observable<Boolean> login(LoginDataParams params) {\n if(params == null || isEmpty(params.getPhoneNumber()) || isEmpty(params.getPinNumber())) {\n return Observable.error(new VoteException(MessageType.EMPTY_CREDENTIALS));\n }\n\n ApiDataSource apiDataSo...
{ "created": null, "fork": null, "fork_count": 31, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69239703, "size": 1810, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/code4romania/monitorizare-vot-android" }
111972694_2
{ "fields": [], "file": "exec-core/src/test/java/com/networknt/bot/core/CommandExecutorTest.java", "identifier": "CommandExecutorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLsCommand() throws IOException, InterruptedException {\n List<String> commands = new ArrayList<>();\n commands.add(\"ls\");\n // execute the command\n Executor executor = SingletonServiceFactory.getBean(Executor.class);\n int result = executor.e...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(CommandExecutor.class)", "modifier": "static final", "original_string": "static final Logger logger = LoggerFactory.getLogger(CommandExecutor.class);", "type": "Logger", "var_name": "logger" }, { "declarato...
{ "body": "@Override\n public int execute(final List<String> commandInformation, File workingDir) throws IOException, InterruptedException\n {\n int exitValue = -99;\n\n try\n {\n ProcessBuilder pb = new ProcessBuilder(commandInformation);\n pb.directory(workingDir);\n...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 111972694, "size": 390, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/networknt/light-bot" }
111972694_3
{ "fields": [], "file": "exec-core/src/test/java/com/networknt/bot/core/CommandExecutorTest.java", "identifier": "CommandExecutorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGitClone() throws IOException, InterruptedException {\n List<String> commands = new ArrayList<>();\n commands.add(\"bash\");\n commands.add(\"-c\");\n commands.add(\"rm -rf light-4j\");\n // execute the command\n Executor executor = Singl...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(CommandExecutor.class)", "modifier": "static final", "original_string": "static final Logger logger = LoggerFactory.getLogger(CommandExecutor.class);", "type": "Logger", "var_name": "logger" }, { "declarato...
{ "body": "@Override\n public int execute(final List<String> commandInformation, File workingDir) throws IOException, InterruptedException\n {\n int exitValue = -99;\n\n try\n {\n ProcessBuilder pb = new ProcessBuilder(commandInformation);\n pb.directory(workingDir);\n...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 111972694, "size": 390, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/networknt/light-bot" }
111972694_0
{ "fields": [], "file": "exec-core/src/test/java/com/networknt/bot/core/RegexReplacementTest.java", "identifier": "RegexReplacementTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReplacement() {\n RegexReplacement rr = new RegexReplacement(\"<version.light[a-z-]+4j>\\\\d*\\\\.\\\\d*\\\\.\\\\d*</version.light[a-z-]+4j>\", \"1.5.5\", \"1.5.6\");\n String result = rr.replace(\"<version.light-4j>1.5.5</version.light-4j>\");\n System.out.p...
{ "fields": [ { "declarator": "regex", "modifier": "private final", "original_string": "private final Pattern regex;", "type": "Pattern", "var_name": "regex" }, { "declarator": "original", "modifier": "private final", "original_string": "private final String...
{ "body": "public String replace(String in) {\n boolean matches = regex.matcher(in).find();\n if(matches) {\n return in.replaceAll(original, replacement);\n } else {\n return in;\n }\n }", "class_method_signature": "RegexReplacement.replace(String in)", "constr...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 111972694, "size": 390, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/networknt/light-bot" }
111972694_1
{ "fields": [], "file": "exec-core/src/test/java/com/networknt/bot/core/CommandExecutorTest.java", "identifier": "CommandExecutorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSimpleCommand() throws IOException, InterruptedException {\n // build the system command we want to run\n List<String> commands = new ArrayList<String>();\n commands.add(\"/bin/sh\");\n commands.add(\"-c\");\n commands.add(\"ls -l /var/tmp | wc ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(CommandExecutor.class)", "modifier": "static final", "original_string": "static final Logger logger = LoggerFactory.getLogger(CommandExecutor.class);", "type": "Logger", "var_name": "logger" }, { "declarato...
{ "body": "@Override\n public int execute(final List<String> commandInformation, File workingDir) throws IOException, InterruptedException\n {\n int exitValue = -99;\n\n try\n {\n ProcessBuilder pb = new ProcessBuilder(commandInformation);\n pb.directory(workingDir);\n...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 111972694, "size": 390, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/networknt/light-bot" }
20171642_57
{ "fields": [], "file": "helios-client/src/test/java/com/spotify/helios/common/descriptors/HealthCheckTest.java", "identifier": "HealthCheckTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTcpHealthCheckBuilder() {\n final TcpHealthCheck healthCheck =\n HealthCheck.newTcpHealthCheck().setPort(\"http-admin\").build();\n assertEquals(\"port\", \"http-admin\", healthCheck.getPort());\n }", "class_method_signature": "HealthCheckTest.testTcpHealthCheckBuil...
{ "fields": [ { "declarator": "EXEC = \"exec\"", "modifier": "public static final", "original_string": "public static final String EXEC = \"exec\";", "type": "String", "var_name": "EXEC" }, { "declarator": "HTTP = \"http\"", "modifier": "public static final", ...
{ "body": "public static TcpHealthCheck.Builder newTcpHealthCheck() {\n return TcpHealthCheck.newBuilder();\n }", "class_method_signature": "HealthCheck.newTcpHealthCheck()", "constructor": false, "full_signature": "public static TcpHealthCheck.Builder newTcpHealthCheck()", "identifier": "newTcpHealthChec...
{ "created": "5/26/2014 2:29:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20171642, "size": null, "stargazer_count": null, "stars": 2027, "updates": "2020-01-12T17:38:00+00:00", "url": "https://github.com/spotify/helios"...
20171642_5
{ "fields": [ { "declarator": "resolver", "modifier": "@Mock", "original_string": "@Mock\n DnsSrvResolver resolver;", "type": "DnsSrvResolver", "var_name": "resolver" } ], "file": "helios-client/src/test/java/com/spotify/helios/common/ResolverTest.java", "identifier": "Res...
{ "body": "@Test\n public void testResolveWithHttpFallback() throws Exception {\n final List<LookupResult> lookupResults = ImmutableList.of(\n LookupResult.create(\"master1.example.com\", 80, 1, 1, 1),\n LookupResult.create(\"master2.example.com\", 80, 1, 1, 1),\n LookupResult.create(\"master...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(Resolver.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(Resolver.class);", "type": "Logger", "var_name": "log" }, { "declarator": "HT...
{ "body": "List<URI> resolve(final String srvName, final String domain) {\n return resolve(srvName, domain, DEFAULT_RESOLVER);\n }", "class_method_signature": "Resolver.resolve(final String srvName, final String domain)", "constructor": false, "full_signature": " List<URI> resolve(final String srvName, fina...
{ "created": "5/26/2014 2:29:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20171642, "size": null, "stargazer_count": null, "stars": 2027, "updates": "2020-01-12T17:38:00+00:00", "url": "https://github.com/spotify/helios"...
20171642_231
{ "fields": [ { "declarator": "registry", "modifier": "@Mock", "original_string": "@Mock\n HealthCheckRegistry registry;", "type": "HealthCheckRegistry", "var_name": "registry" } ], "file": "helios-services/src/test/java/com/spotify/helios/master/metrics/HealthCheckGaugeTest...
{ "body": "@Test\n public void testHealthy() throws Exception {\n when(registry.runHealthCheck(anyString())).thenReturn(HealthCheck.Result.healthy());\n final HealthCheckGauge gauge = new HealthCheckGauge(registry, \"foo\");\n assertThat(gauge.getValue(), equalTo(1));\n }", "class_method_signature": "Hea...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final HealthCheckRegistry registry;", "type": "HealthCheckRegistry", "var_name": "registry" }, { "declarator": "name", "modifier": "private final", "original_s...
{ "body": "@Override\n public Integer getValue() {\n final HealthCheck.Result result = registry.runHealthCheck(name);\n return result.isHealthy() ? 1 : 0;\n }", "class_method_signature": "HealthCheckGauge.getValue()", "constructor": false, "full_signature": "@Override public Integer getValue()", "iden...
{ "created": "5/26/2014 2:29:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20171642, "size": null, "stargazer_count": null, "stars": 2027, "updates": "2020-01-12T17:38:00+00:00", "url": "https://github.com/spotify/helios"...
20171642_118
{ "fields": [ { "declarator": "GROUP_NAME = \"my_group\"", "modifier": "private static final", "original_string": "private static final String GROUP_NAME = \"my_group\";", "type": "String", "var_name": "GROUP_NAME" }, { "declarator": "JOB_ID = new JobId(\"foo\", \"2\", ...
{ "body": "@Test\n public void testCommandLineOptions() throws Exception {\n when(client.rollingUpdate(anyString(), any(JobId.class), any(RolloutOptions.class)))\n .thenReturn(immediateFuture(new RollingUpdateResponse(RollingUpdateResponse.Status.OK)));\n\n when(client.deploymentGroupStatus(GROUP_NAME))...
{ "fields": [ { "declarator": "POLL_INTERVAL_MILLIS = 1000", "modifier": "private static final", "original_string": "private static final long POLL_INTERVAL_MILLIS = 1000;", "type": "long", "var_name": "POLL_INTERVAL_MILLIS" }, { "declarator": "sleepFunction", "mo...
{ "body": "@Override\n protected int runWithJob(final Namespace options, final HeliosClient client,\n final PrintStream out, final boolean json, final Job job,\n final BufferedReader stdin)\n throws ExecutionException, InterruptedException, IOException {\n ...
{ "created": "5/26/2014 2:29:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20171642, "size": null, "stargazer_count": null, "stars": 2027, "updates": "2020-01-12T17:38:00+00:00", "url": "https://github.com/spotify/helios"...
20171642_16
{ "fields": [ { "declarator": "HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1\").build()", "modifier": "private static final", "original_string": "private static final HealthCheck HEALTH_CHECK =\n HealthCheck.newHttpHealthCheck().setPath(\"/\").setPort(\"1...
{ "body": "@Test\n public void testInvalidVersionsFail() throws Exception {\n final Job.Builder b = Job.newBuilder().setName(\"foo\").setImage(\"foo\");\n assertEquals(newHashSet(\"Job version was not specified in job id [foo:null].\",\n \"Job hash was not specified in job id [foo:null].\"),\n va...
{ "fields": [ { "declarator": "NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\")", "modifier": "private static final", "original_string": "private static final Pattern NAME_VERSION_PATTERN = Pattern.compile(\"[0-9a-zA-Z-_.]+\");", "type": "Pattern", "var_name": "NAME_VERSIO...
{ "body": "public Set<String> validate(final Job job) {\n final Set<String> errors = Sets.newHashSet();\n\n errors.addAll(validateJobId(job));\n errors.addAll(validateJobImage(job.getImage()));\n errors.addAll(validateJobHostName(job.getHostname()));\n\n // Check that there's not external port collisio...
{ "created": "5/26/2014 2:29:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20171642, "size": null, "stargazer_count": null, "stars": 2027, "updates": "2020-01-12T17:38:00+00:00", "url": "https://github.com/spotify/helios"...