id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
2088736_192
{ "fields": [ { "declarator": "configuration", "modifier": "private static", "original_string": "private static AnnotationConfiguration configuration;", "type": "AnnotationConfiguration", "var_name": "configuration" }, { "declarator": "defaultConfiguration", "modi...
{ "body": "@Test\n public void pageLoadTimeout() {\n Assertions.assertThat(noConfiguration.getPageLoadTimeout()).isNull();\n Assertions.assertThat(defaultConfiguration.getPageLoadTimeout()).isNull();\n\n Assertions.assertThat(configuration.getPageLoadTimeout()).isEqualTo(2000L);\n }", "cl...
{ "fields": [ { "declarator": "configuration", "modifier": "private final", "original_string": "private final FluentConfiguration configuration;", "type": "FluentConfiguration", "var_name": "configuration" }, { "declarator": "customProperties = new HashMap<>()", "...
{ "body": "@Override\n public Long getPageLoadTimeout() {\n return getConfig(() -> getLongValue(configuration.pageLoadTimeout()));\n }", "class_method_signature": "AnnotationConfiguration.getPageLoadTimeout()", "constructor": false, "full_signature": "@Override public Long getPageLoadTimeout()", ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_487
{ "fields": [ { "declarator": "fluentControlWait", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWait fluentControlWait;", "type": "FluentWait", "var_name": "fluentControlWait" }, { "declarator": "fluentList", "modifier": "@Mock\n ...
{ "body": "@Test\n public void useCustomMessage() {\n wait.hasMessageDefined();\n Mockito.verify(fluentControlWait).hasMessageDefined();\n }", "class_method_signature": "FluentWaitElementListTest.useCustomMessage()", "constructor": false, "full_signature": "@Test public void useCustomMessage...
{ "fields": [ { "declarator": "elements", "modifier": "private final", "original_string": "private final List<? extends FluentWebElement> elements;", "type": "List<? extends FluentWebElement>", "var_name": "elements" }, { "declarator": "controlWait", "modifier": "...
{ "body": "@Override\n public boolean hasMessageDefined() {\n return controlWait.hasMessageDefined();\n }", "class_method_signature": "FluentWaitElementList.hasMessageDefined()", "constructor": false, "full_signature": "@Override public boolean hasMessageDefined()", "identifier": "hasMessageDefin...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_366
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java", "identifier": "StringConditionsImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnTrueIfMatchesPattern() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some magical text.\");\n\n assertThat(stringConditions.matches(Pattern.compile(\"^Some .* text.$\"))).isTrue();\n }", "class_method_signature": "StringConditionsIm...
{ "fields": [], "file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java", "identifier": "StringConditionsImpl", "interfaces": "implements StringConditions", "methods": [ { "class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"...
{ "body": "@Override\n public boolean matches(String regex) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.matches(regex);\n });\n }", "class_method_signature": "StringConditionsImpl.matches(String regex)", ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_25
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWebElement element;", "type": "FluentWebElement", "var_name": "element" }, { "declarator": "elementAssert", "modifier": "private", "origin...
{ "body": "@Test\n public void testHasValueOk() {\n when(element.value()).thenReturn(\"some value\");\n elementAssert.hasValue(\"some value\");\n }", "class_method_signature": "FluentWebElementAssertTest.testHasValueOk()", "constructor": false, "full_signature": "@Test public void testHasVal...
{ "fields": [], "file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java", "identifier": "FluentWebElementAssert", "interfaces": "implements ElementStateAssert, ElementAttributeAssert", "methods": [ { "class_method_signature": "FluentWebElementAssert.Fl...
{ "body": "@Override\n public FluentWebElementAssert hasValue(String value) {\n String actualValue = actual.value();\n if (!actualValue.equals(value)) {\n failWithMessage(\"The element does not have the value: \" + value\n + \". Actual value found : \" + actualValue);\n ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_223
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/configuration/ConfigurationFactoryProviderTest.java", "identifier": "ConfigurationFactoryProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = ConfigurationException.class)\n public void testInvalidConfigurationClassConfiguration() {\n ConfigurationFactoryProvider.newConfiguration(FailingConfigurationContainer.class);\n }", "class_method_signature": "ConfigurationFactoryProviderTest.testInvalidConfigurationClassCon...
{ "fields": [ { "declarator": "BOOTSTRAP_FACTORY = new DefaultConfigurationFactory()", "modifier": "private static final", "original_string": "private static final ConfigurationFactory BOOTSTRAP_FACTORY = new DefaultConfigurationFactory();", "type": "ConfigurationFactory", "var_name"...
{ "body": "public static Configuration newConfiguration(Class<?> container) {\n ConfigurationFactory configurationFactory = getConfigurationFactory(container);\n Configuration configuration = configurationFactory.newConfiguration(container, new ConfigurationDefaults());\n\n if (configuration.getC...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_389
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebElement element;", "type": "WebElement", "var_name": "element" }, { "declarator": "driver", "modifier": "@Mock\n private", "original_strin...
{ "body": "@Test\n public void testDescendants() {\n Dom dom = new Dom(element, instantiator);\n\n List<WebElement> elements = Arrays.asList(mock(WebElement.class), mock(WebElement.class), mock(WebElement.class));\n when(element.findElements(By.xpath(\"descendant::*\"))).thenReturn(elements);\...
{ "fields": [ { "declarator": "webElement", "modifier": "private final", "original_string": "private final WebElement webElement;", "type": "WebElement", "var_name": "webElement" }, { "declarator": "instantiator", "modifier": "private final", "original_strin...
{ "body": "public FluentList<FluentWebElement> descendants() {\n return handleAxe(\"descendant\");\n }", "class_method_signature": "Dom.descendants()", "constructor": false, "full_signature": "public FluentList<FluentWebElement> descendants()", "identifier": "descendants", "invocations": [ "ha...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_448
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java", "identifier": "CalculateServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void checkSimpleEndsWithOk() {\n assertThat(CalculateService.endsWith(null, \"to\", \"toto\")).isTrue();\n }", "class_method_signature": "CalculateServiceTest.checkSimpleEndsWithOk()", "constructor": false, "full_signature": "@Test public void checkSimpleEndsWithOk()", "...
{ "fields": [], "file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/CalculateService.java", "identifier": "CalculateService", "interfaces": "", "methods": [ { "class_method_signature": "CalculateService.CalculateService()", "constructor": true, "full_signature":...
{ "body": "public static boolean endsWith(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null || currentValue.isEmpty()) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.endsWith(referenceValue);\n }\...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_72
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWebElement element;", "type": "FluentWebElement", "var_name": "element" }, { "declarator": "fluentPage", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void hasTitleKo() {\n doReturn(\"title\").when(driver).getTitle();\n assertThatAssertionErrorIsThrownBy(() -> pageAssert.hasTitle(\"wrong\"))\n .hasMessage(\"Current page title is title. Expected wrong\");\n }", "class_method_signature": "PageAssertTest.h...
{ "fields": [], "file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/PageAssert.java", "identifier": "PageAssert", "interfaces": "implements PageStateAssert", "methods": [ { "class_method_signature": "PageAssert.PageAssert(FluentPage actual)", "constructor": true, ...
{ "body": "@Override\n public PageAssert hasTitle(String title) {\n try {\n String pageTitle = actual.getDriver().getTitle();\n if (!pageTitle.equals(title)) {\n failWithMessage(\"Current page title is \" + pageTitle + \". Expected \" + title);\n }\n } ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_331
{ "fields": [ { "declarator": "locator", "modifier": "@Mock\n private", "original_string": "@Mock\n private ElementLocator locator;", "type": "ElementLocator", "var_name": "locator" }, { "declarator": "invocationHandler", "modifier": "private", "origin...
{ "body": "@Test\n public void testNotLoadedOtherThanHashCodeWithRetry() throws Throwable {\n WebElement proxy = mock(WebElement.class);\n Method isSelected = WebElement.class.getMethod(\"isSelected\");\n when(proxy.isSelected()).thenReturn(true);\n when(invocationHandler.loaded()).then...
{ "fields": [ { "declarator": "TO_STRING = getMethod(Object.class, \"toString\")", "modifier": "private static final", "original_string": "private static final Method TO_STRING = getMethod(Object.class, \"toString\");", "type": "Method", "var_name": "TO_STRING" }, { "de...
{ "body": "@Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n Object invocationResult = null;\n if (TO_STRING.equals(method)) {\n invocationResult = proxyToString(loaded() ? (String) invoke(method, args) : null);\n } else if (loaded()) ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_624
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private LocatableElement element;", "type": "LocatableElement", "var_name": "element" }, { "declarator": "driver", "modifier": "@Mock\n private", "or...
{ "body": "@Test\n public void testGetElement() {\n assertThat(fluentElement.getElement()).isSameAs(element);\n }", "class_method_signature": "FluentWebElementTest.testGetElement()", "constructor": false, "full_signature": "@Test public void testGetElement()", "identifier": "testGetElement", "i...
{ "fields": [ { "declarator": "search", "modifier": "private final", "original_string": "private final Search search;", "type": "Search", "var_name": "search" }, { "declarator": "dom", "modifier": "private final", "original_string": "private final Dom dom;",...
{ "body": "public WebElement getElement() {\n return webElement;\n }", "class_method_signature": "FluentWebElement.getElement()", "constructor": false, "full_signature": "public WebElement getElement()", "identifier": "getElement", "invocations": [], "modifiers": "public", "parameters": "()", ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_274
{ "fields": [ { "declarator": "componentsManager", "modifier": "@Mock\n private", "original_string": "@Mock\n private ComponentsManager componentsManager;", "type": "ComponentsManager", "var_name": "componentsManager" }, { "declarator": "validator", "modifie...
{ "body": "@Test\n public void shouldReturnFalseIfFieldIsNotListForListOfElement() throws NoSuchFieldException {\n Field notListField = getField(\"webElement\");\n\n assertThat(FluentElementInjectionSupportValidator.isListOfWebElement(notListField)).isFalse();\n }", "class_method_signature": "Fl...
{ "fields": [ { "declarator": "componentsManager", "modifier": "private final", "original_string": "private final ComponentsManager componentsManager;", "type": "ComponentsManager", "var_name": "componentsManager" } ], "file": "fluentlenium-core/src/main/java/org/fluentlenium...
{ "body": "static boolean isListOfWebElement(Field field) {\n return isFieldListOf(field, WebElement.class::isAssignableFrom);\n }", "class_method_signature": "FluentElementInjectionSupportValidator.isListOfWebElement(Field field)", "constructor": false, "full_signature": "static boolean isListOfWebEl...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_327
{ "fields": [ { "declarator": "locator", "modifier": "@Mock\n private", "original_string": "@Mock\n private ElementLocator locator;", "type": "ElementLocator", "var_name": "locator" }, { "declarator": "invocationHandler", "modifier": "private", "origin...
{ "body": "@Test\n public void testLoadedEqualsWithRetry() throws Throwable {\n WebElement proxy = mock(WebElement.class);\n Method equals = getMethod(\"equals\", Object.class);\n Object[] args = {proxy};\n when(invocationHandler.loaded()).thenReturn(true);\n when(invocationHandl...
{ "fields": [ { "declarator": "TO_STRING = getMethod(Object.class, \"toString\")", "modifier": "private static final", "original_string": "private static final Method TO_STRING = getMethod(Object.class, \"toString\");", "type": "Method", "var_name": "TO_STRING" }, { "de...
{ "body": "@Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n Object invocationResult = null;\n if (TO_STRING.equals(method)) {\n invocationResult = proxyToString(loaded() ? (String) invoke(method, args) : null);\n } else if (loaded()) ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_64
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWebElement element;", "type": "FluentWebElement", "var_name": "element" }, { "declarator": "elementAssert", "modifier": "private", "origin...
{ "body": "@Test\n public void testHasMultipleClassesOk() {\n when(element.attribute(\"class\")).thenReturn(\"yolokitten mark\");\n elementAssert.hasClass(\"mark\");\n }", "class_method_signature": "FluentWebElementAssertTest.testHasMultipleClassesOk()", "constructor": false, "full_signature...
{ "fields": [], "file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java", "identifier": "FluentWebElementAssert", "interfaces": "implements ElementStateAssert, ElementAttributeAssert", "methods": [ { "class_method_signature": "FluentWebElementAssert.Fl...
{ "body": "@Override\n public FluentWebElementAssert hasClass(String classToFind) {\n String actualClasses = actual.attribute(CLASS_ATTRIBUTE);\n if (!getClasses(actualClasses).contains(classToFind)) {\n failWithMessage(\"The element does not have the class: \" + classToFind\n ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_262
{ "fields": [ { "declarator": "componentsManager", "modifier": "@Mock\n private", "original_string": "@Mock\n private ComponentsManager componentsManager;", "type": "ComponentsManager", "var_name": "componentsManager" }, { "declarator": "validator", "modifie...
{ "body": "@Test\n public void shouldReturnTrueIfFieldIsComponent() throws NoSuchFieldException {\n when(componentsManager.isComponentClass(TestComponent.class)).thenReturn(true);\n Field componentField = getField(\"component\");\n\n assertThat(validator.isComponent(componentField)).isTrue();\...
{ "fields": [ { "declarator": "componentsManager", "modifier": "private final", "original_string": "private final ComponentsManager componentsManager;", "type": "ComponentsManager", "var_name": "componentsManager" } ], "file": "fluentlenium-core/src/main/java/org/fluentlenium...
{ "body": "boolean isComponent(Field field) {\n return componentsManager.isComponentClass(field.getType());\n }", "class_method_signature": "FluentElementInjectionSupportValidator.isComponent(Field field)", "constructor": false, "full_signature": " boolean isComponent(Field field)", "identifier": "i...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_632
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private LocatableElement element;", "type": "LocatableElement", "var_name": "element" }, { "declarator": "driver", "modifier": "@Mock\n private", "or...
{ "body": "@Test(expected = NoSuchElementException.class)\n public void testFillSelectInvalidElement() {\n when(element.getTagName()).thenReturn(\"span\");\n WebElement valueElement = mock(WebElement.class);\n when(element.findElements(any(By.class))).thenReturn(Collections.singletonList(value...
{ "fields": [ { "declarator": "search", "modifier": "private final", "original_string": "private final Search search;", "type": "Search", "var_name": "search" }, { "declarator": "dom", "modifier": "private final", "original_string": "private final Dom dom;",...
{ "body": "@Override\n public FillSelect<FluentWebElement> fillSelect() {\n return new FillSelect<>(this);\n }", "class_method_signature": "FluentWebElement.fillSelect()", "constructor": false, "full_signature": "@Override public FillSelect<FluentWebElement> fillSelect()", "identifier": "fillSele...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_409
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/EqualMatcherTest.java", "identifier": "EqualMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotEqualToString() {\n EndsWithMatcher matcher = new EndsWithMatcher(\"some value\");\n\n assertThat(matcher.isSatisfiedBy(\"non-matching\")).isFalse();\n }", "class_method_signature": "EqualMatcherTest.shouldNotEqualToString()", "constructor": false, "fu...
{ "fields": [], "file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/EqualMatcher.java", "identifier": "EqualMatcher", "interfaces": "", "methods": [ { "class_method_signature": "EqualMatcher.EqualMatcher(String value)", "constructor": true, "full_signature": "pu...
{ "body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return CalculateService.equal(getPattern(), getValue(), currentValue);\n }", "class_method_signature": "EqualMatcher.isSatisfiedBy(String currentValue)", "constructor": false, "full_signature": "@Override public boolean is...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_33
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWebElement element;", "type": "FluentWebElement", "var_name": "element" }, { "declarator": "elementAssert", "modifier": "private", "origin...
{ "body": "@Test\n public void testHasAttributeKo() {\n when(element.attribute(\"attribute\")).thenReturn(null);\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasAttribute(\"attribute\"));\n }", "class_method_signature": "FluentWebElementAssertTest.testHasAttributeKo()", "constructo...
{ "fields": [], "file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java", "identifier": "FluentWebElementAssert", "interfaces": "implements ElementStateAssert, ElementAttributeAssert", "methods": [ { "class_method_signature": "FluentWebElementAssert.Fl...
{ "body": "@Override\n public AbstractStringAssert hasAttribute(String attribute) {\n String actualValue = actual.attribute(attribute);\n\n if (actualValue == null) {\n failWithMessage(\"The element does not have attribute \" + attribute);\n }\n\n return new AbstractStringAss...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_370
{ "fields": [ { "declarator": "webElement", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebElement webElement;", "type": "WebElement", "var_name": "webElement" }, { "declarator": "webDriver", "modifier": "@Mock\n private", "or...
{ "body": "@Test\n public void isClickable() {\n assertThat(conditions.clickable()).isFalse();\n\n when(webElement.isEnabled()).thenReturn(true);\n when(webElement.isDisplayed()).thenReturn(true);\n\n assertThat(conditions.clickable()).isTrue();\n }", "class_method_signature": "Web...
{ "fields": [], "file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/WebElementConditions.java", "identifier": "WebElementConditions", "interfaces": "implements FluentConditions", "methods": [ { "class_method_signature": "WebElementConditions.WebElementConditions(FluentWebElemen...
{ "body": "@Override\n public boolean clickable() {\n return verify(FluentWebElement::clickable);\n }", "class_method_signature": "WebElementConditions.clickable()", "constructor": false, "full_signature": "@Override public boolean clickable()", "identifier": "clickable", "invocations": [ "...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_235
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java", "identifier": "UrlUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBaseUrlNullUrlDefined() {\n String test = UrlUtils.concat(null, \"/abc/def\");\n Assertions.assertThat(test).isEqualTo(\"/abc/def\");\n }", "class_method_signature": "UrlUtilsTest.testBaseUrlNullUrlDefined()", "constructor": false, "full_signature": "@Test ...
{ "fields": [ { "declarator": "PATH_SEPARATOR = \"/\"", "modifier": "private static final", "original_string": "private static final String PATH_SEPARATOR = \"/\";", "type": "String", "var_name": "PATH_SEPARATOR" }, { "declarator": "HTTP = \"http\"", "modifier": "...
{ "body": "public static String concat(String baseUriSpec, String uriSpec) { // NOPMD CyclomaticComplexity NPathComplexity\n if (baseUriSpec != null && !baseUriSpec.endsWith(PATH_SEPARATOR)) {\n baseUriSpec = baseUriSpec + PATH_SEPARATOR;\n }\n URI baseUri = uriFromSpec(baseUriSpec);\n...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_472
{ "fields": [ { "declarator": "fluentControlWait", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWait fluentControlWait;", "type": "FluentWait", "var_name": "fluentControlWait" }, { "declarator": "fluentList", "modifier": "@Mock\n ...
{ "body": "@Test\n public void withMessageSupplier() {\n Supplier<String> message = () -> \"test\";\n\n wait.withMessage(message);\n Mockito.verify(fluentControlWait).withMessage(message);\n }", "class_method_signature": "FluentWaitElementListTest.withMessageSupplier()", "constructor": ...
{ "fields": [ { "declarator": "elements", "modifier": "private final", "original_string": "private final List<? extends FluentWebElement> elements;", "type": "List<? extends FluentWebElement>", "var_name": "elements" }, { "declarator": "controlWait", "modifier": "...
{ "body": "@Override\n public FluentWaitElementList withMessage(Supplier<String> message) {\n controlWait.withMessage(message);\n return this;\n }", "class_method_signature": "FluentWaitElementList.withMessage(Supplier<String> message)", "constructor": false, "full_signature": "@Override pub...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_188
{ "fields": [ { "declarator": "configuration", "modifier": "private static", "original_string": "private static AnnotationConfiguration configuration;", "type": "AnnotationConfiguration", "var_name": "configuration" }, { "declarator": "defaultConfiguration", "modi...
{ "body": "@Test\n public void browserTimeout() {\n Assertions.assertThat(noConfiguration.getBrowserTimeout()).isNull();\n Assertions.assertThat(defaultConfiguration.getBrowserTimeout()).isEqualTo(60000L);\n\n Assertions.assertThat(configuration.getBrowserTimeout()).isEqualTo(5000L);\n }", ...
{ "fields": [ { "declarator": "configuration", "modifier": "private final", "original_string": "private final FluentConfiguration configuration;", "type": "FluentConfiguration", "var_name": "configuration" }, { "declarator": "customProperties = new HashMap<>()", "...
{ "body": "@Override\n public Long getBrowserTimeout() {\n //Don't change this to method reference because it evaluates configuration before passing the argument, thus throw NPE.\n return getConfig(() -> configuration.browserTimeout());\n }", "class_method_signature": "AnnotationConfiguration.ge...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_167
{ "fields": [ { "declarator": "DRIVER_LIFECYCLE = \"driverLifecycle\"", "modifier": "private static final", "original_string": "private static final String DRIVER_LIFECYCLE = \"driverLifecycle\";", "type": "String", "var_name": "DRIVER_LIFECYCLE" }, { "declarator": "ret...
{ "body": "@Test\n public void screenshotPath() {\n assertThat(getConfiguration().getScreenshotPath()).isNull();\n\n mockProperty(\"screenshotPath\", \"/path/\");\n assertThat(getConfiguration().getScreenshotPath()).isEqualTo(\"/path/\");\n }", "class_method_signature": "PropertiesBackend...
{ "fields": [ { "declarator": "PROPERTIES_PREFIX = \"fluentlenium.\"", "modifier": "static final", "original_string": "static final String PROPERTIES_PREFIX = \"fluentlenium.\";", "type": "String", "var_name": "PROPERTIES_PREFIX" }, { "declarator": "prefixes", "mo...
{ "body": "@Override\n public String getScreenshotPath() {\n return getStringProperty(\"screenshotPath\");\n }", "class_method_signature": "PropertiesBackendConfiguration.getScreenshotPath()", "constructor": false, "full_signature": "@Override public String getScreenshotPath()", "identifier": "ge...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_537
{ "fields": [ { "declarator": "keyboard", "modifier": "@Mock\n private", "original_string": "@Mock\n private Keyboard keyboard;", "type": "Keyboard", "var_name": "keyboard" }, { "declarator": "mouse", "modifier": "@Mock\n private", "original_string"...
{ "body": "@Test\n public void dragAndDropFrom() {\n MouseElementActions actions = new MouseElementActions(driver, element);\n\n LocatableElement source = mock(LocatableElement.class);\n Coordinates sourceCoordinates = mock(Coordinates.class);\n when(source.getCoordinates()).thenReturn(...
{ "fields": [ { "declarator": "driver", "modifier": "private final", "original_string": "private final WebDriver driver;", "type": "WebDriver", "var_name": "driver" }, { "declarator": "element", "modifier": "private final", "original_string": "private final ...
{ "body": "public MouseElementActions dragAndDropFrom(WebElement source) {\n loadElementAndPerform(actions().dragAndDrop(source, element));\n return this;\n }", "class_method_signature": "MouseElementActions.dragAndDropFrom(WebElement source)", "constructor": false, "full_signature": "public Mo...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_48
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWebElement element;", "type": "FluentWebElement", "var_name": "element" }, { "declarator": "elementAssert", "modifier": "private", "origin...
{ "body": "@Test\n public void shouldNotHaveClasses() {\n when(element.attribute(\"class\")).thenReturn(\"clazz clazz2 clazz3\");\n elementAssert.hasNotClasses(\"clazz2\", \"clazz4\");\n }", "class_method_signature": "FluentWebElementAssertTest.shouldNotHaveClasses()", "constructor": false, ...
{ "fields": [], "file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java", "identifier": "FluentWebElementAssert", "interfaces": "implements ElementStateAssert, ElementAttributeAssert", "methods": [ { "class_method_signature": "FluentWebElementAssert.Fl...
{ "body": "@Override\n public FluentWebElementAssert hasNotClasses(String... classesToFind) {\n String actualClasses = actual.attribute(CLASS_ATTRIBUTE);\n if (actualClasses != null) {\n List<String> actualClassesAsList = getClasses(actualClasses);\n if (actualClassesAsList.cont...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_425
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/NotStartsWithMatcherTest.java", "identifier": "NotStartsWithMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldStartWithPattern() {\n NotStartsWithMatcher matcher = new NotStartsWithMatcher(Pattern.compile(\"^some val\"));\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isFalse();\n }", "class_method_signature": "NotStartsWithMatcherTest.shouldStartWithPattern()...
{ "fields": [], "file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/NotStartsWithMatcher.java", "identifier": "NotStartsWithMatcher", "interfaces": "", "methods": [ { "class_method_signature": "NotStartsWithMatcher.NotStartsWithMatcher(String value)", "constructor": t...
{ "body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return !CalculateService.startsWith(getPattern(), getValue(), currentValue);\n }", "class_method_signature": "NotStartsWithMatcher.isSatisfiedBy(String currentValue)", "constructor": false, "full_signature": "@Override pub...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_560
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/core/events/ListenerPriorityComparatorTest.java", "identifier": "ListenerPriorityComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnPositiveNumberWhenSecondArgumentPriorityIsGreaterThanFirst() {\n String aString = \"a_string\";\n TestListener testListener = new TestListener();\n\n ListenerPriorityComparator comparator = new ListenerPriorityComparator();\n\n assertThat(compa...
{ "fields": [], "file": "fluentlenium-core/src/main/java/org/fluentlenium/core/events/ListenerPriorityComparator.java", "identifier": "ListenerPriorityComparator", "interfaces": "implements Comparator<Object>", "methods": [ { "class_method_signature": "ListenerPriorityComparator.compare(Object o1, O...
{ "body": "@Override\n public int compare(Object o1, Object o2) {\n return Integer.compare(getPriority(o2), getPriority(o1));\n }", "class_method_signature": "ListenerPriorityComparator.compare(Object o1, Object o2)", "constructor": false, "full_signature": "@Override public int compare(Object o1, ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_130
{ "fields": [ { "declarator": "fluentList", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;", "type": "FluentList<FluentWebElement>", "var_name": "fluentList" }, { "declarator": "listAssert", "modif...
{ "body": "@Test\n public void shouldFailWhenHasClasses() {\n when(fluentList.attributes(\"class\")).thenReturn(Lists.newArrayList(\"class1 class2\", \"class1 class2 class3\", \"class4\"));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasNotClasses(\"class2\", \"class3\"))\n ....
{ "fields": [], "file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java", "identifier": "FluentListAssert", "interfaces": "implements ListStateAssert, ListAttributeAssert", "methods": [ { "class_method_signature": "FluentListAssert.FluentListAssert(FluentLis...
{ "body": "@Override\n public FluentListAssert hasNotClasses(String... htmlClasses) {\n notHasClasses(\"At least one selected element has classes: \", htmlClasses);\n return this;\n }", "class_method_signature": "FluentListAssert.hasNotClasses(String... htmlClasses)", "constructor": false, "...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_219
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/configuration/ConfigurationFactoryProviderTest.java", "identifier": "ConfigurationFactoryProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaultConfiguration() {\n Configuration configuration = ConfigurationFactoryProvider.newConfiguration(DummyContainer.class);\n assertThat(configuration).isExactlyInstanceOf(ComposedConfiguration.class);\n }", "class_method_signature": "ConfigurationFactoryProv...
{ "fields": [ { "declarator": "BOOTSTRAP_FACTORY = new DefaultConfigurationFactory()", "modifier": "private static final", "original_string": "private static final ConfigurationFactory BOOTSTRAP_FACTORY = new DefaultConfigurationFactory();", "type": "ConfigurationFactory", "var_name"...
{ "body": "public static Configuration newConfiguration(Class<?> container) {\n ConfigurationFactory configurationFactory = getConfigurationFactory(container);\n Configuration configuration = configurationFactory.newConfiguration(container, new ConfigurationDefaults());\n\n if (configuration.getC...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_3
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWebElement element;", "type": "FluentWebElement", "var_name": "element" }, { "declarator": "elementAssert", "modifier": "private", "origin...
{ "body": "@Test\n public void testIsEnabledOk() {\n when(element.present()).thenReturn(true);\n when(element.enabled()).thenReturn(true);\n elementAssert.isEnabled();\n }", "class_method_signature": "FluentWebElementAssertTest.testIsEnabledOk()", "constructor": false, "full_signature...
{ "fields": [], "file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java", "identifier": "FluentWebElementAssert", "interfaces": "implements ElementStateAssert, ElementAttributeAssert", "methods": [ { "class_method_signature": "FluentWebElementAssert.Fl...
{ "body": "@Override\n public FluentWebElementAssert isEnabled() {\n isPresentAndIs(() -> !actual.enabled(), \"Element in assertion is present but not enabled\");\n return this;\n }", "class_method_signature": "FluentWebElementAssert.isEnabled()", "constructor": false, "full_signature": "@Ov...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_649
{ "fields": [ { "declarator": "webDriver", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebDriver webDriver;", "type": "WebDriver", "var_name": "webDriver" }, { "declarator": "configuration", "modifier": "@Mock\n private", "ori...
{ "body": "@Test\n public void shouldReturnNullUrlIfNoCurrentUrlFromDriverIsPresent() {\n fluentDriver = spy(new FluentDriver(webDriver, configuration, adapter));\n when(webDriver.getCurrentUrl()).thenReturn(null);\n\n assertThat(fluentDriver.url()).isNull();\n }", "class_method_signature...
{ "fields": [ { "declarator": "LOGGER =\n LoggerFactory.getLogger(FluentDriver.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER =\n LoggerFactory.getLogger(FluentDriver.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public String url() {\n String baseUrl = buildUrl(null);\n\n String currentUrl = getDriver().getCurrentUrl();\n if (currentUrl != null && baseUrl != null && currentUrl.startsWith(baseUrl)) {\n currentUrl = currentUrl.substring(baseUrl.length());\n }\n\n...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_599
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private LocatableElement element;", "type": "LocatableElement", "var_name": "element" }, { "declarator": "driver", "modifier": "@Mock\n private", "or...
{ "body": "@Test\n public void testAxes() {\n fluentElement.dom().parent();\n }", "class_method_signature": "FluentWebElementTest.testAxes()", "constructor": false, "full_signature": "@Test public void testAxes()", "identifier": "testAxes", "invocations": [ "parent", "dom" ], "modif...
{ "fields": [ { "declarator": "search", "modifier": "private final", "original_string": "private final Search search;", "type": "Search", "var_name": "search" }, { "declarator": "dom", "modifier": "private final", "original_string": "private final Dom dom;",...
{ "body": "@Deprecated\n public Dom axes() {\n return dom;\n }", "class_method_signature": "FluentWebElement.axes()", "constructor": false, "full_signature": "@Deprecated public Dom axes()", "identifier": "axes", "invocations": [], "modifiers": "@Deprecated public", "parameters": "()", "r...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_433
{ "fields": [], "file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/NotEndsWithMatcherTest.java", "identifier": "NotEndsWithMatcherTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldEndWithPattern() {\n NotEndsWithMatcher matcher = new NotEndsWithMatcher(Pattern.compile(\"me value.*\"));\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isFalse();\n }", "class_method_signature": "NotEndsWithMatcherTest.shouldEndWithPattern()", "con...
{ "fields": [], "file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/NotEndsWithMatcher.java", "identifier": "NotEndsWithMatcher", "interfaces": "", "methods": [ { "class_method_signature": "NotEndsWithMatcher.NotEndsWithMatcher(String value)", "constructor": true, ...
{ "body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return !CalculateService.endsWith(getPattern(), getValue(), currentValue);\n }", "class_method_signature": "NotEndsWithMatcher.isSatisfiedBy(String currentValue)", "constructor": false, "full_signature": "@Override public ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_126
{ "fields": [ { "declarator": "fluentList", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;", "type": "FluentList<FluentWebElement>", "var_name": "fluentList" }, { "declarator": "listAssert", "modif...
{ "body": "@Test\n public void shouldHaveClasses() {\n when(fluentList.attributes(\"class\")).thenReturn(Lists.newArrayList(\"class1 class2\", \"class1 class2 class3\", \"class4\"));\n listAssert.hasClasses(\"class1\", \"class2\");\n }", "class_method_signature": "FluentListAssertTest.shouldHave...
{ "fields": [], "file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java", "identifier": "FluentListAssert", "interfaces": "implements ListStateAssert, ListAttributeAssert", "methods": [ { "class_method_signature": "FluentListAssert.FluentListAssert(FluentLis...
{ "body": "@Override\n public FluentListAssert hasClasses(String... classesToFind) {\n return validateHasClasses(\"No selected element have classes: \", classesToFind);\n }", "class_method_signature": "FluentListAssert.hasClasses(String... classesToFind)", "constructor": false, "full_signature": "@...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_576
{ "fields": [ { "declarator": "element1", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWebElement element1;", "type": "FluentWebElement", "var_name": "element1" }, { "declarator": "element2", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void shouldReturnListCountWhenProxyExists() {\n assertThat(list.count()).isEqualTo(3);\n }", "class_method_signature": "FluentListImplTest.shouldReturnListCountWhenProxyExists()", "constructor": false, "full_signature": "@Test public void shouldReturnListCountWhenProxyExis...
{ "fields": [ { "declarator": "DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5)", "modifier": "private static final", "original_string": "private static final Duration DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5);", "type": "Duration", "var_name": "DEFAULT_WAIT_AND_...
{ "body": "@Override\n public int count() {\n if (proxy != null) {\n LocatorHandler locatorHandler = LocatorProxies.getLocatorHandler(proxy);\n if (locatorHandler != null) {\n return locatorHandler.getLocator().findElements().size();\n }\n }\n re...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_464
{ "fields": [ { "declarator": "fluentControlWait", "modifier": "@Mock\n private", "original_string": "@Mock\n private FluentWait fluentControlWait;", "type": "FluentWait", "var_name": "fluentControlWait" }, { "declarator": "fluentList", "modifier": "@Mock\n ...
{ "body": "@Test\n public void pollingEvery() {\n assertThat(wait.pollingEvery(10, TimeUnit.MILLISECONDS)).isSameAs(wait);\n Mockito.verify(fluentControlWait).pollingEvery(Duration.ofMillis(10));\n }", "class_method_signature": "FluentWaitElementListTest.pollingEvery()", "constructor": false, ...
{ "fields": [ { "declarator": "elements", "modifier": "private final", "original_string": "private final List<? extends FluentWebElement> elements;", "type": "List<? extends FluentWebElement>", "var_name": "elements" }, { "declarator": "controlWait", "modifier": "...
{ "body": "@Override\n public FluentWaitElementList pollingEvery(Duration duration) {\n controlWait.pollingEvery(duration);\n return this;\n }", "class_method_signature": "FluentWaitElementList.pollingEvery(Duration duration)", "constructor": false, "full_signature": "@Override public Fluent...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_521
{ "fields": [ { "declarator": "driver", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebDriver driver;", "type": "WebDriver", "var_name": "driver" }, { "declarator": "element1", "modifier": "@Mock\n private", "original_string":...
{ "body": "@Test\n public void testFillElement() {\n when(element1.isDisplayed()).thenReturn(true);\n when(element1.isEnabled()).thenReturn(true);\n\n Fill fill = new Fill(el(element1));\n\n verify(driver, never()).findElement(any(By.class));\n\n fill.withText(\"1\", \"2\", \"3\"...
{ "fields": [], "file": "fluentlenium-core/src/main/java/org/fluentlenium/core/action/Fill.java", "identifier": "Fill", "interfaces": "", "methods": [ { "class_method_signature": "Fill.Fill(FluentList<E> list)", "constructor": true, "full_signature": "public Fill(FluentList<E> list)", ...
{ "body": "public Fill withText(String... textValues) {\n return with(textValues);\n }", "class_method_signature": "Fill.withText(String... textValues)", "constructor": false, "full_signature": "public Fill withText(String... textValues)", "identifier": "withText", "invocations": [ "with" ],...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_171
{ "fields": [ { "declarator": "DRIVER_LIFECYCLE = \"driverLifecycle\"", "modifier": "private static final", "original_string": "private static final String DRIVER_LIFECYCLE = \"driverLifecycle\";", "type": "String", "var_name": "DRIVER_LIFECYCLE" }, { "declarator": "ret...
{ "body": "@Test\n public void driverLifecycleDefault() {\n assertThat(getConfiguration().getDriverLifecycle()).isNull();\n\n mockProperty(DRIVER_LIFECYCLE, \"deFaUlT\");\n assertThat(getConfiguration().getDriverLifecycle()).isEqualTo(ConfigurationProperties.DriverLifecycle.DEFAULT);\n }", ...
{ "fields": [ { "declarator": "PROPERTIES_PREFIX = \"fluentlenium.\"", "modifier": "static final", "original_string": "static final String PROPERTIES_PREFIX = \"fluentlenium.\";", "type": "String", "var_name": "PROPERTIES_PREFIX" }, { "declarator": "prefixes", "mo...
{ "body": "@Override\n public DriverLifecycle getDriverLifecycle() {\n return getEnumProperty(DriverLifecycle.class, \"driverLifecycle\");\n }", "class_method_signature": "PropertiesBackendConfiguration.getDriverLifecycle()", "constructor": false, "full_signature": "@Override public DriverLifecycle...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_258
{ "fields": [ { "declarator": "componentsManager", "modifier": "@Mock\n private", "original_string": "@Mock\n private ComponentsManager componentsManager;", "type": "ComponentsManager", "var_name": "componentsManager" }, { "declarator": "validator", "modifie...
{ "body": "@Test\n public void shouldReturnFalseWhenFieldIsNotList() throws NoSuchFieldException {\n Field webElementField = getField(\"webElement\");\n\n assertThat(validator.isListOfComponent(webElementField)).isFalse();\n }", "class_method_signature": "FluentElementInjectionSupportValidatorTe...
{ "fields": [ { "declarator": "componentsManager", "modifier": "private final", "original_string": "private final ComponentsManager componentsManager;", "type": "ComponentsManager", "var_name": "componentsManager" } ], "file": "fluentlenium-core/src/main/java/org/fluentlenium...
{ "body": "boolean isListOfComponent(Field field) {\n //Don't replace the predicate with a method reference\n return isFieldListOf(field, genericType -> componentsManager.isComponentClass(genericType));\n }", "class_method_signature": "FluentElementInjectionSupportValidator.isListOfComponent(Field ...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
2088736_608
{ "fields": [ { "declarator": "element", "modifier": "@Mock\n private", "original_string": "@Mock\n private LocatableElement element;", "type": "LocatableElement", "var_name": "element" }, { "declarator": "driver", "modifier": "@Mock\n private", "or...
{ "body": "@Test\n public void testGetName() {\n when(element.getAttribute(\"name\")).thenReturn(\"test\");\n assertThat(fluentElement.name()).isEqualTo(\"test\");\n }", "class_method_signature": "FluentWebElementTest.testGetName()", "constructor": false, "full_signature": "@Test public void...
{ "fields": [ { "declarator": "search", "modifier": "private final", "original_string": "private final Search search;", "type": "Search", "var_name": "search" }, { "declarator": "dom", "modifier": "private final", "original_string": "private final Dom dom;",...
{ "body": "public String name() {\n return webElement.getAttribute(\"name\");\n }", "class_method_signature": "FluentWebElement.name()", "constructor": false, "full_signature": "public String name()", "identifier": "name", "invocations": [ "getAttribute" ], "modifiers": "public", "parame...
{ "created": "7/22/2011 1:26:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2088736, "size": null, "stargazer_count": null, "stars": 723, "updates": "2020-01-25T15:44:19+00:00", "url": "https://github.com/FluentLenium/Flue...
49472222_0
{ "fields": [], "file": "src/main/resources/archetype-resources/webapp/src/test/java/webapp/fo/rest/support/FoCorsFilterTest.java", "identifier": "FoCorsFilterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseCorsAllowedOrigins() throws Exception {\n FoCorsFilter filter = new FoCorsFilter();\n assertArrayEquals(new String[0], filter.parseCorsAllowedOrigins(\" \").toArray());\n assertArrayEquals(new String[]{\"http://foo.com\", \"https://bar.com:2018\"},\n ...
{ "fields": [ { "declarator": "corsAllowedOrigins", "modifier": "private", "original_string": "private List<String> corsAllowedOrigins;", "type": "List<String>", "var_name": "corsAllowedOrigins" } ], "file": "src/main/resources/archetype-resources/webapp/src/main/java/webapp/...
{ "body": "List<String> parseCorsAllowedOrigins(String corsAllowedOriginsStr) {\n\t\tList<String> resultList = new ArrayList<>();\n\t\tcorsAllowedOriginsStr = StringUtils.trimToNull(corsAllowedOriginsStr);\n\t\tString[] originArray = StringUtils.split(corsAllowedOriginsStr, \";\");\n\t\tif(originArray == null || orig...
{ "created": null, "fork": null, "fork_count": 24, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 49472222, "size": 5022, "stargazer_count": 46, "stars": null, "updates": null, "url": "https://github.com/chenjianjx/srb4j" }
49472222_1
{ "fields": [], "file": "src/main/resources/archetype-resources/webapp/src/test/java/webapp/fo/rest/support/FoCorsFilterTest.java", "identifier": "FoCorsFilterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDecideResponseOriginHeader() {\n FoCorsFilter filter = new FoCorsFilter();\n assertNull(filter.decideResponseOriginHeader(null, \"http://foo.com\"));\n assertNull(filter.decideResponseOriginHeader(Collections.emptyList(), \"http://foo.com\"));\n assert...
{ "fields": [ { "declarator": "corsAllowedOrigins", "modifier": "private", "original_string": "private List<String> corsAllowedOrigins;", "type": "List<String>", "var_name": "corsAllowedOrigins" } ], "file": "src/main/resources/archetype-resources/webapp/src/main/java/webapp/...
{ "body": "String decideResponseOriginHeader(List<String> allowed, String origin) {\n\t\tif (allowed == null || allowed.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (allowed.contains(\"*\")) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tif (allowed.contains(origin)) {\n\t\t\treturn origin;\n\t\t}\n\t\treturn null;\n\t}", "...
{ "created": null, "fork": null, "fork_count": 24, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 49472222, "size": 5022, "stargazer_count": 46, "stars": null, "updates": null, "url": "https://github.com/chenjianjx/srb4j" }
49472222_2
{ "fields": [], "file": "src/main/resources/archetype-resources/utils/src/test/java/utils/lang/MyCodecUtilsTest.java", "identifier": "MyCodecUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsPasswordDjangoMatches() throws Exception {\n assertTrue(MyCodecUtils.isPasswordDjangoMatches(\"dhde8212\", \"pbkdf2_sha256$10548$qZFRFfsx7E$GJtb+sRQipEJnu+ORrwZe8xQE1SQV4pXijFnVl0G5CI=\"));\n assertTrue(MyCodecUtils.isPasswordDjangoMatches(\"Hello@Beckham\", \"pbk...
{ "fields": [ { "declarator": "DJANGO_HASH_ALGORITHM_NAME = \"pbkdf2_sha256\"", "modifier": "public static final", "original_string": "public static final String DJANGO_HASH_ALGORITHM_NAME = \"pbkdf2_sha256\";", "type": "String", "var_name": "DJANGO_HASH_ALGORITHM_NAME" } ], ...
{ "body": "public static boolean isPasswordDjangoMatches(String clearPassword, String encodedPassword) {\n // hashedPassword consist of: ALGORITHM, ITERATIONS_NUMBER, SALT and HASH\n String[] parts = encodedPassword.split(\"\\\\$\");\n if (parts.length != 4) {\n // wrong hash format\n ...
{ "created": null, "fork": null, "fork_count": 24, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 49472222, "size": 5022, "stargazer_count": 46, "stars": null, "updates": null, "url": "https://github.com/chenjianjx/srb4j" }
49472222_3
{ "fields": [], "file": "src/main/resources/archetype-resources/utils/src/test/java/utils/lang/MyLangUtilsTest.java", "identifier": "MyLangUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testTrimStringProps() throws Exception {\n\t\tBeanToTrim btt = new BeanToTrim();\n\t\tMyLangUtils.trimRootLevelStringFields(btt);\n\t\tSystem.out.println(btt);\n\t\t\n\t\tAssert.assertEquals(\"withSpace\", btt.withSpace);\n\t\tAssert.assertNull(btt.allBlank);\n\t\tAssert.assertEquals(\...
{ "fields": [], "file": "src/main/resources/archetype-resources/utils/src/main/java/utils/lang/MyLangUtils.java", "identifier": "MyLangUtils", "interfaces": "", "methods": [ { "class_method_signature": "MyLangUtils.newCalendar(long milis)", "constructor": false, "full_signature": "public...
{ "body": "public static void trimRootLevelStringFields(Object bean) {\n\t\tif (bean == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tField[] fields = bean.getClass().getDeclaredFields();\n\t\tif (fields == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (Field f : fields) {\n\t\t\tif (f.getType().isPrimitive()) {\n\t\t\t\tcontinue;...
{ "created": null, "fork": null, "fork_count": 24, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 49472222, "size": 5022, "stargazer_count": 46, "stars": null, "updates": null, "url": "https://github.com/chenjianjx/srb4j" }
24961552_19
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFind() throws Exception {\n\n }", "class_method_signature": "PersistentObjectTest.testFind()", "constructor": false, "full_signature": "@Test public void testFind()", "identifier": "testFind", "invocations": [], "modifiers": "@Test public", "parameters": "()", ...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public static final List<PersistentObject> find (String user,\n String name,\n Map<String,Object> query) throws InstantiationException {\n return PersistentObject.find(user,name,query,null);\n ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_23
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/kernel/exec/KernelThreadTest.java", "identifier": "KernelThreadTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCurrentKernelThread() throws Exception {\n KernelThread currentThread = KernelThread.currentKernelThread();\n }", "class_method_signature": "KernelThreadTest.testCurrentKernelThread()", "constructor": false, "full_signature": "@Test public void testCurrentKernelTh...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KernelThread.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(KernelThread.class);", "type": "Logger", "var_name": "logger" }, { "declarator": ...
{ "body": "public static KernelThread currentKernelThread() {\n synchronized (KernelThread.kernelThreads) {\n KernelThread kernelThread = KernelThread.kernelThreads.get(Thread.currentThread());\n if (kernelThread == null) {\n // This is the first time we see this thread. Cr...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_3
{ "fields": [ { "declarator": "database", "modifier": "@Mock", "original_string": "@Mock\n MongoDatabase database;", "type": "MongoDatabase", "var_name": "database" }, { "declarator": "collection", "modifier": "@Mock", "original_string": "@Mock\n Mongo...
{ "body": "@Test\n public void testDelete() throws Exception {\n\n }", "class_method_signature": "MongoDBProviderTest.testDelete()", "constructor": false, "full_signature": "@Test public void testDelete()", "identifier": "testDelete", "invocations": [], "modifiers": "@Test public", "parameters": "...
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private MongoDatabase db;", "type": "MongoDatabase", "var_name": "db" }, { "declarator": "client", "modifier": "private", "original_string": "private MongoClient client;", "...
{ "body": "@Override\n public void delete(String user, String name, PersistentObject obj) throws InstantiationException {\n String collectionName = user + \"_\" + name;\n if (!KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"delete db one - not authorize...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_15
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSave() throws Exception {\n\n }", "class_method_signature": "PersistentObjectTest.testSave()", "constructor": false, "full_signature": "@Test public void testSave()", "identifier": "testSave", "invocations": [], "modifiers": "@Test public", "parameters": "()", ...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public void save(String user,String collection) throws IOException {\n if (! KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"save one - not authorized\");\n }\n DataBase db = BootStrap.getBootStrap().getDataBase();\n if (db == nul...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_14
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSaveToFile() throws Exception {\n\n }", "class_method_signature": "PersistentObjectTest.testSaveToFile()", "constructor": false, "full_signature": "@Test public void testSaveToFile()", "identifier": "testSaveToFile", "invocations": [], "modifiers": "@Test public", ...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public void saveToFile(String filename) throws IOException {\n File file = PersistentObject.buildFile(ResourceUtils.normalizeResourceName(filename));\n /* Make sure all directories exist */\n file.getParentFile().mkdirs();\n FileOutputStream output = new FileOutputStream(file);\...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_2
{ "fields": [ { "declarator": "database", "modifier": "@Mock", "original_string": "@Mock\n MongoDatabase database;", "type": "MongoDatabase", "var_name": "database" }, { "declarator": "collection", "modifier": "@Mock", "original_string": "@Mock\n Mongo...
{ "body": "@Test\n public void testSimpleStore() throws Exception {\n Resource resource = new Resource(\"test\");\n resource.getProperties().put(\"key\", \"value1\");\n provider.store(\"admin\", \"collection\", resource);\n // Check db saved it.\n verify(collection,atLeastOnce())...
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private MongoDatabase db;", "type": "MongoDatabase", "var_name": "db" }, { "declarator": "client", "modifier": "private", "original_string": "private MongoClient client;", "...
{ "body": "@Override\n public final void store(List<ResourceAnchor> anchors) throws IOException {\n if (!KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"store db list - not authorized\");\n }\n HashMap<String,ArrayList<WriteModel>> collectionReq...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_22
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/kernel/exec/KernelThreadTest.java", "identifier": "KernelThreadTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetKernelThread() throws Exception {\n\n }", "class_method_signature": "KernelThreadTest.testGetKernelThread()", "constructor": false, "full_signature": "@Test public void testGetKernelThread()", "identifier": "testGetKernelThread", "invocations": [], "modifiers": ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KernelThread.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(KernelThread.class);", "type": "Logger", "var_name": "logger" }, { "declarator": ...
{ "body": "public static KernelThread getKernelThread (Thread t) {\n synchronized (KernelThread.kernelThreads) {\n KernelThread kernelThread = KernelThread.kernelThreads.get(t);\n if (kernelThread == null) {\n // This is the first time we see this thread. Create a KernelThr...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_18
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNewObjectFromJSON() throws Exception {\n\n }", "class_method_signature": "PersistentObjectTest.testNewObjectFromJSON()", "constructor": false, "full_signature": "@Test public void testNewObjectFromJSON()", "identifier": "testNewObjectFromJSON", "invocations": [], "...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public static final PersistentObject newObjectFromJSON (String json) throws InstantiationException {\n if (! KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"new object from JSON - not authorized\");\n }\n try {\n\n ObjectMappe...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_5
{ "fields": [ { "declarator": "database", "modifier": "@Mock", "original_string": "@Mock\n MongoDatabase database;", "type": "MongoDatabase", "var_name": "database" }, { "declarator": "collection", "modifier": "@Mock", "original_string": "@Mock\n Mongo...
{ "body": "@Test\n public void testDeleteCollection() throws Exception {\n\n }", "class_method_signature": "MongoDBProviderTest.testDeleteCollection()", "constructor": false, "full_signature": "@Test public void testDeleteCollection()", "identifier": "testDeleteCollection", "invocations": [], "modif...
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private MongoDatabase db;", "type": "MongoDatabase", "var_name": "db" }, { "declarator": "client", "modifier": "private", "original_string": "private MongoClient client;", "...
{ "body": "@Override\n public final void deleteCollection(String user,String name) {\n String collectionName = user + \"_\" + name;\n if (!KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"delete collection - not authorized\");\n }\n MongoCo...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_13
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToJSON() throws Exception {\n\n }", "class_method_signature": "PersistentObjectTest.testToJSON()", "constructor": false, "full_signature": "@Test public void testToJSON()", "identifier": "testToJSON", "invocations": [], "modifiers": "@Test public", "parameters": ...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public String toJSON (OutputStream output) throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.writeValue(output, this);\n String res = output.toString();\n output.flush();\n output.close();\n return res;\n }", "class_method_signature": "...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_29
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/boot/BootStrapTest.java", "identifier": "BootStrapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSecurityManager() throws Exception {\n\n }", "class_method_signature": "BootStrapTest.testGetSecurityManager()", "constructor": false, "full_signature": "@Test public void testGetSecurityManager()", "identifier": "testGetSecurityManager", "invocations": [], "mod...
{ "fields": [ { "declarator": "bootStrap = null", "modifier": "private static", "original_string": "private static BootStrap bootStrap = null;", "type": "BootStrap", "var_name": "bootStrap" }, { "declarator": "args = null", "modifier": "private", "original_s...
{ "body": "public KernelSecurityManager getSecurityManager() {\n return securityManager;\n }", "class_method_signature": "BootStrap.getSecurityManager()", "constructor": false, "full_signature": "public KernelSecurityManager getSecurityManager()", "identifier": "getSecurityManager", "invocations":...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_9
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/configuration/NetShellConfigurationTest.java", "identifier": "NetShellConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetGlobal() throws Exception {\n\n }", "class_method_signature": "NetShellConfigurationTest.testSetGlobal()", "constructor": false, "full_signature": "@Test public void testSetGlobal()", "identifier": "testSetGlobal", "invocations": [], "modifiers": "@Test public",...
{ "fields": [ { "declarator": "instance", "modifier": "@JsonIgnore\n private static", "original_string": "@JsonIgnore\n private static NetShellConfiguration instance;", "type": "NetShellConfiguration", "var_name": "instance" }, { "declarator": "DEFAULT_FILENAME = ...
{ "body": "public final synchronized void setGlobal(GlobalConfiguration global) {\n if (this.global == null) {\n // Can only set once. Fail silently otherwise\n this.global = global;\n // Make it read-only\n this.getGlobal().readOnly();\n }\n }", "class_m...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_25
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/kernel/exec/KernelThreadTest.java", "identifier": "KernelThreadTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetUser() throws Exception {\n\n }", "class_method_signature": "KernelThreadTest.testSetUser()", "constructor": false, "full_signature": "@Test public void testSetUser()", "identifier": "testSetUser", "invocations": [], "modifiers": "@Test public", "parameters": ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KernelThread.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(KernelThread.class);", "type": "Logger", "var_name": "logger" }, { "declarator": ...
{ "body": "public synchronized void setUser(User user) throws SecurityException {\n if (this.user == null) {\n this.user = user;\n this.privileged = user.isPrivileged();\n } else {\n throw new SecurityException(\"Attempt to change the user\");\n }\n }", "clas...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_24
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/kernel/exec/KernelThreadTest.java", "identifier": "KernelThreadTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetUser() throws Exception {\n\n }", "class_method_signature": "KernelThreadTest.testGetUser()", "constructor": false, "full_signature": "@Test public void testGetUser()", "identifier": "testGetUser", "invocations": [], "modifiers": "@Test public", "parameters": ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KernelThread.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(KernelThread.class);", "type": "Logger", "var_name": "logger" }, { "declarator": ...
{ "body": "public synchronized User getUser() {\n\n if (this.user == null) {\n // Retrieve, when possible, the User associated to this thread\n this.user = User.getUser(Thread.currentThread().getThreadGroup());\n }\n\n return this.user;\n }", "class_method_signature": "...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_8
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/configuration/NetShellConfigurationTest.java", "identifier": "NetShellConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetGlobal() throws Exception {\n\n }", "class_method_signature": "NetShellConfigurationTest.testGetGlobal()", "constructor": false, "full_signature": "@Test public void testGetGlobal()", "identifier": "testGetGlobal", "invocations": [], "modifiers": "@Test public",...
{ "fields": [ { "declarator": "instance", "modifier": "@JsonIgnore\n private static", "original_string": "@JsonIgnore\n private static NetShellConfiguration instance;", "type": "NetShellConfiguration", "var_name": "instance" }, { "declarator": "DEFAULT_FILENAME = ...
{ "body": "public GlobalConfiguration getGlobal() {\n return global;\n }", "class_method_signature": "NetShellConfiguration.getGlobal()", "constructor": false, "full_signature": "public GlobalConfiguration getGlobal()", "identifier": "getGlobal", "invocations": [], "modifiers": "public", "para...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_28
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/boot/BootStrapTest.java", "identifier": "BootStrapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToRootRealPath() throws Exception {\n\n }", "class_method_signature": "BootStrapTest.testToRootRealPath()", "constructor": false, "full_signature": "@Test public void testToRootRealPath()", "identifier": "testToRootRealPath", "invocations": [], "modifiers": "@Test ...
{ "fields": [ { "declarator": "bootStrap = null", "modifier": "private static", "original_string": "private static BootStrap bootStrap = null;", "type": "BootStrap", "var_name": "bootStrap" }, { "declarator": "args = null", "modifier": "private", "original_s...
{ "body": "static public Path toRootRealPath() {\n\n Path realPathName;\n try {\n if (NetShellConfiguration.getInstance() != null) {\n BootStrap.masterConfiguration = NetShellConfiguration.getInstance().getGlobal();\n if (masterConfiguration == null) {\n ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_12
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetResourceClassName() throws Exception {\n\n }", "class_method_signature": "PersistentObjectTest.testSetResourceClassName()", "constructor": false, "full_signature": "@Test public void testSetResourceClassName()", "identifier": "testSetResourceClassName", "invocatio...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public final void setResourceClassName(String resourceClassName) {\n if (! KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"set resource class name - not authorized\");\n }\n this.resourceClassName = resourceClassName;\n }", "class_m...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_4
{ "fields": [ { "declarator": "database", "modifier": "@Mock", "original_string": "@Mock\n MongoDatabase database;", "type": "MongoDatabase", "var_name": "database" }, { "declarator": "collection", "modifier": "@Mock", "original_string": "@Mock\n Mongo...
{ "body": "@Test\n public void testCreateCollection() throws Exception {\n\n }", "class_method_signature": "MongoDBProviderTest.testCreateCollection()", "constructor": false, "full_signature": "@Test public void testCreateCollection()", "identifier": "testCreateCollection", "invocations": [], "modif...
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private MongoDatabase db;", "type": "MongoDatabase", "var_name": "db" }, { "declarator": "client", "modifier": "private", "original_string": "private MongoClient client;", "...
{ "body": "@Override\n public final void createCollection(String user, String name) {\n String collectionName = user + \"_\" + name;\n if (!KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"create collection - not authorized\");\n }\n this.d...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_11
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResourceClassName() throws Exception {\n PersistentObject obj = new PersistentObject();\n assertTrue(obj.getResourceClassName() != null);\n assertTrue(obj.getResourceClassName().equals(\"net.es.netshell.api.PersistentObject\"));\n }", "class_method_si...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public final String getResourceClassName() {\n return resourceClassName;\n }", "class_method_signature": "PersistentObject.getResourceClassName()", "constructor": false, "full_signature": "public final String getResourceClassName()", "identifier": "getResourceClassName", "invocations": ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_7
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/configuration/NetShellConfigurationTest.java", "identifier": "NetShellConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetInstance() throws Exception {\n NetShellConfiguration conf = NetShellConfiguration.getInstance();\n }", "class_method_signature": "NetShellConfigurationTest.testGetInstance()", "constructor": false, "full_signature": "@Test public void testGetInstance()", "id...
{ "fields": [ { "declarator": "instance", "modifier": "@JsonIgnore\n private static", "original_string": "@JsonIgnore\n private static NetShellConfiguration instance;", "type": "NetShellConfiguration", "var_name": "instance" }, { "declarator": "DEFAULT_FILENAME = ...
{ "body": "public static NetShellConfiguration getInstance() {\n if (instance == null) {\n try {\n NetShellConfiguration tmp = NetShellConfiguration.loadConfiguration();\n if (instance == null) {\n instance = tmp;\n }\n } cat...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_27
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/kernel/exec/KernelThreadTest.java", "identifier": "KernelThreadTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetCurrentDirectory() throws Exception {\n\n }", "class_method_signature": "KernelThreadTest.testSetCurrentDirectory()", "constructor": false, "full_signature": "@Test public void testSetCurrentDirectory()", "identifier": "testSetCurrentDirectory", "invocations": [],...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KernelThread.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(KernelThread.class);", "type": "Logger", "var_name": "logger" }, { "declarator": ...
{ "body": "public final synchronized void setCurrentDirectory(String currentDirectory) {\n // Check if the directory exists\n if ( ! FileUtils.exists(currentDirectory)) {\n // Cannot change into a non existing directory\n return;\n }\n // Check access\n String ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_31
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/boot/BootStrapTest.java", "identifier": "BootStrapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetBootStrap() throws Exception {\n BootStrap bootStrap = BootStrap.getBootStrap();\n }", "class_method_signature": "BootStrapTest.testGetBootStrap()", "constructor": false, "full_signature": "@Test public void testGetBootStrap()", "identifier": "testGetBootStra...
{ "fields": [ { "declarator": "bootStrap = null", "modifier": "private static", "original_string": "private static BootStrap bootStrap = null;", "type": "BootStrap", "var_name": "bootStrap" }, { "declarator": "args = null", "modifier": "private", "original_s...
{ "body": "public static BootStrap getBootStrap() {\n return BootStrap.getBootStrap(null,null);\n }", "class_method_signature": "BootStrap.getBootStrap()", "constructor": false, "full_signature": "public static BootStrap getBootStrap()", "identifier": "getBootStrap", "invocations": [ "getBootS...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_30
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/boot/BootStrapTest.java", "identifier": "BootStrapTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetDataBase() throws Exception {\n\n }", "class_method_signature": "BootStrapTest.testGetDataBase()", "constructor": false, "full_signature": "@Test public void testGetDataBase()", "identifier": "testGetDataBase", "invocations": [], "modifiers": "@Test public", "...
{ "fields": [ { "declarator": "bootStrap = null", "modifier": "private static", "original_string": "private static BootStrap bootStrap = null;", "type": "BootStrap", "var_name": "bootStrap" }, { "declarator": "args = null", "modifier": "private", "original_s...
{ "body": "public DataBase getDataBase() {\n return this.dbClient;\n }", "class_method_signature": "BootStrap.getDataBase()", "constructor": false, "full_signature": "public DataBase getDataBase()", "identifier": "getDataBase", "invocations": [], "modifiers": "public", "parameters": "()", "r...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_26
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/kernel/exec/KernelThreadTest.java", "identifier": "KernelThreadTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetCurrentDirectory() throws Exception {\n\n }", "class_method_signature": "KernelThreadTest.testGetCurrentDirectory()", "constructor": false, "full_signature": "@Test public void testGetCurrentDirectory()", "identifier": "testGetCurrentDirectory", "invocations": [],...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KernelThread.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(KernelThread.class);", "type": "Logger", "var_name": "logger" }, { "declarator": ...
{ "body": "public final synchronized String getCurrentDirectory() {\n if (this.currentDirectory == null) {\n // Default to the home directory of the user\n if (this.user != null) {\n this.currentDirectory = FileUtils.normalize(this.user.getHomePath().toString());\n ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_6
{ "fields": [ { "declarator": "database", "modifier": "@Mock", "original_string": "@Mock\n MongoDatabase database;", "type": "MongoDatabase", "var_name": "database" }, { "declarator": "collection", "modifier": "@Mock", "original_string": "@Mock\n Mongo...
{ "body": "@Test\n public void testFind() throws Exception {\n\n }", "class_method_signature": "MongoDBProviderTest.testFind()", "constructor": false, "full_signature": "@Test public void testFind()", "identifier": "testFind", "invocations": [], "modifiers": "@Test public", "parameters": "()", "...
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private MongoDatabase db;", "type": "MongoDatabase", "var_name": "db" }, { "declarator": "client", "modifier": "private", "original_string": "private MongoClient client;", "...
{ "body": "@Override\n public final List<String> find(String user,\n String name,\n Map<String, Object> query) throws InstantiationException {\n String collectionName = user + \"_\" + name;\n MongoCollection collection = this.db.getC...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_10
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/configuration/NetShellConfigurationTest.java", "identifier": "NetShellConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSave() throws Exception {\n\n }", "class_method_signature": "NetShellConfigurationTest.testSave()", "constructor": false, "full_signature": "@Test public void testSave()", "identifier": "testSave", "invocations": [], "modifiers": "@Test public", "parameters": "()...
{ "fields": [ { "declarator": "instance", "modifier": "@JsonIgnore\n private static", "original_string": "@JsonIgnore\n private static NetShellConfiguration instance;", "type": "NetShellConfiguration", "var_name": "instance" }, { "declarator": "DEFAULT_FILENAME = ...
{ "body": "public void save(File file) throws IOException {\n super.saveToFile(file.getPath());\n // Can no longer be modified within NetShell\n this.canSet = false;\n this.global.readOnly();\n }", "class_method_signature": "NetShellConfiguration.save(File file)", "constructor": fal...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_21
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/kernel/exec/KernelThreadTest.java", "identifier": "KernelThreadTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsPrivileged() throws Exception {\n\n }", "class_method_signature": "KernelThreadTest.testIsPrivileged()", "constructor": false, "full_signature": "@Test public void testIsPrivileged()", "identifier": "testIsPrivileged", "invocations": [], "modifiers": "@Test publi...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KernelThread.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(KernelThread.class);", "type": "Logger", "var_name": "logger" }, { "declarator": ...
{ "body": "public synchronized boolean isPrivileged() {\n\n return this.privileged ||\n (KernelThread.currentKernelThread().getUser() != null\n && KernelThread.currentKernelThread().getUser().isPrivileged() );\n }", "class_method_signature": "KernelThread.isPrivileged...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_17
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDelete() throws Exception {\n\n }", "class_method_signature": "PersistentObjectTest.testDelete()", "constructor": false, "full_signature": "@Test public void testDelete()", "identifier": "testDelete", "invocations": [], "modifiers": "@Test public", "parameters": ...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public static void delete(List<ResourceAnchor> resourceAnchors) throws InstantiationException, IOException {\n if (! KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"delete list - not authorized\");\n }\n DataBase db = BootStrap.getBootSt...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_1
{ "fields": [ { "declarator": "database", "modifier": "@Mock", "original_string": "@Mock\n MongoDatabase database;", "type": "MongoDatabase", "var_name": "database" }, { "declarator": "collection", "modifier": "@Mock", "original_string": "@Mock\n Mongo...
{ "body": "@Test\n public void testGetDatabase() throws Exception {\n MongoDatabase db = provider.getDatabase();\n assertEquals(db.getName(), \"test_db\");\n }", "class_method_signature": "MongoDBProviderTest.testGetDatabase()", "constructor": false, "full_signature": "@Test public void test...
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private MongoDatabase db;", "type": "MongoDatabase", "var_name": "db" }, { "declarator": "client", "modifier": "private", "original_string": "private MongoClient client;", "...
{ "body": "public final MongoDatabase getDatabase() {\n if (!KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"get database - not authorized\");\n }\n return this.db;\n }", "class_method_signature": "MongoDBProvider.getDatabase()", "constructor...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_0
{ "fields": [ { "declarator": "database", "modifier": "@Mock", "original_string": "@Mock\n MongoDatabase database;", "type": "MongoDatabase", "var_name": "database" }, { "declarator": "collection", "modifier": "@Mock", "original_string": "@Mock\n Mongo...
{ "body": "@Test\n public void testGetClient() throws Exception {\n\n }", "class_method_signature": "MongoDBProviderTest.testGetClient()", "constructor": false, "full_signature": "@Test public void testGetClient()", "identifier": "testGetClient", "invocations": [], "modifiers": "@Test public", "pa...
{ "fields": [ { "declarator": "db", "modifier": "private", "original_string": "private MongoDatabase db;", "type": "MongoDatabase", "var_name": "db" }, { "declarator": "client", "modifier": "private", "original_string": "private MongoClient client;", "...
{ "body": "public final MongoClient getClient() {\n if (!KernelThread.currentKernelThread().isPrivileged()) {\n throw new SecurityException(\"get db client - not authorized\");\n }\n return this.client;\n }", "class_method_signature": "MongoDBProvider.getClient()", "constructor"...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_16
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/api/PersistentObjectTest.java", "identifier": "PersistentObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSaveToJSON() throws Exception {\n\n }", "class_method_signature": "PersistentObjectTest.testSaveToJSON()", "constructor": false, "full_signature": "@Test public void testSaveToJSON()", "identifier": "testSaveToJSON", "invocations": [], "modifiers": "@Test public", ...
{ "fields": [ { "declarator": "resourceName", "modifier": "private", "original_string": "private String resourceName;", "type": "String", "var_name": "resourceName" }, { "declarator": "resourceClassName = this.getClass().getCanonicalName()", "modifier": "private",...
{ "body": "public String saveToJSON() throws IOException {\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n this.toJSON(output);\n output.flush();\n output.close();\n return output.toString();\n }", "class_method_signature": "PersistentObject.saveToJSON()", "co...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
24961552_20
{ "fields": [], "file": "kernel/src/test/java/net/es/netshell/kernel/exec/KernelThreadTest.java", "identifier": "KernelThreadTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetThread() throws Exception {\n\n }", "class_method_signature": "KernelThreadTest.testGetThread()", "constructor": false, "full_signature": "@Test public void testGetThread()", "identifier": "testGetThread", "invocations": [], "modifiers": "@Test public", "param...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(KernelThread.class)", "modifier": "private final", "original_string": "private final Logger logger = LoggerFactory.getLogger(KernelThread.class);", "type": "Logger", "var_name": "logger" }, { "declarator": ...
{ "body": "public Thread getThread() {\n return this.thread;\n }", "class_method_signature": "KernelThread.getThread()", "constructor": false, "full_signature": "public Thread getThread()", "identifier": "getThread", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Th...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 24961552, "size": 1250, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/esnet/netshell" }
42046027_50
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCRay3Test.java", "identifier": "CCRay3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIntersectsQuad() {\n final CCVector3 v0 = new CCVector3(0, 0, 0);\n final CCVector3 v1 = new CCVector3(5, 0, 0);\n final CCVector3 v2 = new CCVector3(5, 5, 0);\n final CCVector3 v3 = new CCVector3(0, 5, 0);\n\n CCVector3 intersectionPoint = null...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "cc-math/src/main/java/cc/creativecomputing/math/CCRay...
{ "body": "public boolean intersectsQuad(\n\t\tfinal CCVector3 theA, \n\t\tfinal CCVector3 theB, \n\t\tfinal CCVector3 theC, \n\t\tfinal CCVector3 theD,\n\t\tfinal CCVector3 theLocationStore\n\t) {\n\t\treturn intersects(theA, theB, theC, theLocationStore, false) || intersects(theA, theC, theD, theLocationStore, fals...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_11
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java", "identifier": "CCVector4Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testClone() {\n final CCVector4 vec1 = new CCVector4(0, 0, 0, 0);\n final CCVector4 vec2 = vec1.clone();\n assertEquals(vec1, vec2);\n assertNotSame(vec1, vec2);\n }", "class_method_signature": "CCVector4Test.testClone()", "constructor": false, "f...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector4(0, 0, 0, 0)", ...
{ "body": "@Override\n\tpublic CCVector4 clone() {\n\t\treturn new CCVector4(this);\n\t}", "class_method_signature": "CCVector4.clone()", "constructor": false, "full_signature": "@Override public CCVector4 clone()", "identifier": "clone", "invocations": [], "modifiers": "@Override public", "parameters":...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_46
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCRay3Test.java", "identifier": "CCRay3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testClone() {\n final CCRay3 ray1 = new CCRay3();\n final CCRay3 ray2 = ray1.clone();\n assertEquals(ray1, ray2);\n assertNotSame(ray1, ray2);\n }", "class_method_signature": "CCRay3Test.testClone()", "constructor": false, "full_signature": "@Test...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "cc-math/src/main/java/cc/creativecomputing/math/CCRay...
{ "body": "@Override\n\tpublic CCRay3 clone() {\n\t\treturn new CCRay3(this);\n\t}", "class_method_signature": "CCRay3.clone()", "constructor": false, "full_signature": "@Override public CCRay3 clone()", "identifier": "clone", "invocations": [], "modifiers": "@Override public", "parameters": "()", "re...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_4
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java", "identifier": "CCVector4Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDivide() {\n final CCVector4 vec1 = new CCVector4(1, -1, 2, -2);\n final CCVector4 vec2 = vec1.divide(2.0f);\n assertEquals(new CCVector4(0.5f, -0.5f, 1.0f, -1.0f), vec2);\n\n vec2.divideLocal(0.5f);\n assertEquals(new CCVector4(1.0f, -1.0f, 2.0...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector4(0, 0, 0, 0)", ...
{ "body": "public CCVector4 divide(final double theX, final double theY, final double theZ, final double theW, CCVector4 theStore) {\n\t\tif(theStore == null)theStore = new CCVector4();\n\t\treturn theStore.set(\n\t\t\tx / theX, \n\t\t\ty / theY, \n\t\t\tz / theZ, \n\t\t\tw / theW\n\t\t);\n\t}", "class_method_signa...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_31
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java", "identifier": "CCVector2Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDivide() {\n final CCVector2 vec1 = new CCVector2(1, -1);\n final CCVector2 vec2 = vec1.divide(2.0f);\n final CCVector2 vec2B = vec1.divide(2.0f, new CCVector2());\n assertEquals(new CCVector2(0.5f, -0.5f), vec2);\n assertEquals(new CCVector2(0....
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector2(0, 0)", "modif...
{ "body": "public CCVector2 divide(final double theScalar, final CCVector2 theStore) {\n return divide(theScalar, theScalar, theStore);\n }", "class_method_signature": "CCVector2.divide(final double theScalar, final CCVector2 theStore)", "constructor": false, "full_signature": "public CCVector2 divide...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_8
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java", "identifier": "CCVector4Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDistance() {\n final CCVector4 vec1 = new CCVector4(0, 0, 0, 0);\n assertTrue(4.0 == vec1.distance(4, 0, 0, 0));\n assertTrue(3.0 == vec1.distance(0, 3, 0, 0));\n assertTrue(2.0 == vec1.distance(0, 0, 2, 0));\n assertTrue(1.0 == vec1.distance(0,...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector4(0, 0, 0, 0)", ...
{ "body": "public double distance(final double theX, final double theY, final double theZ, final double theW) {\n\t\treturn CCMath.sqrt(distanceSquared(theX, theY, theZ, theW));\n\t}", "class_method_signature": "CCVector4.distance(final double theX, final double theY, final double theZ, final double theW)", "cons...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_27
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java", "identifier": "CCVector2Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAdd() {\n final CCVector2 vec1 = new CCVector2();\n final CCVector2 vec2 = new CCVector2(CCVector2.ONE);\n\n vec1.addLocal(1, 2);\n assertEquals(new CCVector2(1, 2), vec1);\n vec1.addLocal(-1, -2);\n assertEquals(CCVector2.ZERO, vec1);\n\...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector2(0, 0)", "modif...
{ "body": "public CCVector2 add(final double theX, final double theY, final CCVector2 theStore) {\n CCVector2 result = theStore;\n if (result == null) {\n result = new CCVector2();\n }\n\n return result.set(x + theX, y + theY);\n }", "class_method_signature": "CCVector2.add...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_26
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java", "identifier": "CCVector3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSimpleHash() {\n // Just a simple sanity check.\n final CCVector3 vec1 = new CCVector3(1, 2, 3);\n final CCVector3 vec2 = new CCVector3(1, 2, 3);\n final CCVector3 vec3 = new CCVector3(2, 2, 2);\n\n assertTrue(vec1.hashCode() == vec2.hashCode())...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ALLOWED_DEVIANCE = 0.000001f", "mod...
{ "body": "@Override\n public int hashCode() {\n int result = 65;\n\n final long myX = Double.doubleToLongBits(x);\n result += 63 * result + (int) (myX ^ myX >>> 64);\n\n final long myY = Double.doubleToLongBits(y);\n result += 63 * result + (int) (myY ^ myY >>> 64);\n\n f...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_9
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java", "identifier": "CCVector4Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLerp() {\n final CCVector4 vec1 = new CCVector4(8, 3, -2, 2);\n final CCVector4 vec2 = new CCVector4(2, 1, 0, -2);\n assertEquals(new CCVector4(5, 2, -1, 0), vec1.lerp(vec2, 0.5f));\n assertEquals(new CCVector4(5, 2, -1, 0), CCVector4.lerp(vec1, vec2, ...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector4(0, 0, 0, 0)", ...
{ "body": "public static CCVector4 lerp(\n\t\tfinal CCVector4 theBeginVector, \n\t\tfinal CCVector4 theEndVector, \n\t\tfinal double theScalar, \n\t\tCCVector4 theStore\n\t) {\n\t\tif(theStore == null)theStore = new CCVector4();\n\t\t\n\t\treturn theStore.set(\n\t\t\t(1.0f - theScalar) * theBeginVector.x + theScalar ...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_30
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java", "identifier": "CCVector2Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMultiply() {\n final CCVector2 vec1 = new CCVector2(1, -1);\n final CCVector2 vec2 = vec1.multiply(2.0f);\n final CCVector2 vec2B = vec1.multiply(2.0f, new CCVector2());\n assertEquals(new CCVector2(2.0f, -2.0f), vec2);\n assertEquals(new CCVect...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector2(0, 0)", "modif...
{ "body": "public CCVector2 multiply(final double theScalar, final CCVector2 theStore) {\n \treturn multiply(theScalar, theScalar, theStore);\n }", "class_method_signature": "CCVector2.multiply(final double theScalar, final CCVector2 theStore)", "constructor": false, "full_signature": "public CCVector2 mu...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_5
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java", "identifier": "CCVector4Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testScaleAdd() {\n final CCVector4 vec1 = new CCVector4(1, 1, 1, 1);\n final CCVector4 vec2 = vec1.scaleAdd(2.0f, new CCVector4(1, 2, 3, 4));\n assertEquals(new CCVector4(3.0f, 4.0f, 5.0f, 6.0f), vec2);\n\n vec1.scaleAddLocal(2.0f, new CCVector4(1, 2, 3, 4...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector4(0, 0, 0, 0)", ...
{ "body": "public CCVector4 scaleAdd(final double theScale, final CCVector4 theAdd, CCVector4 theStore) {\n\t\tif(theStore == null)theStore = new CCVector4();\n\t\treturn theStore.set(\n\t\t\tx * theScale + theAdd.x,\n\t\t\ty * theScale + theAdd.y,\n\t\t\tz * theScale + theAdd.z,\n\t\t\tw * theScale + theAdd.w\n\t\t)...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_47
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCRay3Test.java", "identifier": "CCRay3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDistance() {\n final CCRay3 ray1 = new CCRay3();\n assertTrue(25.0 == ray1.distanceSquared(new CCVector3(0, 5, 3), null));\n\n final CCVector3 store = new CCVector3();\n assertTrue(9.0 == ray1.distanceSquared(new CCVector3(0, 3, 3), store));\n a...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "cc-math/src/main/java/cc/creativecomputing/math/CCRay...
{ "body": "public double distanceSquared(final CCVector3 thePoint, final CCVector3 theStore) {\n\t\tfinal CCVector3 vectorA = new CCVector3();\n\t\tvectorA.set(thePoint).subtractLocal(_myOrigin);\n\t\tfinal double t0 = _myDirection.dot(vectorA);\n\t\tif (t0 > 0) {\n\t\t\t// d = |P - (O + t*D)|\n\t\t\tvectorA.set(_myD...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_10
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java", "identifier": "CCVector4Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDot() {\n final CCVector4 vec1 = new CCVector4(7, 2, 5, -1);\n assertTrue(35.0 == vec1.dot(3, 1, 2, -2));\n\n assertTrue(-11.0 == vec1.dot(new CCVector4(-1, 1, -1, 1)));\n }", "class_method_signature": "CCVector4Test.testDot()", "constructor": false, ...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector4(0, 0, 0, 0)", ...
{ "body": "public double dot(final double theX, final double theY, final double theZ, final double theW) {\n\t\treturn x * theX + y * theY + z * theZ + w * theW;\n\t}", "class_method_signature": "CCVector4.dot(final double theX, final double theY, final double theZ, final double theW)", "constructor": false, "f...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_51
{ "fields": [], "file": "cc-model/src/test/java/cc/creativecomputing/model/svg/CCSVGIOTest.java", "identifier": "CCSVGIOTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseUnitSize() {\n \tassertEquals(CCSVGIONew.parseUnitSize(\"1\"), 1f, 0f);\n }", "class_method_signature": "CCSVGIOTest.testParseUnitSize()", "constructor": false, "full_signature": "@Test public void testParseUnitSize()", "identifier": "testParseUnitSize", "inv...
{ "fields": [ { "declarator": "_myDocument", "modifier": "private", "original_string": "private CCSVGDocument _myDocument;", "type": "CCSVGDocument", "var_name": "_myDocument" }, { "declarator": "_myReader", "modifier": "private static", "original_string": "...
{ "body": "static protected double parseUnitSize(String text) {\n\t\tint len = text.length() - 2;\n\n\t\tif (text.endsWith(\"pt\")) {\n\t\t\treturn Double.parseDouble(text.substring(0, len)) * 1.25f;\n\t\t} else if (text.endsWith(\"pc\")) {\n\t\t\treturn Double.parseDouble(text.substring(0, len)) * 15;\n\t\t} else if...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_37
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java", "identifier": "CCVector2Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRotate() {\n final CCVector2 vec1 = new CCVector2(1, 0);\n final CCVector2 vec2 = vec1.rotateAroundOrigin(CCMath.HALF_PI, true, null);\n final CCVector2 vec2B = vec1.rotateAroundOrigin(CCMath.HALF_PI, false, new CCVector2());\n assertEquals(new CCVecto...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector2(0, 0)", "modif...
{ "body": "public CCVector2 rotate(double r, CCVector2 theStorage){\n\t\tif(theStorage == null){\n\t\t\ttheStorage = new CCVector2();\n\t\t}\n\t\tdouble xprev = x;\n\t\tdouble yprev = y;\n\t\t\n\t\tfinal double sinR = CCMath.sin(r);\n\t\tfinal double cosR = CCMath.cos(r);\n\n\t\ttheStorage.x = cosR * xprev + sinR * y...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_21
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java", "identifier": "CCVector3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDistance() {\n final CCVector3 vec1 = new CCVector3(0, 0, 0);\n assertTrue(4.0 == vec1.distance(4, 0, 0));\n assertTrue(3.0 == vec1.distance(0, 3, 0));\n assertTrue(2.0 == vec1.distance(0, 0, 2));\n\n final CCVector3 vec2 = new CCVector3(1, 1, 1...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ALLOWED_DEVIANCE = 0.000001f", "mod...
{ "body": "public double distance(final double theX, final double theY, final double theZ) {\n return CCMath.sqrt(distanceSquared(theX, theY, theZ));\n }", "class_method_signature": "CCVector3.distance(final double theX, final double theY, final double theZ)", "constructor": false, "full_signature": "...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_17
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java", "identifier": "CCVector3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDivide() {\n final CCVector3 vec1 = new CCVector3(1, -1, 2);\n final CCVector3 vec2 = vec1.divide(2.0f);\n assertEquals(new CCVector3(0.5f, -0.5f, 1.0f), vec2);\n\n vec2.divideLocal(0.5f);\n assertEquals(new CCVector3(1.0f, -1.0f, 2.0f), vec2);\...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ALLOWED_DEVIANCE = 0.000001f", "mod...
{ "body": "public CCVector3 divide(final double theX, final double theY, final double theZ, CCVector3 theStore) {\n \tif(theStore == null)theStore = new CCVector3();\n \ttheStore.set(\n \t\tx / theX, \n \t\ty / theY, \n \t\tz / theZ\n \t);\n \treturn theStore;\n }", "class_method_signature":...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_40
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java", "identifier": "CCVector2Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testClone() {\n final CCVector2 vec1 = new CCVector2(0, 0);\n final CCVector2 vec2 = vec1.clone();\n assertEquals(vec1, vec2);\n assertNotSame(vec1, vec2);\n }", "class_method_signature": "CCVector2Test.testClone()", "constructor": false, "full_si...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector2(0, 0)", "modif...
{ "body": "@Override\n public CCVector2 clone() {\n return new CCVector2(this);\n }", "class_method_signature": "CCVector2.clone()", "constructor": false, "full_signature": "@Override public CCVector2 clone()", "identifier": "clone", "invocations": [], "modifiers": "@Override public", "para...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_2
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java", "identifier": "CCVector4Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToArray() {\n final CCVector4 vec1 = new CCVector4();\n vec1.set(CCMath.PI, Float.MAX_VALUE, 42, -1);\n final double[] array = vec1.toArray(null);\n final double[] array2 = vec1.toArray(new double[4]);\n assertNotNull(array);\n assertTrue...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector4(0, 0, 0, 0)", ...
{ "body": "public double[] toArray(double[] theStore) {\n\t\tif (theStore == null) {\n\t\t\ttheStore = new double[4];\n\t\t}\n\t\t// do last first to ensure size is correct before any edits occur.\n\t\ttheStore[3] = w;\n\t\ttheStore[2] = z;\n\t\ttheStore[1] = y;\n\t\ttheStore[0] = x;\n\t\treturn theStore;\n\t}", "c...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_3
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java", "identifier": "CCVector4Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMultiply() {\n final CCVector4 vec1 = new CCVector4(1, -1, 2, -2);\n final CCVector4 vec2 = vec1.multiply(2.0f);\n assertEquals(new CCVector4(2.0f, -2.0f, 4.0f, -4.0f), vec2);\n\n vec2.multiplyLocal(0.5f);\n assertEquals(new CCVector4(1.0f, -1.0...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector4(0, 0, 0, 0)", ...
{ "body": "public CCVector4 multiply(final double theX, final double theY, final double theZ, final double theW, CCVector4 theStore) {\n\t\tif(theStore == null)theStore = new CCVector4();\n\t\treturn theStore.set(\n\t\t\tx * theX, \n\t\t\ty * theY, \n\t\t\tz * theZ, \n\t\t\tw * theW\n\t\t);\n\t}", "class_method_sig...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_41
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCPlaneTest.java", "identifier": "CCPlaneTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEquals() {\n // couple of equals validity tests\n final CCPlane plane1 = new CCPlane();\n assertEquals(plane1, plane1);\n assertFalse(plane1.equals(null));\n assertFalse(plane1.equals(new CCVector2()));\n\n // cover more of equals\n ...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "XZ = new CCPlane(CCVector3.UNIT_Y, 0)", ...
{ "body": "@Override\n\tpublic boolean equals(final Object theObject) {\n\t\tif (this == theObject) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!(theObject instanceof CCPlane)) {\n\t\t\treturn false;\n\t\t}\n\t\tfinal CCPlane comp = (CCPlane) theObject;\n\t\treturn constant() == comp.constant() && _myNormal.equals(comp.nor...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_16
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java", "identifier": "CCVector3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMultiply() {\n final CCVector3 vec1 = new CCVector3(1, -1, 2);\n final CCVector3 vec2 = vec1.multiply(2.0f);\n assertEquals(new CCVector3(2.0f, -2.0f, 4.0f), vec2);\n\n vec2.multiplyLocal(0.5f);\n assertEquals(new CCVector3(1.0f, -1.0f, 2.0f), v...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ALLOWED_DEVIANCE = 0.000001f", "mod...
{ "body": "public CCVector3 multiply(final double theX, final double theY, final double theZ, CCVector3 theStore) {\n \tif(theStore == null)theStore = new CCVector3();\n \ttheStore.set(\n \t\tx * theX, \n \t\ty * theY, \n \t\tz * theZ\n \t);\n \treturn theStore;\n }", "class_method_signature...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_20
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java", "identifier": "CCVector3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNormalize() {\n final CCVector3 vec1 = new CCVector3(2, 1, 3);\n// assertTrue(vec1.length() == CCMath.sqrt(14));\n\n final CCVector3 vec2 = vec1.normalize();\n final double invLength = 1 / CCMath.sqrt(2 * 2 + 1 * 1 + 3 * 3);\n assertEquals(new C...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ALLOWED_DEVIANCE = 0.000001f", "mod...
{ "body": "public CCVector3 normalize(CCVector3 theStore) {\n \tif(theStore == null)theStore = new CCVector3();\n final double lengthSq = lengthSquared();\n if (CCMath.abs(lengthSq) > CCMath.FLT_EPSILON) {\n return multiply(1 / CCMath.sqrt(lengthSq), theStore);\n }\n\n return...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_36
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java", "identifier": "CCVector2Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLerp() {\n final CCVector2 vec1 = new CCVector2(8, 3);\n final CCVector2 vec2 = new CCVector2(2, 1);\n assertEquals(new CCVector2(5, 2), vec1.lerp(vec2, 0.5f));\n assertEquals(new CCVector2(5, 2), vec1.lerp(vec2, 0.5f, new CCVector2()));\n asser...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ZERO = new CCVector2(0, 0)", "modif...
{ "body": "public CCVector2 lerp(final CCVector2 theEndVector, final double theScalar, final CCVector2 theStore) {\n return lerp(this, theEndVector, theScalar, theStore);\n }", "class_method_signature": "CCVector2.lerp(final CCVector2 theEndVector, final double theScalar, final CCVector2 theStore)", "co...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }
42046027_23
{ "fields": [], "file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java", "identifier": "CCVector3Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAngle() {\n final CCVector3 vec1 = new CCVector3(1, 0, 0);\n\n assertTrue(CCMath.HALF_PI == vec1.smallestAngleBetween(new CCVector3(0, -1, 0)));\n }", "class_method_signature": "CCVector3Test.testAngle()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ALLOWED_DEVIANCE = 0.000001f", "mod...
{ "body": "public static double angle(final CCVector3 v1, final CCVector3 v2) {\n\n\t\tfinal double normProduct = v1.length() * v2.length();\n\t\tif (normProduct == 0) {\n\t\t\tthrow new ArithmeticException(\"null norm\");\n\t\t}\n\n\t\tfinal double dot = v1.dot(v2);\n\t\tfinal double threshold = normProduct * 0.9999...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 42046027, "size": 382577, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/texone/creativecomputing" }