id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
90393998_0
{ "fields": [ { "declarator": "fruitInfo", "modifier": "private static", "original_string": "private static FruitInfo fruitInfo;", "type": "FruitInfo", "var_name": "fruitInfo" }, { "declarator": "htmlStr", "modifier": "private static", "original_string": "pr...
{ "body": "@Test\n public void testDirctList() {\n FruitItems items = new Fruit().fromHtml(htmlStr, FruitItems.class);\n assert items.size() == 5;\n assert items.get(4).getId() == 5;\n System.out.println(\"fruitItems: \" + fruitInfo);\n }", "class_method_signature": "FruitTest.test...
{ "fields": [ { "declarator": "NULL_KEY_SURROGATE = new TypeToken<Object>() {\n }", "modifier": "private static final", "original_string": "private static final TypeToken<?> NULL_KEY_SURROGATE = new TypeToken<Object>() {\n };", "type": "TypeToken<?>", "var_name": "NULL_KEY_SURR...
{ "body": "public <T> T fromHtml(String html, Class<T> classOfT) {\n return fromHtml(html, (Type) classOfT);\n }", "class_method_signature": "Fruit.fromHtml(String html, Class<T> classOfT)", "constructor": false, "full_signature": "public T fromHtml(String html, Class<T> classOfT)", "identifier": "f...
{ "created": null, "fork": null, "fork_count": 34, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 90393998, "size": 354, "stargazer_count": 342, "stars": null, "updates": null, "url": "https://github.com/sethcreate/Fruit" }
90393998_1
{ "fields": [ { "declarator": "fruitInfo", "modifier": "private static", "original_string": "private static FruitInfo fruitInfo;", "type": "FruitInfo", "var_name": "fruitInfo" }, { "declarator": "htmlStr", "modifier": "private static", "original_string": "pr...
{ "body": "@Test\n public void testNullInput() {\n assert null == new Fruit().fromHtml(\"\", Object.class);\n }", "class_method_signature": "FruitTest.testNullInput()", "constructor": false, "full_signature": "@Test public void testNullInput()", "identifier": "testNullInput", "invocations": [ ...
{ "fields": [ { "declarator": "NULL_KEY_SURROGATE = new TypeToken<Object>() {\n }", "modifier": "private static final", "original_string": "private static final TypeToken<?> NULL_KEY_SURROGATE = new TypeToken<Object>() {\n };", "type": "TypeToken<?>", "var_name": "NULL_KEY_SURR...
{ "body": "public <T> T fromHtml(String html, Class<T> classOfT) {\n return fromHtml(html, (Type) classOfT);\n }", "class_method_signature": "Fruit.fromHtml(String html, Class<T> classOfT)", "constructor": false, "full_signature": "public T fromHtml(String html, Class<T> classOfT)", "identifier": "f...
{ "created": null, "fork": null, "fork_count": 34, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 90393998, "size": 354, "stargazer_count": 342, "stars": null, "updates": null, "url": "https://github.com/sethcreate/Fruit" }
62303580_16
{ "fields": [], "file": "bb-core/src/test/java/com/cognifide/qa/bb/cookies/DefaultCookiesProviderTest.java", "identifier": "DefaultCookiesProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnPathToCorrectFileWhenSysPropIsSet() {\n String expectedFile = \"expected.yaml\";\n System.setProperty(ConfigKeys.COOKIES_FILE, expectedFile);\n\n String tested = DefaultCookiesProvider.getPath();\n\n assertThat(tested).isEqualTo(DefaultCookiesProvider.COOKIES_FO...
{ "fields": [ { "declarator": "DEFAULT_FILE_NAME = \"/cookies.yaml\"", "modifier": "static final", "original_string": "static final String DEFAULT_FILE_NAME = \"/cookies.yaml\";", "type": "String", "var_name": "DEFAULT_FILE_NAME" }, { "declarator": "COOKIES_FOLDER = \"/...
{ "body": "public static String getPath() {\n return COOKIES_FOLDER + System.getProperty(ConfigKeys.COOKIES_FILE, DEFAULT_FILE_NAME);\n }", "class_method_signature": "DefaultCookiesProvider.getPath()", "constructor": false, "full_signature": "public static String getPath()", "identifier": "getPath", "in...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_0
{ "fields": [ { "declarator": "testObject = new ComponentConfigResourceFileReader()", "modifier": "private", "original_string": "private ComponentConfigResourceFileReader testObject = new ComponentConfigResourceFileReader();", "type": "ComponentConfigResourceFileReader", "var_name": ...
{ "body": "@Test\n public void readConfigurationTest() {\n ComponentConfiguration componentConfiguration = testObject\n .readConfiguration(new ResourceFileLocation(\"componentConfig.yaml\"));\n Assertions.assertThat(componentConfiguration.getTabs().size()).isEqualTo(2);\n }", "class_method_signature"...
{ "fields": [], "file": "bb-aem-core/src/main/java/com/cognifide/qa/bb/aem/core/component/configuration/ComponentConfigResourceFileReader.java", "identifier": "ComponentConfigResourceFileReader", "interfaces": "implements ComponentConfigReader<ResourceFileLocation>", "methods": [ { "class_method_sig...
{ "body": "@Override\n public ComponentConfiguration readConfiguration(ResourceFileLocation resourceFileLocation) {\n TypeReference typeReference = new TypeReference<Map<String, List<FieldConfig>>>() {\n };\n Map<String, List<FieldConfig>> configData = Collections.unmodifiableMap(\n YamlReader.readFr...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_20
{ "fields": [ { "declarator": "FRAME_PATH = \"/frame/path\"", "modifier": "private static final", "original_string": "private static final String FRAME_PATH = \"/frame/path\";", "type": "String", "var_name": "FRAME_PATH" }, { "declarator": "NAME = \"name\"", "modi...
{ "body": "@Test\n public void shouldSwitchBetweenFramesAndProvidedFramePathShouldBeOnHead() {\n //when\n testedObject.switchTo(FRAME_PATH);\n\n //then\n assertThatDequeSizeIs(2);\n }", "class_method_signature": "FrameSwitcherTest.shouldSwitchBetweenFramesAndProvidedFramePathShouldBeOnHead()", "cons...
{ "fields": [ { "declarator": "localDeque = new ArrayDeque<>()", "modifier": "private final", "original_string": "private final Deque<FramePath> localDeque = new ArrayDeque<>();", "type": "Deque<FramePath>", "var_name": "localDeque" }, { "declarator": "provider", ...
{ "body": "public void switchTo(FramePath framePath) {\n doSwitch(localDeque.peek(), framePath);\n localDeque.push(framePath);\n }", "class_method_signature": "FrameSwitcher.switchTo(FramePath framePath)", "constructor": false, "full_signature": "public void switchTo(FramePath framePath)", "identifier"...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_21
{ "fields": [ { "declarator": "FRAME_PATH = \"/frame/path\"", "modifier": "private static final", "original_string": "private static final String FRAME_PATH = \"/frame/path\";", "type": "String", "var_name": "FRAME_PATH" }, { "declarator": "NAME = \"name\"", "modi...
{ "body": "@Test\n public void shouldNotSwitchBackWhenThereAreNotEnoughFramesOnDeque() {\n //given\n assumeThatDequeSizeIs(1);\n\n //when\n testedObject.switchBack();\n\n //then\n assertThatDequeSizeIs(1);\n }", "class_method_signature": "FrameSwitcherTest.shouldNotSwitchBackWhenThereAreNotEnoug...
{ "fields": [ { "declarator": "localDeque = new ArrayDeque<>()", "modifier": "private final", "original_string": "private final Deque<FramePath> localDeque = new ArrayDeque<>();", "type": "Deque<FramePath>", "var_name": "localDeque" }, { "declarator": "provider", ...
{ "body": "public void switchBack() {\n if (localDeque.size() > 1) {\n doSwitch(localDeque.poll(), localDeque.peek());\n }\n }", "class_method_signature": "FrameSwitcher.switchBack()", "constructor": false, "full_signature": "public void switchBack()", "identifier": "switchBack", "invocations": ...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_1
{ "fields": [ { "declarator": "EMPTY_FILE_PATH = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_FILE_PATH = \"\";", "type": "String", "var_name": "EMPTY_FILE_PATH" }, { "declarator": "NON_EXISTENT_FILE_PATH = \"i-dont-ex...
{ "body": "@Test\n void getExpected_whenFilePathIsNull_thenThrowIllegalStateException() {\n assertThrows(IllegalStateException.class, () -> testedObject.getExpected(null));\n }", "class_method_signature": "GoogleAnalyticsTest.getExpected_whenFilePathIsNull_thenThrowIllegalStateException()", "constructor": fa...
{ "fields": [ { "declarator": "DATA_LAYER_OBJECT_SCRIPT = \"return JSON.stringify(DL, null, '\\\\t')\"", "modifier": "private static final", "original_string": "private static final String DATA_LAYER_OBJECT_SCRIPT = \"return JSON.stringify(DL, null, '\\\\t')\";", "type": "String", "v...
{ "body": "@Override\n public String getExpected(String fileName) {\n try {\n URI uri = Resources.getResource(CFG_PATH + fileName + JSON).toURI();\n File file = Paths.get(uri).toFile();\n return FileUtils.readFileToString(file, (String) null);\n } catch (IOException | URISyntaxException | Illega...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_17
{ "fields": [ { "declarator": "testedObject = new FrameAspect()", "modifier": "@InjectMocks\n public", "original_string": "@InjectMocks\n public MethodInterceptor testedObject = new FrameAspect();", "type": "MethodInterceptor", "var_name": "testedObject" }, { "declara...
{ "body": "@Test\n public void shouldInvokeMethodWithoutChangingFrameWhenMethodComesFromObject() throws Throwable {\n //given\n Method method = Object.class.getDeclaredMethod(\"getClass\");\n when(methodInvocation.getMethod()).thenReturn(method);\n\n //when\n Object actual = testedObject.invoke(method...
{ "fields": [ { "declarator": "frameMap", "modifier": "@Inject\n private", "original_string": "@Inject\n private FrameMap frameMap;", "type": "FrameMap", "var_name": "frameMap" }, { "declarator": "provider", "modifier": "@Inject\n private", "original_stri...
{ "body": "@Override\n public Object invoke(MethodInvocation methodInvocation) throws Throwable {\n return isObjectMethodCall(methodInvocation)\n ? methodInvocation.proceed()\n : switchFrameAndProceed(methodInvocation);\n }", "class_method_signature": "FrameAspect.invoke(MethodInvocation methodIn...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_6
{ "fields": [ { "declarator": "testedObject", "modifier": "private", "original_string": "private WebDriverModifiers testedObject;", "type": "WebDriverModifiers", "var_name": "testedObject" }, { "declarator": "mod1", "modifier": "@Mock\n private", "original_...
{ "body": "@Test\n public void shouldSortAndFilterWebDriverModifiers() {\n //when\n setupWebDriverModifiers();\n testedObject.modifyWebDriver(webDriver);\n\n //then\n InOrder inOrder = inOrder(mod2, mod1);\n inOrder.verify(mod2).modify(webDriver);\n inOrder.verify(mod1).modify(webDriver);\n\n ...
{ "fields": [ { "declarator": "driverModifiers", "modifier": "private final", "original_string": "private final List<WebDriverModifier> driverModifiers;", "type": "List<WebDriverModifier>", "var_name": "driverModifiers" } ], "file": "bb-core/src/main/java/com/cognifide/qa/bb/...
{ "body": "public WebDriver modifyWebDriver(WebDriver webDriver) {\n return driverModifiers.stream().collect(modifyDrivers(webDriver));\n }", "class_method_signature": "WebDriverModifiers.modifyWebDriver(WebDriver webDriver)", "constructor": false, "full_signature": "public WebDriver modifyWebDriver(WebDriv...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_30
{ "fields": [ { "declarator": "webdriver", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebDriver webdriver;", "type": "WebDriver", "var_name": "webdriver" }, { "declarator": "tested", "modifier": "@Spy\n private", "original_string":...
{ "body": "@Test\n void shouldCloseWebDriverIfInjectorPresent() {\n tested.afterTestExecution(any());\n\n verify(webdriver).quit();\n }", "class_method_signature": "WebdriverCloseExtensionTest.shouldCloseWebDriverIfInjectorPresent()", "constructor": false, "full_signature": "@Test void shouldCloseWebDri...
{ "fields": [ { "declarator": "webDriver", "modifier": "private", "original_string": "private WebDriver webDriver;", "type": "WebDriver", "var_name": "webDriver" } ], "file": "bb-junit5/src/main/java/com/cognifide/qa/bb/junit5/selenium/WebdriverCloseExtension.java", "identi...
{ "body": "@Override\n public void afterTestExecution(ExtensionContext context) {\n if (webDriver != null) {\n webDriver.quit();\n }\n }", "class_method_signature": "WebdriverCloseExtension.afterTestExecution(ExtensionContext context)", "constructor": false, "full_signature": "@Override public void...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_26
{ "fields": [ { "declarator": "contextStack", "modifier": "@Mock\n private", "original_string": "@Mock\n private ContextStack contextStack;", "type": "ContextStack", "var_name": "contextStack" }, { "declarator": "testedObject", "modifier": "@InjectMocks\n priva...
{ "body": "@Test\n public void shouldReturnScopedWebElementListWhenScopedFactoryIsInStack()\n throws NoSuchFieldException {\n //given\n ScopedElementLocatorFactory elementLocatorFactory = mock(ScopedElementLocatorFactory.class);\n when(elementLocatorFactory.getCurrentScope()).thenReturn(currentScope);\...
{ "fields": [ { "declarator": "stack", "modifier": "@Inject\n private", "original_string": "@Inject\n private ContextStack stack;", "type": "ContextStack", "var_name": "stack" } ], "file": "bb-core/src/main/java/com/cognifide/qa/bb/scope/current/CurrentScopeListProvider.jav...
{ "body": "@Override\n public List<WebElement> get() {\n return stack.isEmpty() ? Collections.emptyList() : getScopedList();\n }", "class_method_signature": "CurrentScopeListProvider.get()", "constructor": false, "full_signature": "@Override public List<WebElement> get()", "identifier": "get", "invocat...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_10
{ "fields": [ { "declarator": "webDriverProvider", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebDriverProvider webDriverProvider;", "type": "WebDriverProvider", "var_name": "webDriverProvider" }, { "declarator": "webDriver", "modifier": ...
{ "body": "@Test\n public void isConditionMetShouldCatchTimeoutExceptionAndReturnBoolean() {\n when(condition.apply(any())).thenThrow(new TimeoutException());\n\n boolean result = true;\n try {\n result = tested.isConditionMet(condition);\n } catch (TimeoutException e) {\n fail(\"Exception shou...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(BobcatWait.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(BobcatWait.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public boolean isConditionMet(final ExpectedCondition<?> condition) {\n try {\n until(condition);\n } catch (TimeoutException | StaleElementReferenceException e) {\n LOG.debug(\"{} condition has not been met before timeout \", condition, e);\n return false;\n }\n return true;\n ...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_11
{ "fields": [], "file": "bb-core/src/test/java/com/cognifide/qa/bb/mapper/annotations/FieldAnnotationsProviderTest.java", "identifier": "FieldAnnotationsProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void shouldReturnBobcatAnnotationsWhenFieldIsDecoratedWithFindPageObject()\n throws NoSuchFieldException {\n assertThat(\n FieldAnnotationsProvider.create(TestData.class.getDeclaredField(\"findPageObject\"), null))\n .isInstanceOf(BobcatAnnotations.class);\n }", "class_met...
{ "fields": [], "file": "bb-core/src/main/java/com/cognifide/qa/bb/mapper/annotations/FieldAnnotationsProvider.java", "identifier": "FieldAnnotationsProvider", "interfaces": "", "methods": [ { "class_method_signature": "FieldAnnotationsProvider.FieldAnnotationsProvider()", "constructor": true,...
{ "body": "public static AbstractAnnotations create(Field field, Injector injector) {\n if (AnnotationsHelper.isFindByAnnotationPresent(field)) {\n return new Annotations(field);\n }\n if (AnnotationsHelper.isFindPageObjectAnnotationPresent(field)) {\n return new BobcatAnnotations(field, injector);...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_27
{ "fields": [ { "declarator": "contextStack", "modifier": "@Mock\n private", "original_string": "@Mock\n private ContextStack contextStack;", "type": "ContextStack", "var_name": "contextStack" }, { "declarator": "testedObject", "modifier": "@InjectMocks\n priva...
{ "body": "@Test\n public void shouldProvideTopElementWhenStackIsEmpty() {\n //given\n WebElement topElement = webDriver.findElement(By.xpath(\".//\"));\n when(contextStack.isEmpty()).thenReturn(true);\n\n //when\n WebElement tested = testedObject.get();\n\n //then\n assertThat(tested).isEqualTo...
{ "fields": [ { "declarator": "stack", "modifier": "@Inject\n private", "original_string": "@Inject\n private ContextStack stack;", "type": "ContextStack", "var_name": "stack" }, { "declarator": "webDriver", "modifier": "@Inject\n private", "original_stri...
{ "body": "@Override\n public WebElement get() {\n return stack.isEmpty() ? getTopElement() : getScopedWebElement();\n }", "class_method_signature": "CurrentWebElementProvider.get()", "constructor": false, "full_signature": "@Override public WebElement get()", "identifier": "get", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_31
{ "fields": [ { "declarator": "webdriver", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebDriver webdriver;", "type": "WebDriver", "var_name": "webdriver" }, { "declarator": "tested", "modifier": "@Spy\n private", "original_string":...
{ "body": "@Test\n void afterAll() {\n tested.afterAll(any());\n\n verify(webdriver).quit();\n }", "class_method_signature": "WebdriverCloseExtensionTest.afterAll()", "constructor": false, "full_signature": "@Test void afterAll()", "identifier": "afterAll", "invocations": [ "afterAll", "any"...
{ "fields": [ { "declarator": "webDriver", "modifier": "private", "original_string": "private WebDriver webDriver;", "type": "WebDriver", "var_name": "webDriver" } ], "file": "bb-junit5/src/main/java/com/cognifide/qa/bb/junit5/selenium/WebdriverCloseExtension.java", "identi...
{ "body": "@Override\n // we need this for potential failures in BeforeEach methods\n public void afterAll(ExtensionContext context) {\n afterTestExecution(context);\n }", "class_method_signature": "WebdriverCloseExtension.afterAll(ExtensionContext context)", "constructor": false, "full_signature": "@Over...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_7
{ "fields": [ { "declarator": "IS_REUSABLE = true", "modifier": "private static final", "original_string": "private static final boolean IS_REUSABLE = true;", "type": "boolean", "var_name": "IS_REUSABLE" }, { "declarator": "NOT_REUSABLE = false", "modifier": "priv...
{ "body": "@Test\n public void shouldTryToCloseAlertWhenNotMobileDuringCleanup() {\n //given\n setUp(IS_MAXIMIZED, IS_REUSABLE, NOT_MOBILE);\n when(webDriver.manage()).thenReturn(options);\n when(webDriver.manage().window()).thenReturn(window);\n when(webDriver.switchTo()).thenReturn(bobcatTargetLocat...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ClosingAwareWebDriverWrapper.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClosingAwareWebDriverWrapper.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void quit() {\n if (reusable) {\n cleanDriver();\n sendEvent(false);\n } else {\n super.quit();\n alive = false;\n sendEvent(true);\n }\n }", "class_method_signature": "ClosingAwareWebDriverWrapper.quit()", "constructor": false, "full_signature":...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_24
{ "fields": [ { "declarator": "contextStack", "modifier": "@Mock\n private", "original_string": "@Mock\n private ContextStack contextStack;", "type": "ContextStack", "var_name": "contextStack" }, { "declarator": "testedObject", "modifier": "@InjectMocks\n priva...
{ "body": "@Test\n public void shouldReturnEmptyListWhenStackIsEmpty() {\n //given\n when(contextStack.isEmpty()).thenReturn(true);\n\n //when\n List<WebElement> actual = testedObject.get();\n\n //then\n assertThat(actual).isEmpty();\n }", "class_method_signature": "CurrentScopeListProviderTest....
{ "fields": [ { "declarator": "stack", "modifier": "@Inject\n private", "original_string": "@Inject\n private ContextStack stack;", "type": "ContextStack", "var_name": "stack" } ], "file": "bb-core/src/main/java/com/cognifide/qa/bb/scope/current/CurrentScopeListProvider.jav...
{ "body": "@Override\n public List<WebElement> get() {\n return stack.isEmpty() ? Collections.emptyList() : getScopedList();\n }", "class_method_signature": "CurrentScopeListProvider.get()", "constructor": false, "full_signature": "@Override public List<WebElement> get()", "identifier": "get", "invocat...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_32
{ "fields": [ { "declarator": "context", "modifier": "@Mock\n private", "original_string": "@Mock\n private ExtensionContext context;", "type": "ExtensionContext", "var_name": "context" }, { "declarator": "annotatedElement", "modifier": "@Mock\n private", ...
{ "body": "@Test\n void shouldRetrieveInjectorWhenPresent() {\n Optional<AnnotatedElement> optional = Optional.of(annotatedElement);\n when(context.getElement()).thenReturn(optional);\n when(store.getOrComputeIfAbsent(any(), any(), eq(Injector.class))).thenReturn(injector);\n when(context.getStore(namesp...
{ "fields": [], "file": "bb-junit5/src/main/java/com/cognifide/qa/bb/junit5/guice/InjectorUtils.java", "identifier": "InjectorUtils", "interfaces": "", "methods": [ { "class_method_signature": "InjectorUtils.InjectorUtils()", "constructor": true, "full_signature": "private InjectorUtils...
{ "body": "public static Injector retrieveInjectorFromStore(ExtensionContext context, Namespace namespace) {\n AnnotatedElement element = context.getElement()\n .orElseThrow(() -> new NoSuchElementException(\"No element present\"));\n\n return context.getStore(namespace).getOrComputeIfAbsent(element,\n ...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_4
{ "fields": [ { "declarator": "EMPTY_FILE_PATH = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_FILE_PATH = \"\";", "type": "String", "var_name": "EMPTY_FILE_PATH" }, { "declarator": "NON_EXISTENT_FILE_PATH = \"i-dont-ex...
{ "body": "@Test\n void getExpected_whenFilePathIsValid_thenReturnExpectedString() {\n assertEquals(EXPECTED_DATA_LAYER_STRING, testedObject.getExpected(VALID_FILE_PATH));\n }", "class_method_signature": "AdobeAnalyticsTest.getExpected_whenFilePathIsValid_thenReturnExpectedString()", "constructor": false, ...
{ "fields": [ { "declarator": "DATA_LAYER_OBJECT_SCRIPT = \"return JSON.stringify(DL, null, '\\\\t')\"", "modifier": "private static final", "original_string": "private static final String DATA_LAYER_OBJECT_SCRIPT = \"return JSON.stringify(DL, null, '\\\\t')\";", "type": "String", "v...
{ "body": "@Override\n public String getExpected(String fileName) {\n try {\n URI uri = Resources.getResource(CFG_PATH + fileName + JSON).toURI();\n File file = Paths.get(uri).toFile();\n return FileUtils.readFileToString(file, (String) null);\n } catch (IOException | URISyntaxException | Illega...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_28
{ "fields": [ { "declarator": "contextStack", "modifier": "@Mock\n private", "original_string": "@Mock\n private ContextStack contextStack;", "type": "ContextStack", "var_name": "contextStack" }, { "declarator": "testedObject", "modifier": "@InjectMocks\n priva...
{ "body": "@Test\n public void shouldProvideTopElementWhenFactoryOnStackIsNotParentElementLocator() {\n //given\n WebElement topElement = webDriver.findElement(By.xpath(\".//\"));\n TestElementLocatorFactory elementLocatorFactory = mock(TestElementLocatorFactory.class);\n\n when(contextStack.peek()).then...
{ "fields": [ { "declarator": "stack", "modifier": "@Inject\n private", "original_string": "@Inject\n private ContextStack stack;", "type": "ContextStack", "var_name": "stack" }, { "declarator": "webDriver", "modifier": "@Inject\n private", "original_stri...
{ "body": "@Override\n public WebElement get() {\n return stack.isEmpty() ? getTopElement() : getScopedWebElement();\n }", "class_method_signature": "CurrentWebElementProvider.get()", "constructor": false, "full_signature": "@Override public WebElement get()", "identifier": "get", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_12
{ "fields": [], "file": "bb-core/src/test/java/com/cognifide/qa/bb/mapper/annotations/FieldAnnotationsProviderTest.java", "identifier": "FieldAnnotationsProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void shouldThrowWhenFieldIsNotDecoratedWithSupportedAnnotations() throws NoSuchFieldException {\n assertThatIllegalArgumentException().isThrownBy(() -> FieldAnnotationsProvider\n .create(TestData.class.getDeclaredField(\"notDecoratedWithSupported\"), null));\n }", "class_method_signat...
{ "fields": [], "file": "bb-core/src/main/java/com/cognifide/qa/bb/mapper/annotations/FieldAnnotationsProvider.java", "identifier": "FieldAnnotationsProvider", "interfaces": "", "methods": [ { "class_method_signature": "FieldAnnotationsProvider.FieldAnnotationsProvider()", "constructor": true,...
{ "body": "public static AbstractAnnotations create(Field field, Injector injector) {\n if (AnnotationsHelper.isFindByAnnotationPresent(field)) {\n return new Annotations(field);\n }\n if (AnnotationsHelper.isFindPageObjectAnnotationPresent(field)) {\n return new BobcatAnnotations(field, injector);...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_8
{ "fields": [ { "declarator": "IS_REUSABLE = true", "modifier": "private static final", "original_string": "private static final boolean IS_REUSABLE = true;", "type": "boolean", "var_name": "IS_REUSABLE" }, { "declarator": "NOT_REUSABLE = false", "modifier": "priv...
{ "body": "@Test\n public void shouldMaximizeDuringCleanupWhenPropertyIsSet() {\n //given\n setUp(IS_MAXIMIZED, IS_REUSABLE, IS_MOBILE);\n when(webDriver.manage()).thenReturn(options);\n when(webDriver.manage().window()).thenReturn(window);\n\n //when\n testedObject.quit();\n\n //then\n verif...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ClosingAwareWebDriverWrapper.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClosingAwareWebDriverWrapper.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void quit() {\n if (reusable) {\n cleanDriver();\n sendEvent(false);\n } else {\n super.quit();\n alive = false;\n sendEvent(true);\n }\n }", "class_method_signature": "ClosingAwareWebDriverWrapper.quit()", "constructor": false, "full_signature":...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_13
{ "fields": [], "file": "bb-core/src/test/java/com/cognifide/qa/bb/config/ConfigStrategyProviderTest.java", "identifier": "ConfigStrategyProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getReturnsYamlConfigByDefault() {\n assumeTrue(StringUtils.isBlank(System.getProperty(ConfigKeys.CONFIG_STRATEGY)));\n ConfigStrategy configStrategy = ConfigStrategyProvider.get();\n assertThat(configStrategy).isInstanceOf(YamlConfig.class);\n }", "class_method_signature": ...
{ "fields": [], "file": "bb-core/src/main/java/com/cognifide/qa/bb/config/ConfigStrategyProvider.java", "identifier": "ConfigStrategyProvider", "interfaces": "", "methods": [ { "class_method_signature": "ConfigStrategyProvider.ConfigStrategyProvider()", "constructor": true, "full_signatu...
{ "body": "public static ConfigStrategy get() {\n return new YamlConfig();\n }", "class_method_signature": "ConfigStrategyProvider.get()", "constructor": false, "full_signature": "public static ConfigStrategy get()", "identifier": "get", "invocations": [], "modifiers": "public static", "parameters":...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_9
{ "fields": [ { "declarator": "IS_REUSABLE = true", "modifier": "private static final", "original_string": "private static final boolean IS_REUSABLE = true;", "type": "boolean", "var_name": "IS_REUSABLE" }, { "declarator": "NOT_REUSABLE = false", "modifier": "priv...
{ "body": "@Test\n public void shouldAddListener() {\n //given\n setUp(NOT_MAXIMIZED, NOT_REUSABLE, IS_MOBILE);\n listener = new WebDriverListener();\n\n //when\n testedObject.addListener(listener);\n\n //then\n verify(testedObject).addListener(listener);\n }", "class_method_signature": "Clos...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ClosingAwareWebDriverWrapper.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClosingAwareWebDriverWrapper.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void addListener(WebDriverClosedListener listener) {\n closedListeners.add(listener);\n }", "class_method_signature": "ClosingAwareWebDriverWrapper.addListener(WebDriverClosedListener listener)", "constructor": false, "full_signature": "@Override public void addListener(WebDri...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_29
{ "fields": [ { "declarator": "contextStack", "modifier": "@Mock\n private", "original_string": "@Mock\n private ContextStack contextStack;", "type": "ContextStack", "var_name": "contextStack" }, { "declarator": "testedObject", "modifier": "@InjectMocks\n priva...
{ "body": "@Test\n public void shouldProvideCurrentElementWhenParentElementLocatorIsOnStack() {\n //given\n TestParentElementLocatorFactory testFactory = mock(TestParentElementLocatorFactory.class);\n when(testFactory.getCurrentScope()).thenReturn(currentScope);\n when(currentScope.findElement()).thenRet...
{ "fields": [ { "declarator": "stack", "modifier": "@Inject\n private", "original_string": "@Inject\n private ContextStack stack;", "type": "ContextStack", "var_name": "stack" }, { "declarator": "webDriver", "modifier": "@Inject\n private", "original_stri...
{ "body": "@Override\n public WebElement get() {\n return stack.isEmpty() ? getTopElement() : getScopedWebElement();\n }", "class_method_signature": "CurrentWebElementProvider.get()", "constructor": false, "full_signature": "@Override public WebElement get()", "identifier": "get", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_5
{ "fields": [ { "declarator": "VALID_SUBJECT = \"valid\"", "modifier": "public static final", "original_string": "public static final String VALID_SUBJECT = \"valid\";", "type": "String", "var_name": "VALID_SUBJECT" }, { "declarator": "INVALID_SUBJECT = \"invalid\"", ...
{ "body": "@Test\n public void match() throws MessagingException {\n\n when(message.getSubject()).thenReturn(VALID_SUBJECT);\n\n boolean actual = new SubjectSearchTerm(subject).match(message);\n\n assertEquals(expected, actual);\n }", "class_method_signature": "SubjectSearchTermTest.match()", "construc...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(SubjectSearchTerm.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SubjectSearchTerm.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public boolean match(Message msg) {\n return Optional.ofNullable(msg)\n .map(this::getSubjectFromMessage)\n .map(emailSubject -> StringUtils.equals(emailSubject, subject))\n .orElse(false);\n }", "class_method_signature": "SubjectSearchTerm.match(Message msg)", "co...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_33
{ "fields": [ { "declarator": "context", "modifier": "@Mock\n private", "original_string": "@Mock\n private ExtensionContext context;", "type": "ExtensionContext", "var_name": "context" }, { "declarator": "annotatedElement", "modifier": "@Mock\n private", ...
{ "body": "@Test\n void shouldThrowWhenInjectorIsMissing() {\n Optional<AnnotatedElement> optional = Optional.of(annotatedElement);\n when(context.getElement()).thenReturn(optional);\n when(store.getOrComputeIfAbsent(any(), any(), eq(Injector.class)))\n .thenThrow(NoSuchElementException.class);\n ...
{ "fields": [], "file": "bb-junit5/src/main/java/com/cognifide/qa/bb/junit5/guice/InjectorUtils.java", "identifier": "InjectorUtils", "interfaces": "", "methods": [ { "class_method_signature": "InjectorUtils.InjectorUtils()", "constructor": true, "full_signature": "private InjectorUtils...
{ "body": "public static Injector retrieveInjectorFromStore(ExtensionContext context, Namespace namespace) {\n AnnotatedElement element = context.getElement()\n .orElseThrow(() -> new NoSuchElementException(\"No element present\"));\n\n return context.getStore(namespace).getOrComputeIfAbsent(element,\n ...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_25
{ "fields": [ { "declarator": "contextStack", "modifier": "@Mock\n private", "original_string": "@Mock\n private ContextStack contextStack;", "type": "ContextStack", "var_name": "contextStack" }, { "declarator": "testedObject", "modifier": "@InjectMocks\n priva...
{ "body": "@Test\n public void shouldReturnEmptyListWhenFactoryInStackIsNotScoped() {\n //given\n ElementLocatorFactory elementLocatorFactory = mock(ElementLocatorFactory.class);\n when(contextStack.peek()).thenReturn(pageObjectContext);\n when(contextStack.peek().getElementLocatorFactory()).thenReturn(e...
{ "fields": [ { "declarator": "stack", "modifier": "@Inject\n private", "original_string": "@Inject\n private ContextStack stack;", "type": "ContextStack", "var_name": "stack" } ], "file": "bb-core/src/main/java/com/cognifide/qa/bb/scope/current/CurrentScopeListProvider.jav...
{ "body": "@Override\n public List<WebElement> get() {\n return stack.isEmpty() ? Collections.emptyList() : getScopedList();\n }", "class_method_signature": "CurrentScopeListProvider.get()", "constructor": false, "full_signature": "@Override public List<WebElement> get()", "identifier": "get", "invocat...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_14
{ "fields": [], "file": "bb-core/src/test/java/com/cognifide/qa/bb/utils/XpathUtilsTest.java", "identifier": "XpathUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void quoteShouldThrowNpeWhenNoArgumentsAreProvided() {\n assertThrows(NullPointerException.class, () -> XpathUtils.quote(null));\n }", "class_method_signature": "XpathUtilsTest.quoteShouldThrowNpeWhenNoArgumentsAreProvided()", "constructor": false, "full_signature": "@Test public ...
{ "fields": [], "file": "bb-core/src/main/java/com/cognifide/qa/bb/utils/XpathUtils.java", "identifier": "XpathUtils", "interfaces": "", "methods": [ { "class_method_signature": "XpathUtils.XpathUtils()", "constructor": true, "full_signature": "private XpathUtils()", "identifier":...
{ "body": "public static String quote(String sentence) {\n if (!sentence.contains(\"'\")) {\n return addSingleQuotation(sentence);\n } else if (sentence.contains(\"'\") && !sentence.contains(\"\\\"\")) {\n return addDoubleQuotation(sentence);\n } else {\n return changeToConcat(sentence);\n ...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_22
{ "fields": [ { "declarator": "FRAME_PATH = \"/frame/path\"", "modifier": "private static final", "original_string": "private static final String FRAME_PATH = \"/frame/path\";", "type": "String", "var_name": "FRAME_PATH" }, { "declarator": "NAME = \"name\"", "modi...
{ "body": "@Test\n public void shouldPutFrameOnStackById() {\n //given\n assumeThatDequeSizeIs(1);\n\n //when\n testedObject.putFramePathOnStack(1);\n\n //then\n assertThatDequeSizeIs(2);\n }", "class_method_signature": "FrameSwitcherTest.shouldPutFrameOnStackById()", "constructor": false, "...
{ "fields": [ { "declarator": "localDeque = new ArrayDeque<>()", "modifier": "private final", "original_string": "private final Deque<FramePath> localDeque = new ArrayDeque<>();", "type": "Deque<FramePath>", "var_name": "localDeque" }, { "declarator": "provider", ...
{ "body": "public void putFramePathOnStack(int index) {\n if (!switchRequestComingFromFrameSwitcher) {\n expandFramePathStack(new IndexedFrame(index));\n }\n }", "class_method_signature": "FrameSwitcher.putFramePathOnStack(int index)", "constructor": false, "full_signature": "public void putFramePat...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_18
{ "fields": [ { "declarator": "testedObject = new FrameAspect()", "modifier": "@InjectMocks\n public", "original_string": "@InjectMocks\n public MethodInterceptor testedObject = new FrameAspect();", "type": "MethodInterceptor", "var_name": "testedObject" }, { "declara...
{ "body": "@Test\n public void shouldInvokeMethodWithFrameChangeWhenMethodComesFromClass() throws Throwable {\n //given\n Element element = new Element();\n setUpMethodInvocationWith(Element.class, element);\n when(provider.get()).thenReturn(frameSwitcher);\n\n //when\n Object actual = testedObject...
{ "fields": [ { "declarator": "frameMap", "modifier": "@Inject\n private", "original_string": "@Inject\n private FrameMap frameMap;", "type": "FrameMap", "var_name": "frameMap" }, { "declarator": "provider", "modifier": "@Inject\n private", "original_stri...
{ "body": "@Override\n public Object invoke(MethodInvocation methodInvocation) throws Throwable {\n return isObjectMethodCall(methodInvocation)\n ? methodInvocation.proceed()\n : switchFrameAndProceed(methodInvocation);\n }", "class_method_signature": "FrameAspect.invoke(MethodInvocation methodIn...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_2
{ "fields": [ { "declarator": "EMPTY_FILE_PATH = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_FILE_PATH = \"\";", "type": "String", "var_name": "EMPTY_FILE_PATH" }, { "declarator": "NON_EXISTENT_FILE_PATH = \"i-dont-ex...
{ "body": "@Test\n void getExpected_whenFilePathIsValid_thenReturnExpectedString() {\n assertEquals(EXPECTED_DATA_LAYER_STRING, testedObject.getExpected(VALID_FILE_PATH));\n }", "class_method_signature": "GoogleAnalyticsTest.getExpected_whenFilePathIsValid_thenReturnExpectedString()", "constructor": false, ...
{ "fields": [ { "declarator": "DATA_LAYER_OBJECT_SCRIPT = \"return JSON.stringify(DL, null, '\\\\t')\"", "modifier": "private static final", "original_string": "private static final String DATA_LAYER_OBJECT_SCRIPT = \"return JSON.stringify(DL, null, '\\\\t')\";", "type": "String", "v...
{ "body": "@Override\n public String getExpected(String fileName) {\n try {\n URI uri = Resources.getResource(CFG_PATH + fileName + JSON).toURI();\n File file = Paths.get(uri).toFile();\n return FileUtils.readFileToString(file, (String) null);\n } catch (IOException | URISyntaxException | Illega...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_19
{ "fields": [ { "declarator": "testedObject = new FrameAspect()", "modifier": "@InjectMocks\n public", "original_string": "@InjectMocks\n public MethodInterceptor testedObject = new FrameAspect();", "type": "MethodInterceptor", "var_name": "testedObject" }, { "declara...
{ "body": "@Test\n public void shouldInvokeMethodWithFrameChangeWhenMethodIsAnnotatedWithFrame() throws Throwable {\n //given\n AnnotatedElement element = new AnnotatedElement();\n setUpMethodInvocationWith(AnnotatedElement.class, element);\n when(provider.get()).thenReturn(frameSwitcher);\n when(fram...
{ "fields": [ { "declarator": "frameMap", "modifier": "@Inject\n private", "original_string": "@Inject\n private FrameMap frameMap;", "type": "FrameMap", "var_name": "frameMap" }, { "declarator": "provider", "modifier": "@Inject\n private", "original_stri...
{ "body": "@Override\n public Object invoke(MethodInvocation methodInvocation) throws Throwable {\n return isObjectMethodCall(methodInvocation)\n ? methodInvocation.proceed()\n : switchFrameAndProceed(methodInvocation);\n }", "class_method_signature": "FrameAspect.invoke(MethodInvocation methodIn...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_3
{ "fields": [ { "declarator": "EMPTY_FILE_PATH = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_FILE_PATH = \"\";", "type": "String", "var_name": "EMPTY_FILE_PATH" }, { "declarator": "NON_EXISTENT_FILE_PATH = \"i-dont-ex...
{ "body": "@Test\n void getExpected_whenFilePathIsNull_thenThrowIllegalStateException() {\n assertThrows(IllegalStateException.class, () -> testedObject.getExpected(null));\n }", "class_method_signature": "AdobeAnalyticsTest.getExpected_whenFilePathIsNull_thenThrowIllegalStateException()", "constructor": fal...
{ "fields": [ { "declarator": "DATA_LAYER_OBJECT_SCRIPT = \"return JSON.stringify(DL, null, '\\\\t')\"", "modifier": "private static final", "original_string": "private static final String DATA_LAYER_OBJECT_SCRIPT = \"return JSON.stringify(DL, null, '\\\\t')\";", "type": "String", "v...
{ "body": "@Override\n public String getExpected(String fileName) {\n try {\n URI uri = Resources.getResource(CFG_PATH + fileName + JSON).toURI();\n File file = Paths.get(uri).toFile();\n return FileUtils.readFileToString(file, (String) null);\n } catch (IOException | URISyntaxException | Illega...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_23
{ "fields": [ { "declarator": "FRAME_PATH = \"/frame/path\"", "modifier": "private static final", "original_string": "private static final String FRAME_PATH = \"/frame/path\";", "type": "String", "var_name": "FRAME_PATH" }, { "declarator": "NAME = \"name\"", "modi...
{ "body": "@Test\n public void shouldPutFrameOnStackByName() {\n //given\n assumeThatDequeSizeIs(1);\n\n //when\n testedObject.putFramePathOnStack(NAME);\n\n //then\n assertThatDequeSizeIs(2);\n }", "class_method_signature": "FrameSwitcherTest.shouldPutFrameOnStackByName()", "constructor": fal...
{ "fields": [ { "declarator": "localDeque = new ArrayDeque<>()", "modifier": "private final", "original_string": "private final Deque<FramePath> localDeque = new ArrayDeque<>();", "type": "Deque<FramePath>", "var_name": "localDeque" }, { "declarator": "provider", ...
{ "body": "public void putFramePathOnStack(int index) {\n if (!switchRequestComingFromFrameSwitcher) {\n expandFramePathStack(new IndexedFrame(index));\n }\n }", "class_method_signature": "FrameSwitcher.putFramePathOnStack(int index)", "constructor": false, "full_signature": "public void putFramePat...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
62303580_15
{ "fields": [], "file": "bb-core/src/test/java/com/cognifide/qa/bb/cookies/DefaultCookiesProviderTest.java", "identifier": "DefaultCookiesProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnDefaultFileByDefault() {\n String tested = DefaultCookiesProvider.getPath();\n\n assertThat(tested)\n .isEqualTo(\n DefaultCookiesProvider.COOKIES_FOLDER + DefaultCookiesProvider.DEFAULT_FILE_NAME);\n }", "class_method_signature": "DefaultCookiesP...
{ "fields": [ { "declarator": "DEFAULT_FILE_NAME = \"/cookies.yaml\"", "modifier": "static final", "original_string": "static final String DEFAULT_FILE_NAME = \"/cookies.yaml\";", "type": "String", "var_name": "DEFAULT_FILE_NAME" }, { "declarator": "COOKIES_FOLDER = \"/...
{ "body": "public static String getPath() {\n return COOKIES_FOLDER + System.getProperty(ConfigKeys.COOKIES_FILE, DEFAULT_FILE_NAME);\n }", "class_method_signature": "DefaultCookiesProvider.getPath()", "constructor": false, "full_signature": "public static String getPath()", "identifier": "getPath", "in...
{ "created": null, "fork": null, "fork_count": 37, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62303580, "size": 9978, "stargazer_count": 81, "stars": null, "updates": null, "url": "https://github.com/Cognifide/bobcat" }
27609596_12
{ "fields": [ { "declarator": "clock = new ManualClock()", "modifier": "private final", "original_string": "private final ManualClock clock = new ManualClock();", "type": "ManualClock", "var_name": "clock" }, { "declarator": "registry = new DefaultRegistry(clock)", ...
{ "body": "@Test\n public void getAppInfo() {\n String javaVersion = System.getProperty(\"java.version\");\n Assert.assertTrue(endpoint.get(\"appinfo\").toString().contains(javaVersion));\n }", "class_method_signature": "BaseServerEndpointTest.getAppInfo()", "constructor": false, "full_signature": "@Tes...
{ "fields": [ { "declarator": "jars = new JarsEndpoint()", "modifier": "private final", "original_string": "private final JarsEndpoint jars = new JarsEndpoint();", "type": "JarsEndpoint", "var_name": "jars" }, { "declarator": "registry", "modifier": "private final...
{ "body": "private Object getAppInfo() {\n Map<String, String> appinfo = new TreeMap<>();\n add(appinfo, \"appName\", \"NETFLIX_APP\");\n add(appinfo, \"hostID\", \"EC2_INSTANCE_ID\");\n add(appinfo, \"hostName\", \"EC2_PUBLIC_HOSTNAME\");\n add(appinfo, \"ip\", \"EC2_PUBLIC_IP\");\n appinf...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_131
{ "fields": [], "file": "iep-rxhttp/src/test/java/com/netflix/iep/http/ByteBufsTest.java", "identifier": "ByteBufsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void gunzip() throws Exception {\n byte[] data = \"foo\".getBytes(StandardCharsets.UTF_8);\n byte[] decompressed = obs(data)\n .compose(ByteBufs.gzip())\n .compose(ByteBufs.gunzip())\n .compose(ByteBufs.aggrByteArray())\n .toBlocking().first();\n Assert....
{ "fields": [], "file": "iep-rxhttp/src/main/java/com/netflix/iep/http/ByteBufs.java", "identifier": "ByteBufs", "interfaces": "", "methods": [ { "class_method_signature": "ByteBufs.ByteBufs()", "constructor": true, "full_signature": "private ByteBufs()", "identifier": "ByteBufs",...
{ "body": "public static Observable.Transformer<ByteBuf, ByteBuf> gunzip() {\n return input -> decode(input, new EmbeddedChannel(new JdkZlibDecoder(ZlibWrapper.GZIP)));\n }", "class_method_signature": "ByteBufs.gunzip()", "constructor": false, "full_signature": "public static Observable.Transformer<ByteBuf,...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_189
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void createCredentialsProviderForAccountIgnored() throws Exception {\n AwsClientFactory factory = new AwsClientFactory(config);\n AwsCredentialsProvider creds = factory.createCredentialsProvider(\"ec2-test\", \"123\");\n Assert.assertTrue(creds instanceof StsAssumeRoleCredentialsPr...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "AwsCredentialsProvider createCredentialsProvider(String name, String accountId) {\n final AwsCredentialsProvider dflt = DefaultCredentialsProvider.builder()\n .asyncCredentialUpdateEnabled(true)\n .build();\n final Config cfg = getConfig(name, \"credentials\");\n if (cfg.hasPath(\"ro...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_45
{ "fields": [ { "declarator": "endpoint = new JarsEndpoint()", "modifier": "private final", "original_string": "private final JarsEndpoint endpoint = new JarsEndpoint();", "type": "JarsEndpoint", "var_name": "endpoint" } ], "file": "iep-admin/src/test/java/com/netflix/iep/adm...
{ "body": "@Test\n public void get() {\n List<JarsEndpoint.JarInfo> jars = endpoint.jars();\n Assert.assertEquals(jars, endpoint.get());\n\n // We know spectator-api should be in the classpath and has an Implementation-Version\n // attribute in the manifest\n Optional<JarsEndpoint.JarInfo> spectator =...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(JarsEndpoint.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JarsEndpoint.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Override public Object get() {\n return jars;\n }", "class_method_signature": "JarsEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [], "modifiers": "@Override public", "parameters": "()", "return": "Object", ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_166
{ "fields": [], "file": "iep-module-aws/src/test/java/com/netflix/iep/aws/PaginationTest.java", "identifier": "PaginationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void elasticache() throws Exception {\n SortedSet<String> pages = newPageSet(5);\n final Iterator<String> reqIt = pages.iterator();\n final Iterator<String> resIt = pages.iterator();\n Function<DescribeCacheClustersRequest, DescribeCacheClustersResult> f = r -> {\n if (r.ge...
{ "fields": [ { "declarator": "DEFAULT_POOL = Executors.newCachedThreadPool(new ThreadFactory() {\n private final AtomicInteger nextId = new AtomicInteger();\n @Override public Thread newThread(Runnable r) {\n return new Thread(r, \"aws-publisher-\" + nextId.getAndIncrement());\n }\n })", ...
{ "body": "public static <R, T> Publisher<T> createPublisher(R request, Function<R, T> f) {\n return createPublisher(DEFAULT_POOL, request, f);\n }", "class_method_signature": "Pagination.createPublisher(R request, Function<R, T> f)", "constructor": false, "full_signature": "public static Publisher<T> creat...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_53
{ "fields": [], "file": "iep-nflxenv/src/test/java/com/netflix/iep/config/ConfigManagerTest.java", "identifier": "ConfigManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void includeDoesNotOverrideSubstitutions() {\n // Prior to typesafe config 1.4.0, this will return \"reference\".\n // https://github.com/lightbend/config/issues/167\n Assert.assertEquals(\"application\", ConfigManager.get().getString(\"iep.substitute\"));\n }", "class_method_si...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConfigManager.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConfigManager.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public static Config get() {\n return CONFIG;\n }", "class_method_signature": "ConfigManager.get()", "constructor": false, "full_signature": "public static Config get()", "identifier": "get", "invocations": [], "modifiers": "public static", "parameters": "()", "return": "Config", "sig...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_170
{ "fields": [ { "declarator": "overrideModule = new AbstractModule() {\n @Override protected void configure() {\n bind(com.typesafe.config.Config.class).toInstance(ConfigFactory.parseString(\"a=b\\nc=d\"));\n\n DefaultSettableConfig dynamic = new DefaultSettableConfig();\n dynamic.setPrope...
{ "body": "@Test\n public void loadConfig() {\n PlatformServiceModule m = new PlatformServiceModule();\n com.typesafe.config.Config c = m.providesTypesafeConfig();\n Assert.assertTrue(c.getBoolean(\"iep.account-config-loaded\"));\n }", "class_method_signature": "PlatformServiceModuleTest.loadConfig()", ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(PlatformServiceModule.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PlatformServiceModule.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "@Provides\n @Singleton\n Config providesTypesafeConfig() {\n return ConfigManager.get();\n }", "class_method_signature": "PlatformServiceModule.providesTypesafeConfig()", "constructor": false, "full_signature": "@Provides @Singleton Config providesTypesafeConfig()", "identifier": "providesTyp...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_127
{ "fields": [ { "declarator": "archaius = new DefaultSettableConfig()", "modifier": "private final", "original_string": "private final SettableConfig archaius = new DefaultSettableConfig();", "type": "SettableConfig", "var_name": "archaius" }, { "declarator": "cfg", ...
{ "body": "@Test\n public void useIpAddressDefaultProp() {\n set(\"niws.client.UseIpAddress\", \"false\");\n Assert.assertFalse(cfg.useIpAddress());\n }", "class_method_signature": "ClientConfigTest.useIpAddressDefaultProp()", "constructor": false, "full_signature": "@Test public void useIpAddressDefaul...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ClientConfig.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ClientConfig.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "boolean useIpAddress() {\n return getBoolean(\"UseIpAddress\", true);\n }", "class_method_signature": "ClientConfig.useIpAddress()", "constructor": false, "full_signature": " boolean useIpAddress()", "identifier": "useIpAddress", "invocations": [ "getBoolean" ], "modifiers": "", "pa...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_90
{ "fields": [ { "declarator": "injector = Guice.createInjector(new AbstractModule() {\n @Override protected void configure() {\n bind(String.class).toInstance(\"foo\");\n bind(BigInteger.class).toInstance(BigInteger.TEN);\n }\n })", "modifier": "final", "original_string": "final...
{ "body": "@Test\n public void getWithPath() {\n String response = endpoint.get(\"math\").toString();\n Assert.assertFalse(response.contains(\"com.google.inject.Injector\"));\n Assert.assertFalse(response.contains(\"java.lang.String\"));\n Assert.assertTrue(response.contains(\"java.math.BigInteger\"));\n...
{ "fields": [ { "declarator": "injector", "modifier": "private final", "original_string": "private final Injector injector;", "type": "Injector", "var_name": "injector" } ], "file": "iep-module-admin/src/main/java/com/netflix/iep/admin/guice/GuiceEndpoint.java", "identifier...
{ "body": "@Override public Object get() {\n return getKeySet(v -> true);\n }", "class_method_signature": "GuiceEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "getKeySet" ], "modifiers": "@Override public", "param...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_28
{ "fields": [ { "declarator": "registry = new DefaultRegistry()", "modifier": "private final", "original_string": "private final Registry registry = new DefaultRegistry();", "type": "Registry", "var_name": "registry" }, { "declarator": "endpoint = new SpectatorEndpoint(...
{ "body": "@Test\n public void getLessThanEqual() {\n List<Object> datapoints = get(\"name,distSummary1,:le\");\n Assert.assertEquals(3, datapoints.size());\n }", "class_method_signature": "SpectatorEndpointTest.getLessThanEqual()", "constructor": false, "full_signature": "@Test public void getLessThanE...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final Registry registry;", "type": "Registry", "var_name": "registry" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/SpectatorEndpoint.java", "identifie...
{ "body": "@Override public Object get() {\n return get(\":true\");\n }", "class_method_signature": "SpectatorEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "get" ], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_86
{ "fields": [], "file": "iep-module-atlas/src/test/java/com/netflix/iep/atlas/AtlasRegistryServiceTest.java", "identifier": "AtlasRegistryServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void validTagCharacters() throws Exception {\n AtlasRegistryService service = new AtlasRegistryService();\n AtlasRegistry registry = (AtlasRegistry) service.getRegistry();\n AtlasConfig config = (AtlasConfig) registry.config();\n Assert.assertEquals(\"-._A-Za-z0-9\", config.vali...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AtlasRegistryService.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AtlasRegistryService.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "Registry getRegistry() {\n if (registry == null) {\n LOGGER.info(\"DI framework does not support @PostConstruct, attempting to start service\");\n try {\n start();\n } catch (Exception e) {\n throw new IllegalStateException(\"failed to start registry service\", e);\n }\...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_69
{ "fields": [], "file": "iep-servergroups/src/test/java/com/netflix/iep/servergroups/ServerGroupTest.java", "identifier": "ServerGroupTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shardedShard2() {\n Assert.assertEquals(\"shard2\", shardedGroup().getShard2());\n }", "class_method_signature": "ServerGroupTest.shardedShard2()", "constructor": false, "full_signature": "@Test public void shardedShard2()", "identifier": "shardedShard2", "invocations": [...
{ "fields": [ { "declarator": "UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instance.Status.UP)", "modifier": "private static final", "original_string": "private static final EnumSet<Instance.Status> UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instanc...
{ "body": "public String getShard2() {\n return shard2;\n }", "class_method_signature": "ServerGroup.getShard2()", "constructor": false, "full_signature": "public String getShard2()", "identifier": "getShard2", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "si...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_214
{ "fields": [ { "declarator": "defaultConfigString = createConfigString(false)", "modifier": "private final", "original_string": "private final String defaultConfigString = createConfigString(false);", "type": "String", "var_name": "defaultConfigString" }, { "declarator...
{ "body": "@Test\n public void removeLeaderUpdatesTheDatabase() {\n leaderElector.removeLeaderFor(new ResourceId(\"test-resource-one\"));\n assertThat(testableLeaderDatabase.databaseHitCount).isEqualTo(1);\n }", "class_method_signature": "StandardLeaderElectorTest.removeLeaderUpdatesTheDatabase()", "const...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(StandardLeaderElector.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(StandardLeaderElector.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public boolean removeLeaderFor(ResourceId resourceId) {\n boolean removed = false;\n try {\n removed = leaderDatabase.removeLeadershipFor(resourceId);\n if (removed) {\n resourceLeaders.put(resourceId, LeaderId.NO_LEADER);\n registry.counter(\n leaderRe...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_49
{ "fields": [], "file": "iep-nflxenv/src/test/java/com/netflix/iep/config/ConfigManagerTest.java", "identifier": "ConfigManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void accountConfig() {\n Assert.assertTrue(ConfigManager.get().getBoolean(\"iep.account-config-loaded\"));\n }", "class_method_signature": "ConfigManagerTest.accountConfig()", "constructor": false, "full_signature": "@Test public void accountConfig()", "identifier": "accountConf...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConfigManager.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConfigManager.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public static Config get() {\n return CONFIG;\n }", "class_method_signature": "ConfigManager.get()", "constructor": false, "full_signature": "public static Config get()", "identifier": "get", "invocations": [], "modifiers": "public static", "parameters": "()", "return": "Config", "sig...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_185
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void createCredentialsProvider() {\n AwsClientFactory factory = new AwsClientFactory(config);\n AwsCredentialsProvider creds = factory.createCredentialsProvider(null, null);\n Assert.assertTrue(creds instanceof DefaultCredentialsProvider);\n }", "class_method_signature": "AwsCli...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "AwsCredentialsProvider createCredentialsProvider(String name, String accountId) {\n final AwsCredentialsProvider dflt = DefaultCredentialsProvider.builder()\n .asyncCredentialUpdateEnabled(true)\n .build();\n final Config cfg = getConfig(name, \"credentials\");\n if (cfg.hasPath(\"ro...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_2
{ "fields": [], "file": "iep-service/src/test/java/com/netflix/iep/service/DefaultClassFactoryTest.java", "identifier": "DefaultClassFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void singleConstructor() {\n Map<Class<?>, Object> bindings = new HashMap<>();\n bindings.put(Integer.TYPE, 1);\n ClassFactory factory = new DefaultClassFactory(bindings::get);\n SingleConstructor obj = factory.newInstance(SingleConstructor.class);\n Assert.assertEquals(1, ob...
{ "fields": [ { "declarator": "bindings", "modifier": "private final", "original_string": "private final Function<Type, Object> bindings;", "type": "Function<Type, Object>", "var_name": "bindings" } ], "file": "iep-service/src/main/java/com/netflix/iep/service/DefaultClassFac...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Override public <T> T newInstance(Type type, Function<Type, Object> overrides)\n throws CreationException {\n Class<?> cls = (Class<?>) type;\n Constructor<?>[] constructors = cls.getDeclaredConstructors();\n if (constructors.length == 1) {\n Construc...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_193
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void newInstanceInterfaceAsync() throws Exception {\n AwsClientFactory factory = new AwsClientFactory(config);\n Ec2AsyncClient ec2 = factory.newInstance(Ec2AsyncClient.class);\n Assert.assertNotNull(ec2);\n }", "class_method_signature": "AwsClientFactoryTest.newInstanceInterfac...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public <T> T newInstance(Class<T> cls) {\n return newInstance(getDefaultName(cls), cls);\n }", "class_method_signature": "AwsClientFactory.newInstance(Class<T> cls)", "constructor": false, "full_signature": "public T newInstance(Class<T> cls)", "identifier": "newInstance", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_202
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void settingsTimeout() {\n AwsClientFactory factory = new AwsClientFactory(config);\n ClientOverrideConfiguration settings = factory.createClientConfig(\"timeouts\");\n Assert.assertEquals(Duration.ofMillis(42000), settings.apiCallAttemptTimeout().get());\n Assert.assertEquals(D...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "ClientOverrideConfiguration createClientConfig(String name) {\n final Config cfg = getConfig(name, \"client\");\n ClientOverrideConfiguration.Builder builder = ClientOverrideConfiguration.builder();\n\n setIfPresent(cfg, \"api-call-timeout\", builder::apiCallTimeout);\n setIfPresent(cfg, \"api-...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_150
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void getInstanceName() throws Exception {\n AwsClientFactory factory = new AwsClientFactory(config);\n AmazonEC2 ec2 = factory.getInstance(\"ec2-test\", AmazonEC2.class);\n Assert.assertNotNull(ec2);\n Assert.assertSame(ec2, factory.getInstance(\"ec2-test\", AmazonEC2.class));\n...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public <T> T getInstance(Class<T> cls) {\n return getInstance(getDefaultName(cls), cls);\n }", "class_method_signature": "AwsClientFactory.getInstance(Class<T> cls)", "constructor": false, "full_signature": "public T getInstance(Class<T> cls)", "identifier": "getInstance", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_73
{ "fields": [], "file": "iep-servergroups/src/test/java/com/netflix/iep/servergroups/ServerGroupTest.java", "identifier": "ServerGroupTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void instances() {\n Assert.assertEquals(Collections.singletonList(defaultInstance()), defaultGroup().getInstances());\n }", "class_method_signature": "ServerGroupTest.instances()", "constructor": false, "full_signature": "@Test public void instances()", "identifier": "instances...
{ "fields": [ { "declarator": "UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instance.Status.UP)", "modifier": "private static final", "original_string": "private static final EnumSet<Instance.Status> UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instanc...
{ "body": "public List<Instance> getInstances() {\n return instances;\n }", "class_method_signature": "ServerGroup.getInstances()", "constructor": false, "full_signature": "public List<Instance> getInstances()", "identifier": "getInstances", "invocations": [], "modifiers": "public", "parameters": "(...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_107
{ "fields": [ { "declarator": "clock = new ManualClock()", "modifier": "private final", "original_string": "private final ManualClock clock = new ManualClock();", "type": "ManualClock", "var_name": "clock" }, { "declarator": "registry = new DefaultRegistry(clock)", ...
{ "body": "@Test\n public void getAddrInvalid() throws Exception {\n UserServiceEndpoint endpoint = new UserServiceEndpoint(new WhitelistUserService(context));\n\n Map<String, Object> expected = new LinkedHashMap<>();\n expected.put(\"isValidEmail\", false);\n expected.put(\"toValidEmail\", null);\n\n ...
{ "fields": [ { "declarator": "service", "modifier": "private final", "original_string": "private final UserService service;", "type": "UserService", "var_name": "service" } ], "file": "iep-module-userservice/src/main/java/com/netflix/iep/userservice/UserServiceEndpoint.java"...
{ "body": "@Override public Object get() {\n return service.emailAddresses();\n }", "class_method_signature": "UserServiceEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "emailAddresses" ], "modifiers": "@Override pu...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_24
{ "fields": [ { "declarator": "registry = new DefaultRegistry()", "modifier": "private final", "original_string": "private final Registry registry = new DefaultRegistry();", "type": "Registry", "var_name": "registry" }, { "declarator": "endpoint = new SpectatorEndpoint(...
{ "body": "@Test\n public void getHasB() {\n List<Object> datapoints = get(\"b,:has\");\n Assert.assertEquals(1, datapoints.size());\n }", "class_method_signature": "SpectatorEndpointTest.getHasB()", "constructor": false, "full_signature": "@Test public void getHasB()", "identifier": "getHasB", "inv...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final Registry registry;", "type": "Registry", "var_name": "registry" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/SpectatorEndpoint.java", "identifie...
{ "body": "@Override public Object get() {\n return get(\":true\");\n }", "class_method_signature": "SpectatorEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "get" ], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_111
{ "fields": [ { "declarator": "clock = new ManualClock()", "modifier": "private final", "original_string": "private final ManualClock clock = new ManualClock();", "type": "ManualClock", "var_name": "clock" }, { "declarator": "registry = new DefaultRegistry(clock)", ...
{ "body": "@Test\n public void unknownEmail() {\n HttpUserService service = new HttpUserService(ctxt, \"http-404\");\n Assert.assertFalse(service.isValidEmail(\"bob@example.com\"));\n }", "class_method_signature": "HttpUserServiceTest.unknownEmail()", "constructor": false, "full_signature": "@Test publi...
{ "fields": [ { "declarator": "context", "modifier": "private final", "original_string": "private final Context context;", "type": "Context", "var_name": "context" }, { "declarator": "enabled", "modifier": "private final", "original_string": "private final b...
{ "body": "@Override\n public boolean isValidEmail(String email) {\n String sanitizedEmail = UserUtils.baseAddress(email.toLowerCase(Locale.US));\n return enabled && checkCache(sanitizedEmail);\n }", "class_method_signature": "HttpUserService.isValidEmail(String email)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_32
{ "fields": [ { "declarator": "registry = new DefaultRegistry()", "modifier": "private final", "original_string": "private final Registry registry = new DefaultRegistry();", "type": "Registry", "var_name": "registry" }, { "declarator": "endpoint = new SpectatorEndpoint(...
{ "body": "@Test\n public void getIn2() {\n List<Object> datapoints = get(\"name,(,counter1,gauge1,),:in\");\n Assert.assertEquals(2, datapoints.size());\n }", "class_method_signature": "SpectatorEndpointTest.getIn2()", "constructor": false, "full_signature": "@Test public void getIn2()", "identifier"...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final Registry registry;", "type": "Registry", "var_name": "registry" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/SpectatorEndpoint.java", "identifie...
{ "body": "@Override public Object get() {\n return get(\":true\");\n }", "class_method_signature": "SpectatorEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "get" ], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_146
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test(expected = RuntimeException.class)\n public void newInstanceBadClass() throws Exception {\n AwsClientFactory factory = new AwsClientFactory(config);\n factory.newInstance(AwsClientFactory.class);\n }", "class_method_signature": "AwsClientFactoryTest.newInstanceBadClass()", "constructor": ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public <T> T newInstance(Class<T> cls) {\n return newInstance(getDefaultName(cls), cls);\n }", "class_method_signature": "AwsClientFactory.newInstance(Class<T> cls)", "constructor": false, "full_signature": "public T newInstance(Class<T> cls)", "identifier": "newInstance", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_65
{ "fields": [], "file": "iep-servergroups/src/test/java/com/netflix/iep/servergroups/ServerGroupTest.java", "identifier": "ServerGroupTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shard1() {\n Assert.assertNull(defaultGroup().getShard1());\n }", "class_method_signature": "ServerGroupTest.shard1()", "constructor": false, "full_signature": "@Test public void shard1()", "identifier": "shard1", "invocations": [ "assertNull", "getShard1", "d...
{ "fields": [ { "declarator": "UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instance.Status.UP)", "modifier": "private static final", "original_string": "private static final EnumSet<Instance.Status> UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instanc...
{ "body": "public String getShard1() {\n return shard1;\n }", "class_method_signature": "ServerGroup.getShard1()", "constructor": false, "full_signature": "public String getShard1()", "identifier": "getShard1", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "si...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_147
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void newInstanceName() throws Exception {\n AwsClientFactory factory = new AwsClientFactory(config);\n AmazonEC2 ec2 = factory.newInstance(\"ec2-test\", AmazonEC2.class);\n Assert.assertNotNull(ec2);\n }", "class_method_signature": "AwsClientFactoryTest.newInstanceName()", "co...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public <T> T newInstance(Class<T> cls) {\n return newInstance(getDefaultName(cls), cls);\n }", "class_method_signature": "AwsClientFactory.newInstance(Class<T> cls)", "constructor": false, "full_signature": "public T newInstance(Class<T> cls)", "identifier": "newInstance", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_64
{ "fields": [], "file": "iep-servergroups/src/test/java/com/netflix/iep/servergroups/ServerGroupTest.java", "identifier": "ServerGroupTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void detail() {\n Assert.assertEquals(\"detail\", defaultGroup().getDetail());\n }", "class_method_signature": "ServerGroupTest.detail()", "constructor": false, "full_signature": "@Test public void detail()", "identifier": "detail", "invocations": [ "assertEquals", "ge...
{ "fields": [ { "declarator": "UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instance.Status.UP)", "modifier": "private static final", "original_string": "private static final EnumSet<Instance.Status> UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instanc...
{ "body": "public String getDetail() {\n return detail;\n }", "class_method_signature": "ServerGroup.getDetail()", "constructor": false, "full_signature": "public String getDetail()", "identifier": "getDetail", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "si...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_110
{ "fields": [ { "declarator": "clock = new ManualClock()", "modifier": "private final", "original_string": "private final ManualClock clock = new ManualClock();", "type": "ManualClock", "var_name": "clock" }, { "declarator": "registry = new DefaultRegistry(clock)", ...
{ "body": "@Test\n public void validEmail() {\n HttpUserService service = new HttpUserService(ctxt, \"http-200\");\n Assert.assertTrue(service.isValidEmail(\"bob@example.com\"));\n }", "class_method_signature": "HttpUserServiceTest.validEmail()", "constructor": false, "full_signature": "@Test public voi...
{ "fields": [ { "declarator": "context", "modifier": "private final", "original_string": "private final Context context;", "type": "Context", "var_name": "context" }, { "declarator": "enabled", "modifier": "private final", "original_string": "private final b...
{ "body": "@Override\n public boolean isValidEmail(String email) {\n String sanitizedEmail = UserUtils.baseAddress(email.toLowerCase(Locale.US));\n return enabled && checkCache(sanitizedEmail);\n }", "class_method_signature": "HttpUserService.isValidEmail(String email)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_33
{ "fields": [ { "declarator": "registry = new DefaultRegistry()", "modifier": "private final", "original_string": "private final Registry registry = new DefaultRegistry();", "type": "Registry", "var_name": "registry" }, { "declarator": "endpoint = new SpectatorEndpoint(...
{ "body": "@Test\n public void getInEmpty() {\n List<Object> datapoints = get(\"name,(,),:in\");\n Assert.assertEquals(0, datapoints.size());\n }", "class_method_signature": "SpectatorEndpointTest.getInEmpty()", "constructor": false, "full_signature": "@Test public void getInEmpty()", "identifier": "g...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final Registry registry;", "type": "Registry", "var_name": "registry" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/SpectatorEndpoint.java", "identifie...
{ "body": "@Override public Object get() {\n return get(\":true\");\n }", "class_method_signature": "SpectatorEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "get" ], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_106
{ "fields": [ { "declarator": "clock = new ManualClock()", "modifier": "private final", "original_string": "private final ManualClock clock = new ManualClock();", "type": "ManualClock", "var_name": "clock" }, { "declarator": "registry = new DefaultRegistry(clock)", ...
{ "body": "@Test\n public void getAddrInvalidMapped() throws Exception {\n UserServiceEndpoint endpoint = new UserServiceEndpoint(new WhitelistUserService(context));\n\n Map<String, Object> expected = new LinkedHashMap<>();\n expected.put(\"isValidEmail\", false);\n expected.put(\"toValidEmail\", \"foo@e...
{ "fields": [ { "declarator": "service", "modifier": "private final", "original_string": "private final UserService service;", "type": "UserService", "var_name": "service" } ], "file": "iep-module-userservice/src/main/java/com/netflix/iep/userservice/UserServiceEndpoint.java"...
{ "body": "@Override public Object get() {\n return service.emailAddresses();\n }", "class_method_signature": "UserServiceEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "emailAddresses" ], "modifiers": "@Override pu...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_25
{ "fields": [ { "declarator": "registry = new DefaultRegistry()", "modifier": "private final", "original_string": "private final Registry registry = new DefaultRegistry();", "type": "Registry", "var_name": "registry" }, { "declarator": "endpoint = new SpectatorEndpoint(...
{ "body": "@Test\n public void getEqual() {\n List<Object> datapoints = get(\"name,counter1,:eq\");\n Assert.assertEquals(1, datapoints.size());\n }", "class_method_signature": "SpectatorEndpointTest.getEqual()", "constructor": false, "full_signature": "@Test public void getEqual()", "identifier": "ge...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final Registry registry;", "type": "Registry", "var_name": "registry" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/SpectatorEndpoint.java", "identifie...
{ "body": "@Override public Object get() {\n return get(\":true\");\n }", "class_method_signature": "SpectatorEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "get" ], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_151
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void settingsBooleanTrue() {\n AwsClientFactory factory = new AwsClientFactory(config);\n ClientConfiguration settings = factory.createClientConfig(\"boolean-true\");\n Assert.assertTrue(settings.useReaper());\n Assert.assertTrue(settings.useTcpKeepAlive());\n Assert.assertTr...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "ClientConfiguration createClientConfig(String name) {\n final Config cfg = getConfig(name, \"client\");\n final ClientConfiguration settings = new ClientConfiguration();\n\n // Should be the default, but just to make it explicit\n settings.setProtocol(Protocol.HTTPS);\n\n // Helpers\n Fun...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_72
{ "fields": [], "file": "iep-servergroups/src/test/java/com/netflix/iep/servergroups/ServerGroupTest.java", "identifier": "ServerGroupTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void desiredSize() {\n Assert.assertEquals(42, defaultGroup().getDesiredSize());\n }", "class_method_signature": "ServerGroupTest.desiredSize()", "constructor": false, "full_signature": "@Test public void desiredSize()", "identifier": "desiredSize", "invocations": [ "asser...
{ "fields": [ { "declarator": "UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instance.Status.UP)", "modifier": "private static final", "original_string": "private static final EnumSet<Instance.Status> UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instanc...
{ "body": "public int getDesiredSize() {\n return desiredSize;\n }", "class_method_signature": "ServerGroup.getDesiredSize()", "constructor": false, "full_signature": "public int getDesiredSize()", "identifier": "getDesiredSize", "invocations": [], "modifiers": "public", "parameters": "()", "retur...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_203
{ "fields": [], "file": "iep-leader-api/src/test/java/com/netflix/iep/leader/api/LeaderIdTest.java", "identifier": "LeaderIdTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void nullIdThrows() {\n assertThatNullPointerException().isThrownBy(() -> LeaderId.create((String) null));\n }", "class_method_signature": "LeaderIdTest.nullIdThrows()", "constructor": false, "full_signature": "@Test public void nullIdThrows()", "identifier": "nullIdThrows", "...
{ "fields": [ { "declarator": "LEADER_ID_CONFIG_PATH = \"iep.leader.leaderId\"", "modifier": "private static final", "original_string": "private static final String LEADER_ID_CONFIG_PATH = \"iep.leader.leaderId\";", "type": "String", "var_name": "LEADER_ID_CONFIG_PATH" }, { ...
{ "body": "public static LeaderId create(Config config) {\n try {\n return new LeaderId(config.getString(LEADER_ID_CONFIG_PATH));\n } catch (Exception e) {\n throw new IllegalArgumentException(\"Invalid '\" + LEADER_ID_CONFIG_PATH + \"'\", e);\n }\n }", "class_method_signature": "LeaderId.create...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_192
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void newInstanceName() throws Exception {\n AwsClientFactory factory = new AwsClientFactory(config);\n Ec2Client ec2 = factory.newInstance(\"ec2-test\", Ec2Client.class);\n Assert.assertNotNull(ec2);\n }", "class_method_signature": "AwsClientFactoryTest.newInstanceName()", "co...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public <T> T newInstance(Class<T> cls) {\n return newInstance(getDefaultName(cls), cls);\n }", "class_method_signature": "AwsClientFactory.newInstance(Class<T> cls)", "constructor": false, "full_signature": "public T newInstance(Class<T> cls)", "identifier": "newInstance", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_3
{ "fields": [], "file": "iep-service/src/test/java/com/netflix/iep/service/DefaultClassFactoryTest.java", "identifier": "DefaultClassFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void singlePrivateConstructor() {\n Map<Class<?>, Object> bindings = new HashMap<>();\n bindings.put(Integer.TYPE, 1);\n ClassFactory factory = new DefaultClassFactory(bindings::get);\n SinglePrivateConstructor obj = factory.newInstance(SinglePrivateConstructor.class);\n Asse...
{ "fields": [ { "declarator": "bindings", "modifier": "private final", "original_string": "private final Function<Type, Object> bindings;", "type": "Function<Type, Object>", "var_name": "bindings" } ], "file": "iep-service/src/main/java/com/netflix/iep/service/DefaultClassFac...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Override public <T> T newInstance(Type type, Function<Type, Object> overrides)\n throws CreationException {\n Class<?> cls = (Class<?>) type;\n Constructor<?>[] constructors = cls.getDeclaredConstructors();\n if (constructors.length == 1) {\n Construc...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_48
{ "fields": [ { "declarator": "endpoint = new ServicesEndpoint(new ServiceManager(services()))", "modifier": "private final", "original_string": "private final ServicesEndpoint endpoint = new ServicesEndpoint(new ServiceManager(services()));", "type": "ServicesEndpoint", "var_name": ...
{ "body": "@Test\n public void getWithPath() {\n // Should always return null, path isn't supported\n Assert.assertNull(endpoint.get(\"running-service\"));\n }", "class_method_signature": "ServicesEndpointTest.getWithPath()", "constructor": false, "full_signature": "@Test public void getWithPath()", "...
{ "fields": [ { "declarator": "manager", "modifier": "private final", "original_string": "private final ServiceManager manager;", "type": "ServiceManager", "var_name": "manager" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/ServicesEndpoint.java", "i...
{ "body": "@Override public Object get() {\n return manager.services()\n .stream()\n .map(this::toMap)\n .collect(Collectors.toList());\n }", "class_method_signature": "ServicesEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_184
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void createClientConfigOverrideWithDefaults() {\n AwsClientFactory factory = new AwsClientFactory(config);\n ClientOverrideConfiguration settings = factory.createClientConfig(\"ec2-test-default\");\n Assert.assertEquals(\"override-defaults\", getUserAgentPrefix(settings));\n }", ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "ClientOverrideConfiguration createClientConfig(String name) {\n final Config cfg = getConfig(name, \"client\");\n ClientOverrideConfiguration.Builder builder = ClientOverrideConfiguration.builder();\n\n setIfPresent(cfg, \"api-call-timeout\", builder::apiCallTimeout);\n setIfPresent(cfg, \"api-...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_215
{ "fields": [ { "declarator": "defaultConfigString = createConfigString(false)", "modifier": "private final", "original_string": "private final String defaultConfigString = createConfigString(false);", "type": "String", "var_name": "defaultConfigString" }, { "declarator...
{ "body": "@Test\n public void addResourceDoesNotHitTheDatabase() {\n leaderElector.addResource(new ResourceId(\"test-resource-one\"));\n assertThat(testableLeaderDatabase.databaseHitCount).isEqualTo(0);\n }", "class_method_signature": "StandardLeaderElectorTest.addResourceDoesNotHitTheDatabase()", "const...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(StandardLeaderElector.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(StandardLeaderElector.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public boolean addResource(ResourceId resourceId) {\n final boolean addResource = !resourceLeaders.containsKey(resourceId);\n if (addResource) {\n resourceLeaders.put(resourceId, LeaderId.UNKNOWN);\n }\n\n return addResource;\n }", "class_method_signature": "StandardLeaderE...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_87
{ "fields": [ { "declarator": "injector = Guice.createInjector(new AbstractModule() {\n @Override protected void configure() {\n bind(String.class).toInstance(\"foo\");\n bind(BigInteger.class).toInstance(BigInteger.TEN);\n }\n })", "modifier": "final", "original_string": "final...
{ "body": "@Test\n public void get() {\n Assert.assertTrue(endpoint.get().toString().contains(\"com.google.inject.Injector\"));\n Assert.assertTrue(endpoint.get().toString().contains(\"java.lang.String\"));\n Assert.assertTrue(endpoint.get().toString().contains(\"java.math.BigInteger\"));\n Assert.assert...
{ "fields": [ { "declarator": "injector", "modifier": "private final", "original_string": "private final Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "guiceEndpoint", "modifier": "private final", "original_string": "priv...
{ "body": "@Override public Object get() {\n return guiceEndpoint.getKeySet(v -> true);\n }", "class_method_signature": "GuiceDebugEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "getKeySet" ], "modifiers": "@Overrid...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_68
{ "fields": [], "file": "iep-servergroups/src/test/java/com/netflix/iep/servergroups/ServerGroupTest.java", "identifier": "ServerGroupTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shardedShard1() {\n Assert.assertEquals(\"shard1\", shardedGroup().getShard1());\n }", "class_method_signature": "ServerGroupTest.shardedShard1()", "constructor": false, "full_signature": "@Test public void shardedShard1()", "identifier": "shardedShard1", "invocations": [...
{ "fields": [ { "declarator": "UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instance.Status.UP)", "modifier": "private static final", "original_string": "private static final EnumSet<Instance.Status> UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instanc...
{ "body": "public String getShard1() {\n return shard1;\n }", "class_method_signature": "ServerGroup.getShard1()", "constructor": false, "full_signature": "public String getShard1()", "identifier": "getShard1", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "si...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_29
{ "fields": [ { "declarator": "registry = new DefaultRegistry()", "modifier": "private final", "original_string": "private final Registry registry = new DefaultRegistry();", "type": "Registry", "var_name": "registry" }, { "declarator": "endpoint = new SpectatorEndpoint(...
{ "body": "@Test\n public void getGreaterThan() {\n List<Object> datapoints = get(\"name,gauge1,:gt\");\n Assert.assertEquals(1, datapoints.size());\n }", "class_method_signature": "SpectatorEndpointTest.getGreaterThan()", "constructor": false, "full_signature": "@Test public void getGreaterThan()", "...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final Registry registry;", "type": "Registry", "var_name": "registry" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/SpectatorEndpoint.java", "identifie...
{ "body": "@Override public Object get() {\n return get(\":true\");\n }", "class_method_signature": "SpectatorEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "get" ], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_91
{ "fields": [], "file": "iep-guice/src/test/java/com/netflix/iep/guice/MainTest.java", "identifier": "MainTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void runWithNoModules() throws Exception {\n System.setProperty(\"netflix.iep.guice.useServiceLoader\", \"false\");\n Main m = new Main();\n m.runImpl(new String[]{});\n }", "class_method_signature": "MainTest.runWithNoModules()", "constructor": false, "full_signature": "@Te...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Main.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "U...
{ "body": "void runImpl(String[] args, Module... additionalModules) throws Exception {\n try {\n // Setup binding for command line arguments\n Module argsModule = new AbstractModule() {\n @Override protected void configure() {\n Multibinder.newSetBinder(binder(), Service.class);\n ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_126
{ "fields": [ { "declarator": "archaius = new DefaultSettableConfig()", "modifier": "private final", "original_string": "private final SettableConfig archaius = new DefaultSettableConfig();", "type": "SettableConfig", "var_name": "archaius" }, { "declarator": "cfg", ...
{ "body": "@Test\n public void useIpAddressNoProp() {\n Assert.assertTrue(cfg.useIpAddress());\n }", "class_method_signature": "ClientConfigTest.useIpAddressNoProp()", "constructor": false, "full_signature": "@Test public void useIpAddressNoProp()", "identifier": "useIpAddressNoProp", "invocations": [ ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ClientConfig.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ClientConfig.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "boolean useIpAddress() {\n return getBoolean(\"UseIpAddress\", true);\n }", "class_method_signature": "ClientConfig.useIpAddress()", "constructor": false, "full_signature": " boolean useIpAddress()", "identifier": "useIpAddress", "invocations": [ "getBoolean" ], "modifiers": "", "pa...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_52
{ "fields": [], "file": "iep-nflxenv/src/test/java/com/netflix/iep/config/ConfigManagerTest.java", "identifier": "ConfigManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void includeOverrides() {\n Assert.assertEquals(\"classpath\", ConfigManager.get().getString(\"iep.value\"));\n }", "class_method_signature": "ConfigManagerTest.includeOverrides()", "constructor": false, "full_signature": "@Test public void includeOverrides()", "identifier": "in...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ConfigManager.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ConfigManager.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public static Config get() {\n return CONFIG;\n }", "class_method_signature": "ConfigManager.get()", "constructor": false, "full_signature": "public static Config get()", "identifier": "get", "invocations": [], "modifiers": "public static", "parameters": "()", "return": "Config", "sig...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_171
{ "fields": [ { "declarator": "overrideModule = new AbstractModule() {\n @Override protected void configure() {\n bind(com.typesafe.config.Config.class).toInstance(ConfigFactory.parseString(\"a=b\\nc=d\"));\n\n DefaultSettableConfig dynamic = new DefaultSettableConfig();\n dynamic.setPrope...
{ "body": "@Test\n public void appConfigIsLoaded() {\n PlatformServiceModule m = new PlatformServiceModule();\n com.typesafe.config.Config c = m.providesTypesafeConfig();\n Assert.assertEquals(\"app\", c.getString(\"iep.test.which-config\"));\n }", "class_method_signature": "PlatformServiceModuleTest.app...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(PlatformServiceModule.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PlatformServiceModule.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "@Provides\n @Singleton\n Config providesTypesafeConfig() {\n return ConfigManager.get();\n }", "class_method_signature": "PlatformServiceModule.providesTypesafeConfig()", "constructor": false, "full_signature": "@Provides @Singleton Config providesTypesafeConfig()", "identifier": "providesTyp...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_188
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void createCredentialsProviderForAccountNull() throws Exception {\n AwsClientFactory factory = new AwsClientFactory(config);\n factory.createCredentialsProvider(\"ec2-account\", null);\n }", "class_method_signature": "AwsClientFactoryTest....
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "AwsCredentialsProvider createCredentialsProvider(String name, String accountId) {\n final AwsCredentialsProvider dflt = DefaultCredentialsProvider.builder()\n .asyncCredentialUpdateEnabled(true)\n .build();\n final Config cfg = getConfig(name, \"credentials\");\n if (cfg.hasPath(\"ro...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_44
{ "fields": [ { "declarator": "registry = new DefaultRegistry()", "modifier": "private final", "original_string": "private final Registry registry = new DefaultRegistry();", "type": "Registry", "var_name": "registry" }, { "declarator": "endpoint = new SpectatorEndpoint(...
{ "body": "@Test\n public void getGauge1() {\n List<SpectatorEndpoint.GaugeInfo> datapoints = get(\"name,gauge1,:eq\");\n Assert.assertEquals(1, datapoints.size());\n Assert.assertEquals(1, datapoints.get(0).getTags().size());\n Assert.assertEquals(100.0, datapoints.get(0).getValue(), 1e-12);\n }", "c...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final Registry registry;", "type": "Registry", "var_name": "registry" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/SpectatorEndpoint.java", "identifie...
{ "body": "@Override public Object get() {\n return get(\":true\");\n }", "class_method_signature": "SpectatorEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "get" ], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_167
{ "fields": [], "file": "iep-module-aws/src/test/java/com/netflix/iep/aws/PaginationTest.java", "identifier": "PaginationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void route53HostedZones() throws Exception {\n SortedSet<String> pages = newPageSet(5);\n final Iterator<String> reqIt = pages.iterator();\n final Iterator<String> resIt = pages.iterator();\n Function<ListHostedZonesRequest, ListHostedZonesResult> f = r -> {\n if (r.getMark...
{ "fields": [ { "declarator": "DEFAULT_POOL = Executors.newCachedThreadPool(new ThreadFactory() {\n private final AtomicInteger nextId = new AtomicInteger();\n @Override public Thread newThread(Runnable r) {\n return new Thread(r, \"aws-publisher-\" + nextId.getAndIncrement());\n }\n })", ...
{ "body": "public static <R, T> Publisher<T> createPublisher(R request, Function<R, T> f) {\n return createPublisher(DEFAULT_POOL, request, f);\n }", "class_method_signature": "Pagination.createPublisher(R request, Function<R, T> f)", "constructor": false, "full_signature": "public static Publisher<T> creat...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_13
{ "fields": [ { "declarator": "clock = new ManualClock()", "modifier": "private final", "original_string": "private final ManualClock clock = new ManualClock();", "type": "ManualClock", "var_name": "clock" }, { "declarator": "registry = new DefaultRegistry(clock)", ...
{ "body": "@Test\n public void getJars() {\n Pattern spectatorJar = Pattern.compile(\"spectator-api-[^\\\",]+\\\\.jar\");\n String response = endpoint.get(\"jars\").toString();\n Assert.assertTrue(spectatorJar.matcher(response).find());\n }", "class_method_signature": "BaseServerEndpointTest.getJars()", ...
{ "fields": [ { "declarator": "jars = new JarsEndpoint()", "modifier": "private final", "original_string": "private final JarsEndpoint jars = new JarsEndpoint();", "type": "JarsEndpoint", "var_name": "jars" }, { "declarator": "registry", "modifier": "private final...
{ "body": "private Object getJars() {\n Map<String, Object> wrapper = new TreeMap<>();\n wrapper.put(\"jars\", jars.jars());\n return wrapper;\n }", "class_method_signature": "BaseServerEndpoint.getJars()", "constructor": false, "full_signature": "private Object getJars()", "identifier": "getJars", ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_130
{ "fields": [], "file": "iep-rxhttp/src/test/java/com/netflix/iep/http/ByteBufsTest.java", "identifier": "ByteBufsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void gzip() throws Exception {\n byte[] data = \"foo\".getBytes(StandardCharsets.UTF_8);\n byte[] compressed = obs(data)\n .compose(ByteBufs.gzip())\n .compose(ByteBufs.aggrByteArray())\n .toBlocking().first();\n Assert.assertArrayEquals(data, gzipDecompress(co...
{ "fields": [], "file": "iep-rxhttp/src/main/java/com/netflix/iep/http/ByteBufs.java", "identifier": "ByteBufs", "interfaces": "", "methods": [ { "class_method_signature": "ByteBufs.ByteBufs()", "constructor": true, "full_signature": "private ByteBufs()", "identifier": "ByteBufs",...
{ "body": "public static Observable.Transformer<ByteBuf, ByteBuf> gzip() {\n return input -> encode(input, new EmbeddedChannel(new JdkZlibEncoder(ZlibWrapper.GZIP)));\n }", "class_method_signature": "ByteBufs.gzip()", "constructor": false, "full_signature": "public static Observable.Transformer<ByteBuf, Byt...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_212
{ "fields": [ { "declarator": "defaultConfigString = createConfigString(false)", "modifier": "private final", "original_string": "private final String defaultConfigString = createConfigString(false);", "type": "String", "var_name": "defaultConfigString" }, { "declarator...
{ "body": "@Test\n public void initializeResourceLeaderMapHandlesMultipleResources() {\n final ResourceId id1 = new ResourceId(\"test-resource-one\");\n final ResourceId id2 = new ResourceId(\"test-resource-two\");\n final ResourceId id3 = new ResourceId(\"test-resource-three\");\n final Map<ResourceId, ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(StandardLeaderElector.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(StandardLeaderElector.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "static Map<ResourceId, LeaderId> initializeResourceLeaderMap(Collection<ResourceId> ids) {\n return ids.stream().collect(Collectors.toMap(Function.identity(), s -> LeaderId.UNKNOWN));\n }", "class_method_signature": "StandardLeaderElector.initializeResourceLeaderMap(Collection<ResourceId> ids)", "c...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_18
{ "fields": [ { "declarator": "endpoint = new EnvEndpoint()", "modifier": "private final", "original_string": "private final EnvEndpoint endpoint = new EnvEndpoint();", "type": "EnvEndpoint", "var_name": "endpoint" } ], "file": "iep-admin/src/test/java/com/netflix/iep/admin/e...
{ "body": "@Test @SuppressWarnings(\"unchecked\")\n public void getPropertiesWithPrefix() {\n Assume.assumeTrue(System.getenv(\"JAVA_HOME\") != null);\n Map<String, String> map = (Map<String, String>) endpoint.get(\"JAVA_\");\n int size = (int) System.getenv()\n .keySet()\n .stream()\n ...
{ "fields": [], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/EnvEndpoint.java", "identifier": "EnvEndpoint", "interfaces": "implements HttpEndpoint", "methods": [ { "class_method_signature": "EnvEndpoint.get()", "constructor": false, "full_signature": "@Override publi...
{ "body": "@Override public Object get() {\n return new TreeMap<>(System.getenv());\n }", "class_method_signature": "EnvEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "getenv" ], "modifiers": "@Override public", "...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_183
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void createClientConfigOverride() {\n AwsClientFactory factory = new AwsClientFactory(config);\n ClientOverrideConfiguration settings = factory.createClientConfig(\"ec2-test\");\n Assert.assertEquals(\"ignored-defaults\", getUserAgentPrefix(settings));\n }", "class_method_signat...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "ClientOverrideConfiguration createClientConfig(String name) {\n final Config cfg = getConfig(name, \"client\");\n ClientOverrideConfiguration.Builder builder = ClientOverrideConfiguration.builder();\n\n setIfPresent(cfg, \"api-call-timeout\", builder::apiCallTimeout);\n setIfPresent(cfg, \"api-...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_4
{ "fields": [], "file": "iep-service/src/test/java/com/netflix/iep/service/DefaultClassFactoryTest.java", "identifier": "DefaultClassFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void providerConstructor() {\n Map<Type, Object> bindings = new HashMap<>();\n bindings.put(ProviderConstructor.getProviderType(), (Provider<Integer>) () -> 1);\n ClassFactory factory = new DefaultClassFactory(bindings::get);\n ProviderConstructor obj = factory.newInstance(Provi...
{ "fields": [ { "declarator": "bindings", "modifier": "private final", "original_string": "private final Function<Type, Object> bindings;", "type": "Function<Type, Object>", "var_name": "bindings" } ], "file": "iep-service/src/main/java/com/netflix/iep/service/DefaultClassFac...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Override public <T> T newInstance(Type type, Function<Type, Object> overrides)\n throws CreationException {\n Class<?> cls = (Class<?>) type;\n Constructor<?>[] constructors = cls.getDeclaredConstructors();\n if (constructors.length == 1) {\n Construc...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_195
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void getInstanceClient() throws Exception {\n AwsClientFactory factory = new AwsClientFactory(config);\n Ec2Client ec2 = factory.getInstance(Ec2Client.class);\n Assert.assertNotNull(ec2);\n Assert.assertSame(ec2, factory.getInstance(Ec2Client.class));\n }", "class_method_sign...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "public <T> T getInstance(Class<T> cls) {\n return getInstance(getDefaultName(cls), cls);\n }", "class_method_signature": "AwsClientFactory.getInstance(Class<T> cls)", "constructor": false, "full_signature": "public T getInstance(Class<T> cls)", "identifier": "getInstance", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_59
{ "fields": [], "file": "iep-servergroups/src/test/java/com/netflix/iep/servergroups/ServerGroupTest.java", "identifier": "ServerGroupTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void platform() {\n Assert.assertEquals(\"ec2\", defaultGroup().getPlatform());\n }", "class_method_signature": "ServerGroupTest.platform()", "constructor": false, "full_signature": "@Test public void platform()", "identifier": "platform", "invocations": [ "assertEquals", ...
{ "fields": [ { "declarator": "UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instance.Status.UP)", "modifier": "private static final", "original_string": "private static final EnumSet<Instance.Status> UNION_STATUSES =\n EnumSet.of(Instance.Status.NOT_REGISTERED, Instanc...
{ "body": "public String getPlatform() {\n return platform;\n }", "class_method_signature": "ServerGroup.getPlatform()", "constructor": false, "full_signature": "public String getPlatform()", "identifier": "getPlatform", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Stri...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_204
{ "fields": [], "file": "iep-leader-api/src/test/java/com/netflix/iep/leader/api/LeaderIdTest.java", "identifier": "LeaderIdTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void emptyIdThrows() {\n assertThatIllegalArgumentException().isThrownBy(() -> LeaderId.create(\"\"));\n }", "class_method_signature": "LeaderIdTest.emptyIdThrows()", "constructor": false, "full_signature": "@Test public void emptyIdThrows()", "identifier": "emptyIdThrows", "i...
{ "fields": [ { "declarator": "LEADER_ID_CONFIG_PATH = \"iep.leader.leaderId\"", "modifier": "private static final", "original_string": "private static final String LEADER_ID_CONFIG_PATH = \"iep.leader.leaderId\";", "type": "String", "var_name": "LEADER_ID_CONFIG_PATH" }, { ...
{ "body": "public static LeaderId create(Config config) {\n try {\n return new LeaderId(config.getString(LEADER_ID_CONFIG_PATH));\n } catch (Exception e) {\n throw new IllegalArgumentException(\"Invalid '\" + LEADER_ID_CONFIG_PATH + \"'\", e);\n }\n }", "class_method_signature": "LeaderId.create...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_156
{ "fields": [ { "declarator": "config = ConfigFactory.load(\"aws-client-factory\")", "modifier": "private final", "original_string": "private final Config config = ConfigFactory.load(\"aws-client-factory\");", "type": "Config", "var_name": "config" } ], "file": "iep-module-aw...
{ "body": "@Test\n public void settingsProxy() {\n AwsClientFactory factory = new AwsClientFactory(config);\n ClientConfiguration settings = factory.createClientConfig(\"proxy\");\n Assert.assertEquals(12345, settings.getProxyPort());\n Assert.assertEquals(\"host\", settings.getProxyHost());\n Assert....
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AwsClientFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AwsClientFactory.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "ClientConfiguration createClientConfig(String name) {\n final Config cfg = getConfig(name, \"client\");\n final ClientConfiguration settings = new ClientConfiguration();\n\n // Should be the default, but just to make it explicit\n settings.setProtocol(Protocol.HTTPS);\n\n // Helpers\n Fun...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_75
{ "fields": [], "file": "iep-servergroups/src/test/java/com/netflix/iep/servergroups/GroupServiceTest.java", "identifier": "GroupServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void failureToLoad() throws Exception {\n final CountDownLatch latch = new CountDownLatch(1);\n Map<String, Loader> loaders = new LinkedHashMap<>();\n loaders.put(\"edda\", eddaLoader());\n loaders.put(\"eureka\", () -> {\n if (latch.getCount() > 0) {\n latch.countDo...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(GroupService.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GroupService.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public List<ServerGroup> getGroups() {\n List<ServerGroup> groups = merged;\n if (groups == null) {\n groups = new ArrayList<>();\n\n // Merge in the order for the keys of the loader\n for (String k : loaders.keySet()) {\n List<ServerGroup> otherGroups = cachedData.get(k);\n ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_101
{ "fields": [ { "declarator": "manager = ConfigManager.dynamicConfigManager()", "modifier": "private final", "original_string": "private final DynamicConfigManager manager = ConfigManager.dynamicConfigManager();", "type": "DynamicConfigManager", "var_name": "manager" } ], "fi...
{ "body": "@Test\n public void overrideComplex() {\n Config override = ConfigFactory.parseResources(\"override.conf\");\n Properties props = new Properties();\n props.setProperty(\"netflix.iep.override\", override.root().render());\n DynamicConfigService service = newService();\n service.updateDynamic...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(DynamicConfigService.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(DynamicConfigService.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "void updateDynamicConfig(Properties props) {\n final String overrideKey = \"netflix.iep.override\";\n if (props.containsKey(overrideKey)) {\n Config override = ConfigFactory.parseString(props.getProperty(overrideKey));\n props.remove(overrideKey);\n Config config = override.withFallbac...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_22
{ "fields": [ { "declarator": "registry = new DefaultRegistry()", "modifier": "private final", "original_string": "private final Registry registry = new DefaultRegistry();", "type": "Registry", "var_name": "registry" }, { "declarator": "endpoint = new SpectatorEndpoint(...
{ "body": "@Test\n public void getFalse() {\n Assert.assertEquals(0, get(\":false\").size());\n }", "class_method_signature": "SpectatorEndpointTest.getFalse()", "constructor": false, "full_signature": "@Test public void getFalse()", "identifier": "getFalse", "invocations": [ "assertEquals", "s...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final Registry registry;", "type": "Registry", "var_name": "registry" } ], "file": "iep-admin/src/main/java/com/netflix/iep/admin/endpoints/SpectatorEndpoint.java", "identifie...
{ "body": "@Override public Object get() {\n return get(\":true\");\n }", "class_method_signature": "SpectatorEndpoint.get()", "constructor": false, "full_signature": "@Override public Object get()", "identifier": "get", "invocations": [ "get" ], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }
27609596_117
{ "fields": [ { "declarator": "clock = new ManualClock()", "modifier": "private final", "original_string": "private final ManualClock clock = new ManualClock();", "type": "ManualClock", "var_name": "clock" }, { "declarator": "registry = new DefaultRegistry(clock)", ...
{ "body": "@Test\n public void multipleAllUnknown() {\n HttpUserService service = new HttpUserService(ctxt, \"http-multiple-404\");\n Assert.assertFalse(service.isValidEmail(\"bob@example.com\"));\n }", "class_method_signature": "HttpUserServiceTest.multipleAllUnknown()", "constructor": false, "full_sig...
{ "fields": [ { "declarator": "context", "modifier": "private final", "original_string": "private final Context context;", "type": "Context", "var_name": "context" }, { "declarator": "enabled", "modifier": "private final", "original_string": "private final b...
{ "body": "@Override\n public boolean isValidEmail(String email) {\n String sanitizedEmail = UserUtils.baseAddress(email.toLowerCase(Locale.US));\n return enabled && checkCache(sanitizedEmail);\n }", "class_method_signature": "HttpUserService.isValidEmail(String email)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 35, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 27609596, "size": 4393, "stargazer_count": 66, "stars": null, "updates": null, "url": "https://github.com/Netflix/iep" }