id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
11337147_707 | {
"fields": [
{
"declarator": "dataStoreCreator",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ApplicationDataStoreCreator dataStoreCreator;",
"type": "ApplicationDataStoreCreator",
"var_name": "dataStoreCreator"
},
{
"declarator": "dataStore... | {
"body": "@Test\n public void defineDefaultSearchOrder_should_return_attribute_name() throws Exception {\n //when\n final String defaultSearchOrder = apiApplication.defineDefaultSearchOrder();\n\n //then\n assertThat(defaultSearchOrder).isEqualTo(\"displayName\");\n }",
"class_met... | {
"fields": [
{
"declarator": "creator",
"modifier": "private final",
"original_string": "private final ApplicationDataStoreCreator creator;",
"type": "ApplicationDataStoreCreator",
"var_name": "creator"
},
{
"declarator": "applicationDataStoreFactory",
"modifier"... | {
"body": "@Override\n public String defineDefaultSearchOrder() {\n return ApplicationItem.ATTRIBUTE_DISPLAY_NAME;\n }",
"class_method_signature": "APIApplication.defineDefaultSearchOrder()",
"constructor": false,
"full_signature": "@Override public String defineDefaultSearchOrder()",
"identifier... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_357 | {
"fields": [
{
"declarator": "LAYOUT_PAGE_NAME = \"layoutPageName\"",
"modifier": "public static final",
"original_string": "public static final String LAYOUT_PAGE_NAME = \"layoutPageName\";",
"type": "String",
"var_name": "LAYOUT_PAGE_NAME"
},
{
"declarator": "hsReque... | {
"body": "@Test(expected = RuntimeException.class)\n public void should_throw_an_error_when_the_uri_is_malformed() throws Exception {\n\n applicationRouter.route(hsRequest, hsResponse, apiSession, pageRenderer, resourceRenderer, bonitaHomeFolderAccessor);\n }",
"class_method_signature": "ApplicationRo... | {
"fields": [
{
"declarator": "applicationModelFactory",
"modifier": "private final",
"original_string": "private final ApplicationModelFactory applicationModelFactory;",
"type": "ApplicationModelFactory",
"var_name": "applicationModelFactory"
},
{
"declarator": "bonita... | {
"body": "public void route(final HttpServletRequest hsRequest, final HttpServletResponse hsResponse, final APISession session, final PageRenderer pageRenderer,\n final ResourceRenderer resourceRenderer, final BonitaHomeFolderAccessor bonitaHomeFolderAccessor)\n throws CreationException, Bonita... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_584 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "processConnectorDatastore",
"modifier": "private",
... | {
"body": "@Test\n public void testConvertEngineToConsoleItem() throws Exception {\n final ConnectorImplementationDescriptor descriptor = new ConnectorImplementationDescriptor(\"implementationClassName\",\n \"name\", \"version\", \"definitionId\", \"definitionVersion\", EMPTY_LIST);\n ... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/bpm/process/ProcessConnectorDatastore.java",
"identifier": "ProcessConnectorDatastore",
"interfaces": "implements\n DatastoreHasGet<ProcessConnectorItem>,\n DatastoreHasSearch<ProcessConnectorItem>",
"methods"... | {
"body": "@Override\n protected ProcessConnectorItem convertEngineToConsoleItem(final ConnectorImplementationDescriptor item) {\n\n final ProcessConnectorItem result = new ProcessConnectorItem();\n result.setName(item.getDefinitionId());\n result.setVersion(item.getDefinitionVersion());\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_838 | {
"fields": [
{
"declarator": "caller",
"modifier": "@Mock(answer = Answers.RETURNS_MOCKS)\n private",
"original_string": "@Mock(answer = Answers.RETURNS_MOCKS)\n private APIServletCall caller;",
"type": "APIServletCall",
"var_name": "caller"
},
{
"declarator": "h... | {
"body": "@Test\n public void delete_should_delete_all_items_with_id_passed_through() throws Exception {\n ArgumentCaptor<Long> argument = ArgumentCaptor.forClass(Long.class);\n\n api.delete(Arrays.asList(\n APIID.makeAPIID(1L),\n APIID.makeAPIID(2L)));\n verify(... | {
"fields": [
{
"declarator": "FIX_ORDER = \"Fix order\"",
"modifier": "public static final",
"original_string": "public static final String FIX_ORDER = \"Fix order\";",
"type": "String",
"var_name": "FIX_ORDER"
},
{
"declarator": "converter = new CustomUserInfoConverte... | {
"body": "public void delete(final List<APIID> ids) {\n for (APIID id : ids) {\n engineClientCreator.create(getEngineSession()).deleteDefinition(id.toLong());\n }\n }",
"class_method_signature": "APICustomUserInfoDefinition.delete(final List<APIID> ids)",
"constructor": false,
"full... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_459 | {
"fields": [
{
"declarator": "converter = new ApplicationSearchDescriptorConverter()",
"modifier": "private final",
"original_string": "private final ApplicationSearchDescriptorConverter converter = new ApplicationSearchDescriptorConverter();",
"type": "ApplicationSearchDescriptorConverte... | {
"body": "@Test\n public void should_return_ApplicationSearchDescriptor_state_on_convert_attribute_state() throws Exception {\n //when\n final String value = converter.convert(ApplicationItem.ATTRIBUTE_STATE);\n\n //then\n assertThat(value).isEqualTo(ApplicationSearchDescriptor.STATE);... | {
"fields": [
{
"declarator": "mapping",
"modifier": "private final",
"original_string": "private final Map<String, String> mapping;",
"type": "Map<String, String>",
"var_name": "mapping"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/application/... | {
"body": "@Override\n public String convert(final String attribute) {\n return MapUtil.getMandatory(mapping, attribute);\n }",
"class_method_signature": "ApplicationSearchDescriptorConverter.convert(final String attribute)",
"constructor": false,
"full_signature": "@Override public String convert(... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_320 | {
"fields": [
{
"declarator": "applicationAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ApplicationAPI applicationAPI;",
"type": "ApplicationAPI",
"var_name": "applicationAPI"
},
{
"declarator": "tenantFolder",
"modifier": "@Mock\n... | {
"body": "@Test\n public void should_importFileContent_return_ImportStatusMessages() throws Exception {\n final ArrayList<ImportStatus> statusList = new ArrayList<ImportStatus>();\n statusList.add(new ImportStatus(\"status\"));\n doReturn(statusList).when(applicationAPI).importApplications(ne... | {
"fields": [
{
"declarator": "TOKEN = \"/application/import\"",
"modifier": "public final static",
"original_string": "public final static String TOKEN = \"/application/import\";",
"type": "String",
"var_name": "TOKEN"
},
{
"declarator": "FILE_UPLOAD = \"applicationsDa... | {
"body": "@Override\n public ImportStatusMessages importFileContent(final byte[] fileContent, final String importPolicyAsString) throws ExecutionException, ImportException, AlreadyExistsException, InvalidSessionException, BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {\n final Appl... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_770 | {
"fields": [
{
"declarator": "attributeChecker",
"modifier": "private",
"original_string": "private APICaseVariableAttributeChecker attributeChecker;",
"type": "APICaseVariableAttributeChecker",
"var_name": "attributeChecker"
}
],
"file": "server/src/test/java/org/bonitasoft... | {
"body": "@Test(expected = APIException.class)\n public void should_throw_exception_when_filters_are_null() throws Exception {\n attributeChecker.checkSearchFilters(null);\n }",
"class_method_signature": "APICaseVariableAttributeCheckerTest.should_throw_exception_when_filters_are_null()",
"construct... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/cases/APICaseVariableAttributeChecker.java",
"identifier": "APICaseVariableAttributeChecker",
"interfaces": "",
"methods": [
{
"class_method_signature": "APICaseVariableAttributeChecker.checkUpdateAttributes(Map<Str... | {
"body": "public void checkSearchFilters(Map<String, String> filters) {\n if (filters == null || !filters.containsKey(CaseVariableItem.ATTRIBUTE_CASE_ID)) {\n throw new APIException(format(\"Filter '%s' must be specified\", CaseVariableItem.ATTRIBUTE_CASE_ID));\n }\n }",
"class_method_s... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_265 | {
"fields": [
{
"declarator": "PAGE_ID = 42L",
"modifier": "public static final",
"original_string": "public static final long PAGE_ID = 42L;",
"type": "long",
"var_name": "PAGE_ID"
},
{
"declarator": "pageRenderer",
"modifier": "@Mock",
"original_string": "... | {
"body": "@Test\n public void should_forward_when_API_call() throws Exception {\n when(hsRequest.getPathInfo()).thenReturn(\"/process/processName/processVersion/API/bpm/process/1\");\n\n pageServlet.service(hsRequest, hsResponse);\n\n verify(hsRequest, times(1)).getRequestDispatcher(\"/API/bp... | {
"fields": [
{
"declarator": "serialVersionUID = 2789496969243916444L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 2789496969243916444L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOGGE... | {
"body": "@Override\n protected void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {\n final String pathInfo = request.getPathInfo();\n\n if (!pathInfo.contains(RESOURCE_PATH_SEPARATOR + \"/\") && pathInfo.indexOf(API_PATH_SEPARATO... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_635 | {
"fields": [
{
"declarator": "TENANT_ID = 1L",
"modifier": "public static final",
"original_string": "public static final long TENANT_ID = 1L;",
"type": "long",
"var_name": "TENANT_ID"
},
{
"declarator": "PAGE_ID = 123l",
"modifier": "public static final",
... | {
"body": "@Test\n public void should_ConvertEngineToConsoleItem_return_a_page_item_when_page_is_given() {\n //when\n final PageItem testPageItem = pageDatastore.convertEngineToConsoleItem(mockedPage);\n //then\n assertThat(testPageItem).isNotNull();\n }",
"class_method_signature":... | {
"fields": [
{
"declarator": "UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\"",
"modifier": "public static final",
"original_string": "public static final String UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\";",
"type": "String",
"var_name": "UNMAPPED_ATTRIBUTE_ZIP_FILE"
},
{
"de... | {
"body": "@Override\n protected PageItem convertEngineToConsoleItem(final Page item) {\n if (item != null) {\n return new PageItemConverter().convert(item);\n }\n return null;\n }",
"class_method_signature": "PageDatastore.convertEngineToConsoleItem(final Page item)",
"const... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_818 | {
"fields": [
{
"declarator": "apiProcess",
"modifier": "private",
"original_string": "private APIProcess apiProcess;",
"type": "APIProcess",
"var_name": "apiProcess"
},
{
"declarator": "caller",
"modifier": "@Mock\n private",
"original_string": "@Mock\n ... | {
"body": "@Test\n public final void fillCounters_should_do_nothing_when_counter_of_open_cases_is_not_active() {\n // Given\n final ProcessItem item = mock(ProcessItem.class);\n final List<String> counters = new ArrayList<>();\n\n // When\n apiProcess.fillCounters(item, counters)... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/process/APIProcess.java",
"identifier": "APIProcess",
"interfaces": "implements\n APIHasAdd<ProcessItem>,\n APIHasUpdate<ProcessItem>,\n APIHasGet<ProcessItem>,\n APIHasSearch<ProcessItem>,\n ... | {
"body": "@Override\n protected void fillCounters(final ProcessItem item, final List<String> counters) {\n fillNumberOfFailedCasesIfFailedCounterExists(item, counters);\n fillNumberOfOpenCasesIfOpenCounterExists(item, counters);\n }",
"class_method_signature": "APIProcess.fillCounters(final Pro... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_727 | {
"fields": [
{
"declarator": "API_EXTENSION_POST_MAPPING_KEY = \"apiExtension|POST|myPostResource\"",
"modifier": "public static final",
"original_string": "public static final String API_EXTENSION_POST_MAPPING_KEY = \"apiExtension|POST|myPostResource\";",
"type": "String",
"var_nam... | {
"body": "@Test\n public void should_resolve_class_file_name_when_name_begins_the_same_than_another() throws Exception {\n // two api extensions with names that begins the same are installed (myPostResource and myPostResourceB)\n // see https://bonitasoft.atlassian.net/browse/BS-16791\n final... | {
"fields": [
{
"declarator": "MAPPING_KEY_SEPARATOR = \"|\"",
"modifier": "public static final",
"original_string": "public static final String MAPPING_KEY_SEPARATOR = \"|\";",
"type": "String",
"var_name": "MAPPING_KEY_SEPARATOR"
},
{
"declarator": "MAPPING_KEY_PREFIX... | {
"body": "public File resolveRestApiControllerFile(PageResourceProviderImpl pageResourceProvider) throws NotFoundException {\n final Properties properties = new Properties();\n\n try (final InputStream resourceAsStream = pageResourceProvider.getResourceAsStream(\"page.properties\");) {\n pro... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_377 | {
"fields": [
{
"declarator": "hsRequest = new MockHttpServletRequest()",
"modifier": "",
"original_string": "MockHttpServletRequest hsRequest = new MockHttpServletRequest();",
"type": "MockHttpServletRequest",
"var_name": "hsRequest"
},
{
"declarator": "hsResponse = ne... | {
"body": "@Test\n public void getResource_should_call_the_resource_renderer() throws Exception {\n hsRequest.setPathInfo(\"/AppToken/htmlexample/content/css/file.css\");\n final File pageDir = new File(\"/pageDir\");\n given(resourceRenderer.getPathSegments(\"/AppToken/htmlexample/content/css... | {
"fields": [
{
"declarator": "RESOURCE_PATH_SEPARATOR = \"/content\"",
"modifier": "public static final",
"original_string": "public static final String RESOURCE_PATH_SEPARATOR = \"/content\";",
"type": "String",
"var_name": "RESOURCE_PATH_SEPARATOR"
},
{
"declarator":... | {
"body": "@Override\n protected void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {\n final String pathInfo = request.getPathInfo();\n final List<String> pathSegments = resourceRenderer.getPathSegments(pathInfo);\n if (isVa... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_398 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private FinderFactory factory;",
"type": "FinderFactory",
"var_name": "factory"
},
{
"declarator": "processAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n... | {
"body": "@Test\n public void should_return_FormMappingResource_for_FormMappingResourceFinder() {\n final FormMappingResourceFinder formMappingResourceFinder = spy(new FormMappingResourceFinder());\n doReturn(processAPI).when(formMappingResourceFinder).getProcessAPI(any(Request.class));\n fin... | {
"fields": [
{
"declarator": "finders",
"modifier": "protected",
"original_string": "protected Map<Class<? extends ServerResource>, ResourceFinder> finders;",
"type": "Map<Class<? extends ServerResource>, ResourceFinder>",
"var_name": "finders"
},
{
"declarator": "reso... | {
"body": "public Finder create(final Class<? extends ServerResource> clazz) {\n final Finder finder = finders.get(clazz);\n if (finder == null) {\n throw new RuntimeException(\"Finder unimplemented for class \" + clazz);\n }\n return finder;\n }",
"class_method_signature":... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_662 | {
"fields": [
{
"declarator": "engine",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private IdentityAPI engine;",
"type": "IdentityAPI",
"var_name": "engine"
},
{
"declarator": "client",
"modifier": "@InjectMocks\n private",
"original... | {
"body": "@Test(expected = APIException.class)\n public void should_fail_to_delete_a_given_definition_when_engine_throw_an_exception() throws Exception {\n willThrow(new DeletionException(\"failure\")).given(engine)\n .deleteCustomUserInfoDefinition(1L);\n\n client.deleteDefinition(1L... | {
"fields": [
{
"declarator": "identity",
"modifier": "private",
"original_string": "private IdentityAPI identity;",
"type": "IdentityAPI",
"var_name": "identity"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/engineclient/CustomUserInfoEngineClient.java",
... | {
"body": "public void deleteDefinition(long id) {\n try {\n identity.deleteCustomUserInfoDefinition(id);\n } catch (DeletionException e) {\n throw new APIException(new _(\"An error occurred while deleting an item with the id %id%\", new Arg(\"id\", id)), e);\n }\n }",
... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_232 | {
"fields": [
{
"declarator": "DATE_01_01_1970_13H_AS_LONG_GMT = 46800000L",
"modifier": "public static final",
"original_string": "public static final long DATE_01_01_1970_13H_AS_LONG_GMT = 46800000L;",
"type": "long",
"var_name": "DATE_01_01_1970_13H_AS_LONG_GMT"
},
{
... | {
"body": "@Test\n public void getProcessedInputs_with_simple_input_should_return_processed_input() throws Exception {\n final List<InputDefinition> inputDefinition = generateSimpleInputDefinition(true);\n when(contractDefinition.getInputs()).thenReturn(inputDefinition);\n final String tempFil... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContractTypeConverter.class.getName())",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = Logger.getLogger(ContractTypeConverter.class.getName());",
"type": "Logger",
"var_name": ... | {
"body": "public Map<String, Serializable> getProcessedInput(final ContractDefinition processContract, final Map<String, Serializable> inputs,\n final long maxSizeForTenant, final long tenantId) throws FileNotFoundException {\n this.maxSizeForTenant = maxSizeForTenant;\n this.tenantId = tena... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_418 | {
"fields": [
{
"declarator": "engineSession",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private APISession engineSession;",
"type": "APISession",
"var_name": "engineSession"
},
{
"declarator": "commonDatastore",
"modifier": "@InjectMocks\n ... | {
"body": "@Test\n public void addLongFilterToSearchBuilder_should_add_equals_filter_when_is_applicable() {\n // given:\n final String filterName = \"someFilterKey\";\n final String engineAttributeName = \"EngineNumericKey\";\n final String filterValue = \"174\";\n final Map<Stri... | {
"fields": [
{
"declarator": "engineSession",
"modifier": "private",
"original_string": "private APISession engineSession;",
"type": "APISession",
"var_name": "engineSession"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/CommonDatastore.java",
... | {
"body": "protected void addLongFilterToSearchBuilder(final Map<String, String> filters, final SearchOptionsBuilder builder, final String filterName,\n final String engineAttributeName) {\n if (filters != null && filters.containsKey(filterName)) {\n final String filterValue = filters.get... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_361 | {
"fields": [
{
"declarator": "LAYOUT_PAGE_NAME = \"layoutPageName\"",
"modifier": "public static final",
"original_string": "public static final String LAYOUT_PAGE_NAME = \"layoutPageName\";",
"type": "String",
"var_name": "LAYOUT_PAGE_NAME"
},
{
"declarator": "hsReque... | {
"body": "@Test\n public void should_not_forward_to_the_application_page_template_when_the_page_is_not_in_the_application() throws Exception {\n accessUnknownPage(\"HumanResources\", \"leavingRequests\");\n\n applicationRouter.route(hsRequest, hsResponse, apiSession, pageRenderer, resourceRenderer, ... | {
"fields": [
{
"declarator": "applicationModelFactory",
"modifier": "private final",
"original_string": "private final ApplicationModelFactory applicationModelFactory;",
"type": "ApplicationModelFactory",
"var_name": "applicationModelFactory"
},
{
"declarator": "bonita... | {
"body": "public void route(final HttpServletRequest hsRequest, final HttpServletResponse hsResponse, final APISession session, final PageRenderer pageRenderer,\n final ResourceRenderer resourceRenderer, final BonitaHomeFolderAccessor bonitaHomeFolderAccessor)\n throws CreationException, Bonita... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_731 | {
"fields": [
{
"declarator": "API_EXTENSION_POST_MAPPING_KEY = \"apiExtension|POST|myPostResource\"",
"modifier": "public static final",
"original_string": "public static final String API_EXTENSION_POST_MAPPING_KEY = \"apiExtension|POST|myPostResource\";",
"type": "String",
"var_nam... | {
"body": "@Test\n public void should_resolve_pageId_with_parameters() throws Exception {\n //given\n final Request request = new Request(Method.GET, \"/bonita/API/extension/helloWorld?param1=a¶m2=b\");\n doReturn(pageReference).when(pageMappingService).getPage(httpServletRequest, apiSessi... | {
"fields": [
{
"declarator": "MAPPING_KEY_SEPARATOR = \"|\"",
"modifier": "public static final",
"original_string": "public static final String MAPPING_KEY_SEPARATOR = \"|\";",
"type": "String",
"var_name": "MAPPING_KEY_SEPARATOR"
},
{
"declarator": "MAPPING_KEY_PREFIX... | {
"body": "public Long resolvePageId(APISession apiSession) throws BonitaException {\n final HttpServletRequest httpServletRequest = getHttpServletRequest();\n final PageReference pageReference;\n pageReference = pageMappingService.getPage(httpServletRequest, apiSession, generateMappingKey(), htt... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_224 | {
"fields": [
{
"declarator": "urlBuilder",
"modifier": "",
"original_string": "UrlBuilder urlBuilder;",
"type": "UrlBuilder",
"var_name": "urlBuilder"
},
{
"declarator": "specialULRCharacters = \"!'();:@&=+$,/?# \"",
"modifier": "private final static",
"ori... | {
"body": "@Test\n public void should_leave_path_unchanged() throws Exception {\n urlBuilder = new UrlBuilder(\"http://localhost:8080/bonita+soft?param=value\");\n\n assertThat(urlBuilder.build()).isEqualTo(\"http://localhost:8080/bonita+soft?param=value\");\n }",
"class_method_signature": "UrlB... | {
"fields": [
{
"declarator": "uriBuilder",
"modifier": "private final",
"original_string": "private final URIBuilder uriBuilder;",
"type": "URIBuilder",
"var_name": "uriBuilder"
},
{
"declarator": "parameters = new LinkedList<>()",
"modifier": "private",
"o... | {
"body": "public String build() {\n if (!parameters.isEmpty()) {\n uriBuilder.setParameters(parameters);\n }\n return uriBuilder.toString();\n }",
"class_method_signature": "UrlBuilder.build()",
"constructor": false,
"full_signature": "public String build()",
"identifier": ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_674 | {
"fields": [
{
"declarator": "groupAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private GroupAPI groupAPI;",
"type": "GroupAPI",
"var_name": "groupAPI"
},
{
"declarator": "groupEngineClient",
"modifier": "private",
"original_string... | {
"body": "@Test(expected = APIException.class)\n public void update_throw_APIException_if_an_exception_occurs_when_updating_with_name_alreayExist() throws Exception {\n when(groupAPI.updateGroup(eq(1L), any(GroupUpdater.class))).thenThrow(new AlreadyExistsException(\"\"));\n\n groupEngineClient.upda... | {
"fields": [
{
"declarator": "groupAPI",
"modifier": "private",
"original_string": "private GroupAPI groupAPI;",
"type": "GroupAPI",
"var_name": "groupAPI"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/engineclient/GroupEngineClient.java",
"identifier":... | {
"body": "public Group update(long groupId, GroupUpdater groupUpdater) {\n try {\n return groupAPI.updateGroup(groupId, groupUpdater);\n } catch (GroupNotFoundException e) {\n throw new APIException(new _(\"Can't update group. Group not found\"));\n } catch (UpdateException... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_859 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/json/JSonSimpleDeserializerTest.java",
"identifier": "JSonSimpleDeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSimpleObject() {\n final AbstractTreeNode<String> tree = JSonSimpleDeserializer.unserializeTree(\"{\\\"name\\\":\\\"toto\\\",\\\"path\\\":\\\"titi\\\"}\");\n\n if (!(tree instanceof TreeIndexed<?>)) {\n fail(\"Fail to parse a simple object in JSON\");\n ... | {
"fields": [
{
"declarator": "INSTANCE = null",
"modifier": "private static",
"original_string": "private static JSonSimpleDeserializer INSTANCE = null;",
"type": "JSonSimpleDeserializer",
"var_name": "INSTANCE"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/serv... | {
"body": "public static AbstractTreeNode<String> unserializeTree(final String json) {\n\n return getInstance()._unserializeTree(json);\n }",
"class_method_signature": "JSonSimpleDeserializer.unserializeTree(final String json)",
"constructor": false,
"full_signature": "public static AbstractTreeNode<S... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_766 | {
"fields": [
{
"declarator": "attributeChecker",
"modifier": "private",
"original_string": "private APICaseVariableAttributeChecker attributeChecker;",
"type": "APICaseVariableAttributeChecker",
"var_name": "attributeChecker"
}
],
"file": "server/src/test/java/org/bonitasoft... | {
"body": "@Test(expected = APIException.class)\n public void checkUpdateAttributesCheckForAttributeType() throws Exception {\n Map<String, String> attributes = buildSuitableUpdateAttributes();\n attributes.remove(CaseVariableItem.ATTRIBUTE_TYPE);\n\n attributeChecker.checkUpdateAttributes(att... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/cases/APICaseVariableAttributeChecker.java",
"identifier": "APICaseVariableAttributeChecker",
"interfaces": "",
"methods": [
{
"class_method_signature": "APICaseVariableAttributeChecker.checkUpdateAttributes(Map<Str... | {
"body": "public void checkUpdateAttributes(Map<String, String> attributes) {\n if (attributes == null || attributes.isEmpty()) {\n throw new APIException(format(\"Attributes '%s' and '%s' must be specified\", CaseVariableItem.ATTRIBUTE_TYPE, CaseVariableItem.ATTRIBUTE_VALUE));\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_336 | {
"fields": [
{
"declarator": "collector = new RootMenuCollector()",
"modifier": "",
"original_string": "RootMenuCollector collector = new RootMenuCollector();",
"type": "RootMenuCollector",
"var_name": "collector"
},
{
"declarator": "menu = new ApplicationMenuImpl(\"na... | {
"body": "@Test\n public void should_not_be_collectible_when_the_menu_has_a_parentId() {\n menu.setParentId(3L);\n\n assertThat(collector.isCollectible(menu)).isFalse();\n }",
"class_method_signature": "RootMenuCollectorTest.should_not_be_collectible_when_the_menu_has_a_parentId()",
"construc... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/livingapps/menu/RootMenuCollector.java",
"identifier": "RootMenuCollector",
"interfaces": "implements Collector",
"methods": [
{
"class_method_signature": "RootMenuCollector.isCollectible(final ApplicationMenu menu)",
"constructor": ... | {
"body": "@Override\n public boolean isCollectible(final ApplicationMenu menu) {\n return menu.getParentId() == null;\n }",
"class_method_signature": "RootMenuCollector.isCollectible(final ApplicationMenu menu)",
"constructor": false,
"full_signature": "@Override public boolean isCollectible(final... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_623 | {
"fields": [
{
"declarator": "TENANT_ID = 1L",
"modifier": "public static final",
"original_string": "public static final long TENANT_ID = 1L;",
"type": "long",
"var_name": "TENANT_ID"
},
{
"declarator": "PAGE_ID = 123l",
"modifier": "public static final",
... | {
"body": "@Test(expected = APIForbiddenException.class)\n public void it_throws_an_exception_adding_page_with_unauthorized_path() throws IOException {\n // Given\n pageToBeAdded.setAttribute(PageDatastore.UNMAPPED_ATTRIBUTE_ZIP_FILE, \"unauthorized_page.zip\");\n\n doThrow(new UnauthorizedFol... | {
"fields": [
{
"declarator": "UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\"",
"modifier": "public static final",
"original_string": "public static final String UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\";",
"type": "String",
"var_name": "UNMAPPED_ATTRIBUTE_ZIP_FILE"
},
{
"de... | {
"body": "@Override\n public PageItem add(final PageItem pageItem) {\n final String zipFileAttribute = pageItem.getAttributeValue(UNMAPPED_ATTRIBUTE_ZIP_FILE);\n final String[] filenames = zipFileAttribute.split(FileUploadServlet.RESPONSE_SEPARATOR);\n final String filename = filenames[0];\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_789 | {
"fields": [
{
"declarator": "userDatastore",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private UserDatastore userDatastore;",
"type": "UserDatastore",
"var_name": "userDatastore"
},
{
"declarator": "processDatastore",
"modifier": "@Mock\n ... | {
"body": "@Test\n public final void fillCounters_should_do_nothing_when_counter_of_failed_flow_nodes_is_not_active() {\n // Given\n final CaseItem item = mock(CaseItem.class);\n final List<String> counters = new ArrayList<String>();\n\n // When\n apiCase.fillCounters(item, count... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/cases/APICase.java",
"identifier": "APICase",
"interfaces": "implements APIHasGet<CaseItem>, APIHasAdd<CaseItem>, APIHasSearch<CaseItem>, APIHasDelete",
"methods": [
{
"class_method_signature": "APICase.defineItemDe... | {
"body": "@Override\n protected void fillCounters(final CaseItem item, final List<String> counters) {\n fillNumberOfFailedFlowNodesIfFailedCounterExists(item, counters);\n fillNumberOfPendingFlowNodesIfActiveCounterExists(item, counters);\n }",
"class_method_signature": "APICase.fillCounters(fi... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_273 | {
"fields": [
{
"declarator": "PAGE_NAME = \"pageName\"",
"modifier": "public static final",
"original_string": "public static final String PAGE_NAME = \"pageName\";",
"type": "String",
"var_name": "PAGE_NAME"
},
{
"declarator": "PROCESS_DEFINITION_ID = 123L",
"mo... | {
"body": "@Test\n public void should_getPage_by_id() throws Exception {\n // when\n pageResourceProviderWithProcessDefinition.getPage(pageApi);\n\n //then\n verify(pageApi,never()).getPageByName(anyString());\n verify(pageApi).getPage(PAGE_ID);\n\n }",
"class_method_signatu... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(PageResourceProviderImpl.class.getName())",
"modifier": "private static",
"original_string": "private static Logger LOGGER = Logger.getLogger(PageResourceProviderImpl.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "@Override\n public Page getPage(final PageAPI pageAPI) throws PageNotFoundException {\n if (pageId != null) {\n return pageAPI.getPage(pageId);\n }\n return pageAPI.getPageByName(getPageName());\n }",
"class_method_signature": "PageResourceProviderImpl.getPage(final ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_20 | {
"fields": [],
"file": "forms/forms-server/src/test/java/org/bonitasoft/forms/server/api/impl/util/WidgetExpressionEntryTest.java",
"identifier": "WidgetExpressionEntryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTwoWidgetExpressionEntryEqualAREEquals() {\n WidgetExpressionEntry widget1 =\n new WidgetExpressionEntry(\"widgetId\", ExpressionId.WIDGET_DISPLAY_CONDITION);\n WidgetExpressionEntry widget2 =\n new WidgetExpressionEntry(\"widgetId\", E... | {
"fields": [
{
"declarator": "EXPRESSION_KEY_SEPARATOR = \":\"",
"modifier": "private static final",
"original_string": "private static final String EXPRESSION_KEY_SEPARATOR = \":\";",
"type": "String",
"var_name": "EXPRESSION_KEY_SEPARATOR"
},
{
"declarator": "entry",... | {
"body": "@Override\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n WidgetExpressionEntry other = (Wi... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_434 | {
"fields": [
{
"declarator": "applicationAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ApplicationAPI applicationAPI;",
"type": "ApplicationAPI",
"var_name": "applicationAPI"
},
{
"declarator": "pageAPI",
"modifier": "@Mock\n p... | {
"body": "@Test(expected = APIException.class)\n public void should_throw_APIException_when_ApplicationAPI_throws_an_exception_on_add() throws Exception {\n //given\n given(applicationAPI.createApplication(any(ApplicationCreator.class))).willThrow(new CreationException(\"\"));\n\n //when\n ... | {
"fields": [
{
"declarator": "applicationAPI",
"modifier": "private final",
"original_string": "private final ApplicationAPI applicationAPI;",
"type": "ApplicationAPI",
"var_name": "applicationAPI"
},
{
"declarator": "converter",
"modifier": "private final",
... | {
"body": "@Override\n public ApplicationItem add(final ApplicationItem item) {\n\n try {\n final Page homePageDef = pageAPI.getPageByName(CUSTOMPAGE_HOME);\n\n final ApplicationCreator creator = converter.toApplicationCreator(item);\n\n final Application application = appli... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_121 | {
"fields": [
{
"declarator": "processFormService",
"modifier": "@Spy",
"original_string": "@Spy\n ProcessFormService processFormService;",
"type": "ProcessFormService",
"var_name": "processFormService"
},
{
"declarator": "processAPI",
"modifier": "@Mock",
... | {
"body": "@Test\n public void isAllowedToStartProcess_should_return_false_if_process_not_enabled() throws Exception {\n final ProcessDeploymentInfo processDeploymentInfo = mock(ProcessDeploymentInfo.class);\n when(processDeploymentInfo.getActivationState()).thenReturn(ActivationState.DISABLED);\n ... | {
"fields": [
{
"declarator": "PROCESS_DEPLOY = \"process_deploy\"",
"modifier": "protected static final",
"original_string": "protected static final String PROCESS_DEPLOY = \"process_deploy\";",
"type": "String",
"var_name": "PROCESS_DEPLOY"
},
{
"declarator": "LOGGER ... | {
"body": "public boolean isAllowedToStartProcess(final APISession apiSession, final long processDefinitionId, final long enforcedUserId) throws BonitaException {\n if (ActivationState.ENABLED.equals(getProcessAPI(apiSession).getProcessDeploymentInfo(processDefinitionId).getActivationState())) {\n f... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_571 | {
"fields": [
{
"declarator": "spiedDatastore = new ConnectorInstanceDatastore(null)",
"modifier": "@Spy\n private final",
"original_string": "@Spy\n private final ConnectorInstanceDatastore spiedDatastore = new ConnectorInstanceDatastore(null);",
"type": "ConnectorInstanceDatastore"... | {
"body": "@Test\n public void searchBuildRightParameters() throws Exception {\n final Map<String, String> filters = new HashMap<String, String>();\n filters.put(ConnectorInstanceItem.ATTRIBUTE_CONTAINER_ID, \"1\");\n filters.put(ConnectorInstanceItem.ATTRIBUTE_STATE, \"2\");\n\n final ... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/bpm/connector/ConnectorInstanceDatastore.java",
"identifier": "ConnectorInstanceDatastore",
"interfaces": "implements DatastoreHasSearch<ConnectorInstanceItem>",
"methods": [
{
"class_method_signature": "Connector... | {
"body": "protected SearchOptions buildSearchOptions(final int page, final int resultsByPage, final String search, final String orders,\n final Map<String, String> filters) {\n final SearchOptionsBuilder builder = SearchOptionsBuilderUtil.buildSearchOptions(page, resultsByPage, orders, search);\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_822 | {
"fields": [
{
"declarator": "datastore",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ProcessConnectorDependencyDatastore datastore;",
"type": "ProcessConnectorDependencyDatastore",
"var_name": "datastore"
},
{
"declarator": "apiProcessConn... | {
"body": "@Test(expected = APIFilterMandatoryException.class)\n public void checkProcessIdIsMandatory() throws Exception {\n Map<String, String> filters = buildFilters(null, \"aConnectorName\", \"aConnectorVersion\");\n\n apiProcessConnectorDependency.checkMandatoryAttributes(filters);\n }",
"c... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/process/APIProcessConnectorDependency.java",
"identifier": "APIProcessConnectorDependency",
"interfaces": "implements\n APIHasSearch<ProcessConnectorDependencyItem>",
"methods": [
{
"class_method_signature": ... | {
"body": "protected void checkMandatoryAttributes(final Map<String, String> filters) {\n if (MapUtil.isBlank(filters, ATTRIBUTE_PROCESS_ID)) {\n throw new APIFilterMandatoryException(ATTRIBUTE_PROCESS_ID);\n }\n if (MapUtil.isBlank(filters, ATTRIBUTE_CONNECTOR_NAME)) {\n th... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_658 | {
"fields": [
{
"declarator": "BUNCH_SIZE = 10",
"modifier": "private static",
"original_string": "private static Integer BUNCH_SIZE = 10;",
"type": "Integer",
"var_name": "BUNCH_SIZE"
},
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": ... | {
"body": "@Test\n public void deploying_a_process_with_v6_forms_fails_with_the_right_message()\n throws AlreadyExistsException, ProcessDeployException {\n\n DesignProcessDefinitionImpl designProcessDefinition = new DesignProcessDefinitionImpl(\"processName\", \"1.0\");\n BusinessArchive b... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ProcessEngineClient.class.getName())",
"modifier": "private static",
"original_string": "private static Logger LOGGER = Logger.getLogger(ProcessEngineClient.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
... | {
"body": "public ProcessDefinition deploy(final BusinessArchive businessArchive) {\n try {\n return getProcessApi().deploy(businessArchive);\n } catch (final AlreadyExistsException e) {\n final DesignProcessDefinition processDefinition = businessArchive.getProcessDefinition();\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_208 | {
"fields": [
{
"declarator": "ICON_ID = 1238970432L",
"modifier": "private static final",
"original_string": "private static final long ICON_ID = 1238970432L;",
"type": "long",
"var_name": "ICON_ID"
},
{
"declarator": "iconServlet",
"modifier": "@Spy\n private... | {
"body": "@Test\n public void should_status_be_BAD_REQUEST_when_null_is_set_as_id_in_url() throws Exception {\n iconServlet.doGet(httpServletRequest, httpServletResponse);\n\n assertThat(httpServletResponse.getStatus()).isEqualTo(HttpServletResponse.SC_BAD_REQUEST);\n }",
"class_method_signatur... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOGGER = Logger.getLogger(IconServlet.cla... | {
"body": "@Override\n protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException {\n String iconIdPath = request.getPathInfo();\n if (iconIdPath == null || iconIdPath.isEmpty()) {\n response.setStatus(HttpServletResponse.SC_BAD_REQUE... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_199 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/console/common/server/login/utils/RedirectUrlBuilderTest.java",
"identifier": "RedirectUrlBuilderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPostParamsAreNotAddedToTheUrl() {\n final Map<String, String[]> parameters = new HashMap<String, String[]>();\n parameters.put(\"postParam\", someValues(\"true\"));\n\n final RedirectUrlBuilder redirectUrlBuilder = new RedirectUrlBuilder(\"myredirecturl?somep... | {
"fields": [
{
"declarator": "urlBuilder",
"modifier": "private final",
"original_string": "private final UrlBuilder urlBuilder;",
"type": "UrlBuilder",
"var_name": "urlBuilder"
},
{
"declarator": "blackList = Arrays.asList(\n AuthenticationManager.REDIRECT_... | {
"body": "public RedirectUrl build() {\n return new RedirectUrl(urlBuilder.build());\n\n }",
"class_method_signature": "RedirectUrlBuilder.build()",
"constructor": false,
"full_signature": "public RedirectUrl build()",
"identifier": "build",
"invocations": [
"build"
],
"modifiers": "publi... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_463 | {
"fields": [
{
"declarator": "converter = new ApplicationMenuSearchDescriptorConverter()",
"modifier": "private final",
"original_string": "private final ApplicationMenuSearchDescriptorConverter converter = new ApplicationMenuSearchDescriptorConverter();",
"type": "ApplicationMenuSearchDe... | {
"body": "@Test\n public void should_return_ApplicationMenuSearchDescriptor_display_name_on_convert_attribute_display_name() throws Exception {\n //when\n final String convertedValue = converter.convert(ApplicationMenuItem.ATTRIBUTE_DISPLAY_NAME);\n\n //then\n assertThat(convertedValue... | {
"fields": [
{
"declarator": "mapping",
"modifier": "private final",
"original_string": "private final Map<String, String> mapping;",
"type": "Map<String, String>",
"var_name": "mapping"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/applicationm... | {
"body": "@Override\n public String convert(final String attribute) {\n return MapUtil.getMandatory(mapping, attribute);\n }",
"class_method_signature": "ApplicationMenuSearchDescriptorConverter.convert(final String attribute)",
"constructor": false,
"full_signature": "@Override public String conv... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_77 | {
"fields": [
{
"declarator": "apiSession",
"modifier": "@Mock",
"original_string": "@Mock\n APISession apiSession;",
"type": "APISession",
"var_name": "apiSession"
},
{
"declarator": "processDefinitionID",
"modifier": "@Mock",
"original_string": "@Mock\n... | {
"body": "@Test\n public void setCorrectHierarchicalClassLoaderShouldsetParentClassloaderIfCLIsNull() throws Exception {\n final ClassLoader processClassLoader = null;\n final ClassLoader parentClassLoader = mock(ClassLoader.class);\n final ClassLoader realCL = FormsResourcesUtils.setCorrectH... | {
"fields": [
{
"declarator": "FORMS_DIRECTORY_IN_BAR = \"resources/forms\"",
"modifier": "public final static",
"original_string": "public final static String FORMS_DIRECTORY_IN_BAR = \"resources/forms\";",
"type": "String",
"var_name": "FORMS_DIRECTORY_IN_BAR"
},
{
"d... | {
"body": "protected static ClassLoader setCorrectHierarchicalClassLoader(ClassLoader processClassLoader, final ClassLoader parentClassLoader) {\n if (processClassLoader == null) {\n processClassLoader = parentClassLoader;\n }\n return processClassLoader;\n }",
"class_method_signa... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_875 | {
"fields": [
{
"declarator": "converter",
"modifier": "private",
"original_string": "private DateConverter converter;",
"type": "DateConverter",
"var_name": "converter"
}
],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/utils/converter/typed/DateConv... | {
"body": "@Test\n public void emptyIsConvertedToNull() throws Exception {\n\n Date converted = converter.convert(\"\");\n\n assertNull(converted);\n }",
"class_method_signature": "DateConverterTest.emptyIsConvertedToNull()",
"constructor": false,
"full_signature": "@Test public void emptyIs... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/framework/utils/converter/typed/DateConverter.java",
"identifier": "DateConverter",
"interfaces": "implements Converter<Date>",
"methods": [
{
"class_method_signature": "DateConverter.convert(String toBeConverted)",
"... | {
"body": "@Override\n public Date convert(String toBeConverted) throws ConversionException {\n if (toBeConverted == null || toBeConverted.isEmpty()) {\n return null;\n }\n try {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss z yyyy\", DateForma... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_526 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/utils/SortsTest.java",
"identifier": "SortsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNullSortListing() throws Exception {\n Sorts sorts = new Sorts(null);\n\n List<Sort> sortList = sorts.asList();\n\n Assert.assertTrue(sortList.isEmpty());\n }",
"class_method_signature": "SortsTest.testNullSortListing()",
"constructor": false,
"full_... | {
"fields": [
{
"declarator": "sorts",
"modifier": "private",
"original_string": "private List<Sort> sorts;",
"type": "List<Sort>",
"var_name": "sorts"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/utils/Sorts.java",
"identifier": "Sorts",
"i... | {
"body": "public List<Sort> asList() {\n return sorts;\n }",
"class_method_signature": "Sorts.asList()",
"constructor": false,
"full_signature": "public List<Sort> asList()",
"identifier": "asList",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "List<Sort>",
"sig... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_98 | {
"fields": [
{
"declarator": "customPostMessageEventListener = new CustomPostMessageEventListener()",
"modifier": "@Spy\n private final",
"original_string": "@Spy\n private final CustomPostMessageEventListener customPostMessageEventListener = new CustomPostMessageEventListener();",
... | {
"body": "@Test\n public void onSuccessOrError_should_be_called_with_valid_json() throws Exception {\n final String jsonMessage = \"{\\\"message\\\":\\\"error\\\",\\\"action\\\":\\\"\\\"}\";\n customPostMessageEventListener.setActionToWatch(\"\");\n\n customPostMessageEventListener.onMessageE... | {
"fields": [],
"file": "portal/src/main/java/org/bonitasoft/console/client/user/task/action/PostMessageEventListener.java",
"identifier": "PostMessageEventListener",
"interfaces": "",
"methods": [
{
"class_method_signature": "PostMessageEventListener.onMessageEvent(final String eventData)",
"... | {
"body": "public void onMessageEvent(final String eventData) {\n try {\n final JSONValue root = JSONParser.parseStrict(eventData);\n final JSONObject fullJSONMessage = root.isObject();\n if (isActionWatched(fullJSONMessage)) {\n handleJSONMessage(fullJSONMessage... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_176 | {
"fields": [
{
"declarator": "request",
"modifier": "@Mock",
"original_string": "@Mock\n HttpServletRequest request;",
"type": "HttpServletRequest",
"var_name": "request"
},
{
"declarator": "requestAccessor",
"modifier": "@Mock",
"original_string": "@Moc... | {
"body": "@Test\n public void testGetURLToRedirectToFromAuthenticationManagerLogin() throws Exception {\n doReturn(\"loginURL\").when(authenticationManager).getLoginPageURL(eq(requestAccessor), anyString());\n \n String loginPage = logoutServlet.getURLToRedirectTo(requestAccessor, 1L);\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 739607235407639011L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 739607235407639011L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOGIN_P... | {
"body": "protected String getURLToRedirectTo(final HttpServletRequestAccessor requestAccessor, final long tenantId)\n throws AuthenticationManagerNotFoundException, UnsupportedEncodingException, ConsumerNotFoundException, ServletException {\n final AuthenticationManager authenticationManager = get... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_475 | {
"fields": [
{
"declarator": "session",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private APISession session;",
"type": "APISession",
"var_name": "session"
},
{
"declarator": "applicationAPI",
"modifier": "@Mock\n private",
"origin... | {
"body": "@Test\n public void should_return_result_of_engine_call_converted_to_item_on_add() throws Exception {\n //given\n final ApplicationMenuItem itemToCreate = new ApplicationMenuItem();\n final ApplicationMenuImpl applicationMenu = new ApplicationMenuImpl(\"firstMenu\", 11L, 14L, 1);\n ... | {
"fields": [
{
"declarator": "applicationAPI",
"modifier": "private final",
"original_string": "private final ApplicationAPI applicationAPI;",
"type": "ApplicationAPI",
"var_name": "applicationAPI"
},
{
"declarator": "converter",
"modifier": "private final",
... | {
"body": "@Override\n public ApplicationMenuItem add(final ApplicationMenuItem item) {\n try {\n final ApplicationMenu applicationMenu = applicationAPI.createApplicationMenu(converter.toApplicationMenuCreator(item));\n return converter.toApplicationMenuItem(applicationMenu);\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_160 | {
"fields": [
{
"declarator": "resourcesPermissionsMapping",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ResourcesPermissionsMapping resourcesPermissionsMapping;",
"type": "ResourcesPermissionsMapping",
"var_name": "resourcesPermissionsMapping"
},
... | {
"body": "@Test\n public void checkResourceAuthorizationsSyntax_should_return_true_if_syntax_is_valid() throws Exception {\n final RestAPIAuthorizationFilter restAPIAuthorizationFilterSpy = spy(restAPIAuthorizationFilter);\n final Set<String> resourceAuthorizations = new HashSet<String>(Arrays.asLis... | {
"fields": [
{
"declarator": "SCRIPT_TYPE_AUTHORIZATION_PREFIX = \"check\"",
"modifier": "public static final",
"original_string": "public static final String SCRIPT_TYPE_AUTHORIZATION_PREFIX = \"check\";",
"type": "String",
"var_name": "SCRIPT_TYPE_AUTHORIZATION_PREFIX"
},
... | {
"body": "protected boolean checkResourceAuthorizationsSyntax(final Set<String> resourceAuthorizations) {\n boolean valid = true;\n for (final String resourceAuthorization : resourceAuthorizations) {\n if (!resourceAuthorization.matches(\"(\" + PermissionsBuilder.USER_TYPE_AUTHORIZATION_PREF... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_530 | {
"fields": [
{
"declarator": "jacksonDeserializer",
"modifier": "private",
"original_string": "private JacksonDeserializer jacksonDeserializer;",
"type": "JacksonDeserializer",
"var_name": "jacksonDeserializer"
}
],
"file": "server/src/test/java/org/bonitasoft/web/rest/serve... | {
"body": "@Test(expected = APIException.class)\n public void getSerializableValue_throw_exception_if_class_is_not_in_classpath() throws Exception {\n new VariableMapper(new Variable(), jacksonDeserializer).getSerializableValue(\"a.class.not.in.classpath\");\n }",
"class_method_signature": "VariableMap... | {
"fields": [
{
"declarator": "deserializer",
"modifier": "private",
"original_string": "private JacksonDeserializer deserializer;",
"type": "JacksonDeserializer",
"var_name": "deserializer"
},
{
"declarator": "variable",
"modifier": "private",
"original_str... | {
"body": "public Serializable getSerializableValue(String className) {\n try {\n return (Serializable) deserializer.convertValue(variable.getValue(), Class.forName(className));\n } catch (IllegalArgumentException e) {\n throw new APIException(new _(\"%value% is not a valid value f... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_863 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/json/JSonSimpleDeserializerTest.java",
"identifier": "JSonSimpleDeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOneElementArray() {\n final AbstractTreeNode<String> tree = JSonSimpleDeserializer.unserializeTree(\"[101]\");\n\n if (!(tree instanceof Tree<?>)) {\n fail(\"Fail to parse a simple array in JSON\");\n }\n\n assertEquals(\"[\\\"101\\\"]\", tr... | {
"fields": [
{
"declarator": "INSTANCE = null",
"modifier": "private static",
"original_string": "private static JSonSimpleDeserializer INSTANCE = null;",
"type": "JSonSimpleDeserializer",
"var_name": "INSTANCE"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/serv... | {
"body": "public static AbstractTreeNode<String> unserializeTree(final String json) {\n\n return getInstance()._unserializeTree(json);\n }",
"class_method_signature": "JSonSimpleDeserializer.unserializeTree(final String json)",
"constructor": false,
"full_signature": "public static AbstractTreeNode<S... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_619 | {
"fields": [
{
"declarator": "TENANT_ID = 1L",
"modifier": "public static final",
"original_string": "public static final long TENANT_ID = 1L;",
"type": "long",
"var_name": "TENANT_ID"
},
{
"declarator": "PAGE_ID = 123l",
"modifier": "public static final",
... | {
"body": "@Test\n public void should_add_a_api_extension_add_related_permission() throws Exception {\n // given\n when(pageAPI.createPage(any(String.class), any(byte[].class))).thenReturn(mockedApiExtension);\n doReturn(pageResourceProvider).when(customPageService).getPageResourceProvider(eq(... | {
"fields": [
{
"declarator": "UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\"",
"modifier": "public static final",
"original_string": "public static final String UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\";",
"type": "String",
"var_name": "UNMAPPED_ATTRIBUTE_ZIP_FILE"
},
{
"de... | {
"body": "@Override\n public PageItem add(final PageItem pageItem) {\n final String zipFileAttribute = pageItem.getAttributeValue(UNMAPPED_ATTRIBUTE_ZIP_FILE);\n final String[] filenames = zipFileAttribute.split(FileUploadServlet.RESPONSE_SEPARATOR);\n final String filename = filenames[0];\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_249 | {
"fields": [
{
"declarator": "DATE_01_01_1970_13H_AS_LONG_GMT = 46800000L",
"modifier": "public static final",
"original_string": "public static final long DATE_01_01_1970_13H_AS_LONG_GMT = 46800000L;",
"type": "long",
"var_name": "DATE_01_01_1970_13H_AS_LONG_GMT"
},
{
... | {
"body": "@Test\n public void convertToType_should_convert_a_String_without_seconds_into_a_LocalDateTime_objects() {\n ContractTypeConverter converter = new ContractTypeConverter(ISO_8601_DATE_PATTERNS);\n\n final Object localDateTimeString = converter.convertToType(Type.LOCALDATETIME, \"1987-10-11T... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContractTypeConverter.class.getName())",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = Logger.getLogger(ContractTypeConverter.class.getName());",
"type": "Logger",
"var_name": ... | {
"body": "Object convertToType(final Type type, final Serializable parameterValue) {\n final Class<? extends Serializable> clazz = getClassFromType(type);\n Serializable preprocessedParameterValue = preprocessInputs(type, parameterValue);\n return convertToType(clazz, preprocessedParameterValue)... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_422 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/filter/FilterAccessorTest.java",
"identifier": "FilterAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = APIFilterMandatoryException.class)\n public void testAccessToMandatoryValueWhichItDoesntExitThrowException() {\n FilterAccessor filterAccess = new FilterAccessor(Collections.<String, String> emptyMap());\n\n filterAccess.getMandatory(\"key\");\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "filters",
"modifier": "private",
"original_string": "private Map<String, String> filters;",
"type": "Map<String, String>",
"var_name": "filters"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/filter/FilterAccessor.ja... | {
"body": "public String getMandatory(String filter) {\n ensureFilterValue(filter);\n return getFilters().get(filter);\n }",
"class_method_signature": "FilterAccessor.getMandatory(String filter)",
"constructor": false,
"full_signature": "public String getMandatory(String filter)",
"identifier... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_588 | {
"fields": [
{
"declarator": "result",
"modifier": "@Mock",
"original_string": "@Mock\n SearchResult<String> result;",
"type": "SearchResult<String>",
"var_name": "result"
},
{
"declarator": "converter",
"modifier": "@Mock",
"original_string": "@Mock\n ... | {
"body": "@Test(expected = APISearchIndexOutOfRange.class)\n public void testPageOutOfResultNumberThrowsExecption() throws Exception {\n when(result.getCount()).thenReturn(1L);\n\n new ItemSearchResultConverter<IItem, String>(2, 10, result, converter).toItemSearchResult();\n }",
"class_method_s... | {
"fields": [
{
"declarator": "page",
"modifier": "private",
"original_string": "private int page;",
"type": "int",
"var_name": "page"
},
{
"declarator": "result",
"modifier": "private",
"original_string": "private SearchResult<E> result;",
"type": "Se... | {
"body": "public ItemSearchResult<I> toItemSearchResult() {\n return new ItemSearchResult<I>(page, nbResultsByPage, total, converter.convert(result.getResult()));\n }",
"class_method_signature": "ItemSearchResultConverter.toItemSearchResult()",
"constructor": false,
"full_signature": "public ItemSear... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_36 | {
"fields": [
{
"declarator": "session",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private APISession session;",
"type": "APISession",
"var_name": "session"
},
{
"declarator": "locale = new Locale(\"en\")",
"modifier": "private final",
... | {
"body": "@Test\n public void hasUserAdminProfileShouldReturnTrueForAdminProfileOnFirstPage() throws Exception {\n final ProfileAPI profileAPI = mock(ProfileAPI.class);\n final long userId = 488L;\n final Profile profile = mock(Profile.class);\n doReturn(Collections.singletonList(profi... | {
"fields": [
{
"declarator": "FORM_ACTION_CONDITION = \"FormActionCondition_\"",
"modifier": "private static final",
"original_string": "private static final String FORM_ACTION_CONDITION = \"FormActionCondition_\";",
"type": "String",
"var_name": "FORM_ACTION_CONDITION"
},
{... | {
"body": "protected boolean hasUserAdminProfile(final APISession session, final ProfileAPI profileAPI) {\n List<Profile> profiles;\n int startIndex = 0;\n final int maxResults = 10;\n do {\n profiles = profileAPI.getProfilesForUser(session.getUserId(), startIndex, maxResults, P... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_2 | {
"fields": [
{
"declarator": "formWidget",
"modifier": "@Mock",
"original_string": "@Mock\n ReducedFormWidget formWidget;",
"type": "ReducedFormWidget",
"var_name": "formWidget"
}
],
"file": "forms/forms-view/src/test/java/org/bonitasoft/forms/client/view/widget/TableWidg... | {
"body": "@Test\n public void should_get_last_page_index_work_with_an_available_values_list_matching_the_max_item_per_page() throws Exception {\n\n final ArrayList<List<ReducedFormFieldAvailableValue>> availableValuesList = new ArrayList<List<ReducedFormFieldAvailableValue>>();\n for (int i = 0; i <... | {
"fields": [
{
"declarator": "SELECTED_ROW_DEFAULT_STYLE = \"bonita_form_table_selected\"",
"modifier": "private static final",
"original_string": "private static final String SELECTED_ROW_DEFAULT_STYLE = \"bonita_form_table_selected\";",
"type": "String",
"var_name": "SELECTED_ROW_... | {
"body": "protected int getLastPageIndex() {\n int lastPageIndex = 0;\n if (maxRows > 0) {\n final int nbOfValues = availableValues.size();\n if (nbOfValues > 0) {\n lastPageIndex = nbOfValues / maxRows - 1;\n if (nbOfValues % maxRows > 0) {\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_834 | {
"fields": [
{
"declarator": "caller",
"modifier": "@Mock(answer = Answers.RETURNS_MOCKS)\n private",
"original_string": "@Mock(answer = Answers.RETURNS_MOCKS)\n private APIServletCall caller;",
"type": "APIServletCall",
"var_name": "caller"
},
{
"declarator": "h... | {
"body": "@Test\n public void should_retrieve_custom_user_info_term_filtered() throws Exception {\n given(engine.searchCustomUserInfoValues(any(SearchOptions.class))).willReturn(\n new SearchResultImpl<CustomUserInfoValue>(0, Collections.<CustomUserInfoValue> emptyList()));\n Argument... | {
"fields": [
{
"declarator": "engineClientCreator",
"modifier": "private",
"original_string": "private CustomUserInfoEngineClientCreator engineClientCreator;",
"type": "CustomUserInfoEngineClientCreator",
"var_name": "engineClientCreator"
},
{
"declarator": "converter ... | {
"body": "@Override\n public ItemSearchResult<CustomUserInfoItem> search(int page, int resultsByPage, String search, String orders, Map<String, String> filters) {\n SearchResult<CustomUserInfoValue> result = getClient().searchCustomUserInfoValues(new SearchOptionsCreator(\n page,\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_567 | {
"fields": [
{
"declarator": "datastore",
"modifier": "",
"original_string": "AbstractFlowNodeDatastore<FlowNodeItem, FlowNodeInstance> datastore;",
"type": "AbstractFlowNodeDatastore<FlowNodeItem, FlowNodeInstance>",
"var_name": "datastore"
}
],
"file": "server/src/test/jav... | {
"body": "@Test\n public void makeSearchOptionBuilder_state_Filter_Pending_Adds_multiple_entries_in_SearchOption() throws Exception {\n final Map<String, String> filters = new HashMap<String, String>();\n filters.put(FlowNodeInstanceSearchDescriptor.STATE_NAME, \"pending\");\n final SearchOpt... | {
"fields": [
{
"declarator": "updateHelper",
"modifier": "private",
"original_string": "private DatastoreHasUpdate<FlowNodeItem> updateHelper;",
"type": "DatastoreHasUpdate<FlowNodeItem>",
"var_name": "updateHelper"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/... | {
"body": "protected SearchOptionsBuilder makeSearchOptionBuilder(final int page, final int resultsByPage, final String search, final String orders,\n final Map<String, String> filters) {\n final SearchOptionsBuilder builder = SearchOptionsBuilderUtil.buildSearchOptions(page, resultsByPage, orders, ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_137 | {
"fields": [
{
"declarator": "session = new MockHttpSession()",
"modifier": "private final",
"original_string": "private final HttpSession session = new MockHttpSession();",
"type": "HttpSession",
"var_name": "session"
},
{
"declarator": "response = new MockHttpServlet... | {
"body": "@Test\n public void testSetTokenToResponseHeader() throws Exception {\n tokenGenerator.setTokenToResponseHeader(response, BONITA_TOKEN_VALUE);\n\n assertThat(response.getHeader(BONITA_TOKEN_NAME)).isEqualTo(BONITA_TOKEN_VALUE);\n }",
"class_method_signature": "TokenGeneratorTest.testS... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(TokenGenerator.class.getName())",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = Logger.getLogger(TokenGenerator.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "public void setTokenToResponseHeader(final HttpServletResponse res, final String token) {\n if(res.containsHeader(X_BONITA_API_TOKEN)){\n res.setHeader(X_BONITA_API_TOKEN, token);\n } else {\n res.addHeader(X_BONITA_API_TOKEN, token);\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_423 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/filter/FilterAccessorTest.java",
"identifier": "FilterAccessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = APIFilterMandatoryException.class)\n public void testAccessToMandatoryValueNotConvertibleThrowException() {\n FilterAccessor filterAccess = new FilterAccessor(Collections.singletonMap(\"key\", \"value\"));\n\n filterAccess.getMandatory(\"key\", new MemberTypeConverter());\... | {
"fields": [
{
"declarator": "filters",
"modifier": "private",
"original_string": "private Map<String, String> filters;",
"type": "Map<String, String>",
"var_name": "filters"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/filter/FilterAccessor.ja... | {
"body": "public String getMandatory(String filter) {\n ensureFilterValue(filter);\n return getFilters().get(filter);\n }",
"class_method_signature": "FilterAccessor.getMandatory(String filter)",
"constructor": false,
"full_signature": "public String getMandatory(String filter)",
"identifier... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_589 | {
"fields": [
{
"declarator": "result",
"modifier": "@Mock",
"original_string": "@Mock\n SearchResult<String> result;",
"type": "SearchResult<String>",
"var_name": "result"
},
{
"declarator": "converter",
"modifier": "@Mock",
"original_string": "@Mock\n ... | {
"body": "@Test\n public void testPageNumberCanBeRetrieved() {\n ItemSearchResultConverter<IItem, String> itemSearchResult = new ItemSearchResultConverter<IItem, String>(5, 10, result, 8L, converter);\n\n assertEquals(5, itemSearchResult.toItemSearchResult().getPage());\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "page",
"modifier": "private",
"original_string": "private int page;",
"type": "int",
"var_name": "page"
},
{
"declarator": "result",
"modifier": "private",
"original_string": "private SearchResult<E> result;",
"type": "Se... | {
"body": "public ItemSearchResult<I> toItemSearchResult() {\n return new ItemSearchResult<I>(page, nbResultsByPage, total, converter.convert(result.getResult()));\n }",
"class_method_signature": "ItemSearchResultConverter.toItemSearchResult()",
"constructor": false,
"full_signature": "public ItemSear... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_37 | {
"fields": [
{
"declarator": "session",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private APISession session;",
"type": "APISession",
"var_name": "session"
},
{
"declarator": "locale = new Locale(\"en\")",
"modifier": "private final",
... | {
"body": "@Test\n public void hasUserAdminProfileShouldReturnTrueForAdminProfileOnSecondPage() throws Exception {\n final ProfileAPI profileAPI = mock(ProfileAPI.class);\n final long userId = 488L;\n final Profile badProfile = mock(Profile.class);\n doReturn(Collections.singletonList(b... | {
"fields": [
{
"declarator": "FORM_ACTION_CONDITION = \"FormActionCondition_\"",
"modifier": "private static final",
"original_string": "private static final String FORM_ACTION_CONDITION = \"FormActionCondition_\";",
"type": "String",
"var_name": "FORM_ACTION_CONDITION"
},
{... | {
"body": "protected boolean hasUserAdminProfile(final APISession session, final ProfileAPI profileAPI) {\n List<Profile> profiles;\n int startIndex = 0;\n final int maxResults = 10;\n do {\n profiles = profileAPI.getProfilesForUser(session.getUserId(), startIndex, maxResults, P... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_3 | {
"fields": [
{
"declarator": "formFieldWidget",
"modifier": "protected",
"original_string": "protected FormFieldWidget formFieldWidget;",
"type": "FormFieldWidget",
"var_name": "formFieldWidget"
}
],
"file": "forms/forms-view/src/test/java/org/bonitasoft/forms/client/view/wi... | {
"body": "@Test\n public void testAddValueChangeHandler_with_Null_should_Not_Break() throws Exception {\n try {\n formFieldWidget.addValueChangeHandler(null);\n fail(\"NPe should have been raised\");\n } catch (final NullPointerException e) {\n assertThat(e).hasMessa... | {
"fields": [
{
"declarator": "flowPanel",
"modifier": "protected",
"original_string": "protected FlowPanel flowPanel;",
"type": "FlowPanel",
"var_name": "flowPanel"
},
{
"declarator": "fieldContainer",
"modifier": "protected",
"original_string": "protected ... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public HandlerRegistration addValueChangeHandler(final ValueChangeHandler valueChangeHandler) {\n if (valueChangeHandlers == null) {\n valueChangeHandlers = new HashMap<String, ValueChangeHandler<Serializable>>();\n }\n if... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_835 | {
"fields": [
{
"declarator": "caller",
"modifier": "@Mock(answer = Answers.RETURNS_MOCKS)\n private",
"original_string": "@Mock(answer = Answers.RETURNS_MOCKS)\n private APIServletCall caller;",
"type": "APIServletCall",
"var_name": "caller"
},
{
"declarator": "h... | {
"body": "@Test\n public void should_update_a_given_custom_item_value() throws Exception {\n CustomUserInfoValueImpl update = new CustomUserInfoValueImpl();\n update.setValue(\"foo\");\n given(engine.setCustomUserInfoValue(1L, 2L, \"foo\")).willReturn(update);\n\n CustomUserInfoItem va... | {
"fields": [
{
"declarator": "engineClientCreator",
"modifier": "private",
"original_string": "private CustomUserInfoEngineClientCreator engineClientCreator;",
"type": "CustomUserInfoEngineClientCreator",
"var_name": "engineClientCreator"
},
{
"declarator": "converter ... | {
"body": "@Override\n public CustomUserInfoItem update(APIID id, Map<String, String> attributes) {\n check(containsOnly(ATTRIBUTE_VALUE, attributes), new _(\"Only the value attribute can be updated\"));\n\n return converter.convert(getClient().setCustomUserInfoValue(\n id.getPartAsLon... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_566 | {
"fields": [
{
"declarator": "journal",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private TaskDatastore journal;",
"type": "TaskDatastore",
"var_name": "journal"
},
{
"declarator": "archives",
"modifier": "@Mock\n private",
"origin... | {
"body": "@Test(expected = APIItemNotFoundException.class)\n public void should_throw_an_exception_when_the_task_does_not_exist() throws Exception {\n when(journal.get(id)).thenThrow(new APIItemNotFoundException(\"type\", id));\n final Map<String, String> filters = new HashMap<String, String>();\n ... | {
"fields": [
{
"declarator": "journal",
"modifier": "private final",
"original_string": "private final DatastoreHasGet<TaskItem> journal;",
"type": "DatastoreHasGet<TaskItem>",
"var_name": "journal"
},
{
"declarator": "archives",
"modifier": "private final",
... | {
"body": "public IItem find(final APIID taskId) {\n try {\n return journal.get(taskId);\n } catch (final APIItemNotFoundException e) {\n final Map<String, String> filters = new HashMap<String, String>();\n filters.put(ArchivedActivityItem.ATTRIBUTE_SOURCE_OBJECT_ID, tas... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_136 | {
"fields": [
{
"declarator": "session = new MockHttpSession()",
"modifier": "private final",
"original_string": "private final HttpSession session = new MockHttpSession();",
"type": "HttpSession",
"var_name": "session"
},
{
"declarator": "response = new MockHttpServlet... | {
"body": "@Test\n public void testSetTokenToResponseCookie() throws Exception {\n portalCookies.addCSRFTokenCookieToResponse(request, response, BONITA_TOKEN_VALUE);\n\n final Cookie csrfCookie = response.getCookie(BONITA_TOKEN_NAME);\n\n assertThat(csrfCookie.getName()).isEqualTo(BONITA_TOKEN... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(TokenGenerator.class.getName())",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = Logger.getLogger(TokenGenerator.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "@Deprecated\n public void setTokenToResponseCookie(HttpServletRequest request, HttpServletResponse res, Object apiTokenFromClient) {\n PortalCookies portalCookies = new PortalCookies();\n portalCookies.addCSRFTokenCookieToResponse(request, res, apiTokenFromClient);\n }",
"class_method... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_618 | {
"fields": [
{
"declarator": "TENANT_ID = 1L",
"modifier": "public static final",
"original_string": "public static final long TENANT_ID = 1L;",
"type": "long",
"var_name": "TENANT_ID"
},
{
"declarator": "PAGE_ID = 123l",
"modifier": "public static final",
... | {
"body": "@Test\n public void should_add_a_page_return_valid_page() throws Exception {\n\n // Given\n deleteDir(pagesDir);\n when(pageAPI.createPage(any(String.class), any(byte[].class))).thenReturn(mockedPage);\n\n // When\n final PageItem addedPage = pageDatastore.add(pageToBe... | {
"fields": [
{
"declarator": "UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\"",
"modifier": "public static final",
"original_string": "public static final String UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\";",
"type": "String",
"var_name": "UNMAPPED_ATTRIBUTE_ZIP_FILE"
},
{
"de... | {
"body": "@Override\n public PageItem add(final PageItem pageItem) {\n final String zipFileAttribute = pageItem.getAttributeValue(UNMAPPED_ATTRIBUTE_ZIP_FILE);\n final String[] filenames = zipFileAttribute.split(FileUploadServlet.RESPONSE_SEPARATOR);\n final String filename = filenames[0];\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_248 | {
"fields": [
{
"declarator": "DATE_01_01_1970_13H_AS_LONG_GMT = 46800000L",
"modifier": "public static final",
"original_string": "public static final long DATE_01_01_1970_13H_AS_LONG_GMT = 46800000L;",
"type": "long",
"var_name": "DATE_01_01_1970_13H_AS_LONG_GMT"
},
{
... | {
"body": "@Test\n public void convertToType_should_not_convert_into_a_LocalDateTime_a_String_that_is_too_short() {\n\n ContractTypeConverter converter = new ContractTypeConverter(ISO_8601_DATE_PATTERNS);\n\n final String year = \"1987\";\n final Object localDateTimeString1 = converter.convert... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContractTypeConverter.class.getName())",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = Logger.getLogger(ContractTypeConverter.class.getName());",
"type": "Logger",
"var_name": ... | {
"body": "Object convertToType(final Type type, final Serializable parameterValue) {\n final Class<? extends Serializable> clazz = getClassFromType(type);\n Serializable preprocessedParameterValue = preprocessInputs(type, parameterValue);\n return convertToType(clazz, preprocessedParameterValue)... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_474 | {
"fields": [
{
"declarator": "DISPLAY_NAME = \"menu name\"",
"modifier": "private static final",
"original_string": "private static final String DISPLAY_NAME = \"menu name\";",
"type": "String",
"var_name": "DISPLAY_NAME"
},
{
"declarator": "APPLICATION_ID = 1L",
... | {
"body": "@Test\n public void update_with_no_parent_menu_should_send_null() {\n\n //given\n final HashMap<String, String> fields = new HashMap<String, String>();\n fields.put(ApplicationMenuItem.ATTRIBUTE_APPLICATION_PAGE_ID, \"-1\");\n\n //when\n final ApplicationMenuUpdater up... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/applicationmenu/ApplicationMenuItemConverter.java",
"identifier": "ApplicationMenuItemConverter",
"interfaces": "",
"methods": [
{
"class_method_signature": "ApplicationMenuItemConverter.toApplicationMenuItem(fina... | {
"body": "public ApplicationMenuUpdater toApplicationMenuUpdater(final Map<String, String> attributes) {\n final ApplicationMenuUpdater applicationMenuUpdater = new ApplicationMenuUpdater();\n\n if (attributes.containsKey(ApplicationMenuItem.ATTRIBUTE_APPLICATION_PAGE_ID)) {\n Long appPageId... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_161 | {
"fields": [
{
"declarator": "filterChain",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FilterChain filterChain;",
"type": "FilterChain",
"var_name": "filterChain"
},
{
"declarator": "session = new MockHttpSession()",
"modifier": "pri... | {
"body": "@Test\n public void should_add_security_token_in_headers_and_in_cookies_when_token_already_exists() throws Exception {\n session.setAttribute(TokenGenerator.API_TOKEN, bonitaTokenValue);\n response.addHeader(bonitaTokenName, bonitaTokenValue);\n\n tokenGeneratorFilter.doFilter(reque... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(TokenGeneratorFilter.class.getName())",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = Logger.getLogger(TokenGeneratorFilter.class.getName());",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {\n final HttpServletRequest req = (HttpServletRequest) request;\n final HttpServletResponse res = (HttpServletResponse) response;\n\... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_531 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/utils/SortTest.java",
"identifier": "SortTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToStringForParamWithConvertionValue() {\n Sort sort = new Sort( ActivityItem.ATTRIBUTE_ROOT_CASE_ID + \" \" + Order.DESC, new ActivityAttributeConverter());\n\n Assert.assertEquals(sort.toString(), ActivityInstanceSearchDescriptor.PROCESS_INSTANCE_ID + \" \" + Or... | {
"fields": [
{
"declarator": "DEFAULT_ORDER = Order.ASC",
"modifier": "public static final",
"original_string": "public static final Order DEFAULT_ORDER = Order.ASC;",
"type": "Order",
"var_name": "DEFAULT_ORDER"
},
{
"declarator": "SEPARATOR = \" \"",
"modifier"... | {
"body": "@Override\n public String toString() {\n return new StringBuilder().append(getField())\n .append(SEPARATOR)\n .append(getOrder()).toString();\n }",
"class_method_signature": "Sort.toString()",
"constructor": false,
"full_s... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_862 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/json/JSonSimpleDeserializerTest.java",
"identifier": "JSonSimpleDeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptyArray() {\n final AbstractTreeNode<String> tree = JSonSimpleDeserializer.unserializeTree(\"[]\");\n\n if (!(tree instanceof Tree<?>)) {\n fail(\"Fail to parse a simple array in JSON\");\n }\n\n assertEquals(\"[]\", tree.toJson());\n ... | {
"fields": [
{
"declarator": "INSTANCE = null",
"modifier": "private static",
"original_string": "private static JSonSimpleDeserializer INSTANCE = null;",
"type": "JSonSimpleDeserializer",
"var_name": "INSTANCE"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/serv... | {
"body": "public static AbstractTreeNode<String> unserializeTree(final String json) {\n\n return getInstance()._unserializeTree(json);\n }",
"class_method_signature": "JSonSimpleDeserializer.unserializeTree(final String json)",
"constructor": false,
"full_signature": "public static AbstractTreeNode<S... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_198 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/console/common/server/login/utils/RedirectUrlBuilderTest.java",
"identifier": "RedirectUrlBuilderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWeCanBuildHashTaggedParamAreKept() throws Exception {\n final RedirectUrlBuilder redirectUrlBuilder =\n new RedirectUrlBuilder(\"myredirecturl?parambeforehash=true#hashparam=true\");\n final String url = redirectUrlBuilder.build().getUrl();\n\n ... | {
"fields": [
{
"declarator": "urlBuilder",
"modifier": "private final",
"original_string": "private final UrlBuilder urlBuilder;",
"type": "UrlBuilder",
"var_name": "urlBuilder"
},
{
"declarator": "blackList = Arrays.asList(\n AuthenticationManager.REDIRECT_... | {
"body": "public RedirectUrl build() {\n return new RedirectUrl(urlBuilder.build());\n\n }",
"class_method_signature": "RedirectUrlBuilder.build()",
"constructor": false,
"full_signature": "public RedirectUrl build()",
"identifier": "build",
"invocations": [
"build"
],
"modifiers": "publi... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_462 | {
"fields": [
{
"declarator": "converter = new ApplicationMenuSearchDescriptorConverter()",
"modifier": "private final",
"original_string": "private final ApplicationMenuSearchDescriptorConverter converter = new ApplicationMenuSearchDescriptorConverter();",
"type": "ApplicationMenuSearchDe... | {
"body": "@Test\n public void should_return_ApplicationMenuSearchDescriptor_id_on_convert_attribute_id() throws Exception {\n //when\n final String convertedValue = converter.convert(ApplicationMenuItem.ATTRIBUTE_ID);\n\n //then\n assertThat(convertedValue).isEqualTo(ApplicationMenuSea... | {
"fields": [
{
"declarator": "mapping",
"modifier": "private final",
"original_string": "private final Map<String, String> mapping;",
"type": "Map<String, String>",
"var_name": "mapping"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/applicationm... | {
"body": "@Override\n public String convert(final String attribute) {\n return MapUtil.getMandatory(mapping, attribute);\n }",
"class_method_signature": "ApplicationMenuSearchDescriptorConverter.convert(final String attribute)",
"constructor": false,
"full_signature": "@Override public String conv... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_76 | {
"fields": [
{
"declarator": "request",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private HttpServletRequest request;",
"type": "HttpServletRequest",
"var_name": "request"
}
],
"file": "common/src/test/java/org/bonitasoft/console/common/server/utils/Lo... | {
"body": "@Test\n public void testAnInvalidLocaleInRequestResultsWithDefaultLocale() throws Exception {\n doReturn(\"weirdvalue\").when(request).getParameter(LocaleUtils.LOCALE_PARAM);\n\n String locale = LocaleUtils.getUserLocaleAsString(request);\n\n assertEquals(\"en\", locale);\n }",
... | {
"fields": [
{
"declarator": "LOCALE_PARAM = \"locale\"",
"modifier": "public static final",
"original_string": "public static final String LOCALE_PARAM = \"locale\";",
"type": "String",
"var_name": "LOCALE_PARAM"
},
{
"declarator": "PORTAL_LOCALE_PARAM = \"_l\"",
... | {
"body": "public static String getUserLocaleAsString(final HttpServletRequest request) {\n String locale = getLocaleFromRequestURL(request);\n if (locale == null) {\n locale = getStandardizedLocaleFromCookie(request);\n }\n if (locale == null) {\n String browserLocal... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_874 | {
"fields": [
{
"declarator": "converter",
"modifier": "private",
"original_string": "private DateConverter converter;",
"type": "DateConverter",
"var_name": "converter"
}
],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/utils/converter/typed/DateConv... | {
"body": "@Test\n public void nullIsConvertedToNull() throws Exception {\n\n Date converted = converter.convert(null);\n\n assertNull(converted);\n }",
"class_method_signature": "DateConverterTest.nullIsConvertedToNull()",
"constructor": false,
"full_signature": "@Test public void nullIsCon... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/framework/utils/converter/typed/DateConverter.java",
"identifier": "DateConverter",
"interfaces": "implements Converter<Date>",
"methods": [
{
"class_method_signature": "DateConverter.convert(String toBeConverted)",
"... | {
"body": "@Override\n public Date convert(String toBeConverted) throws ConversionException {\n if (toBeConverted == null || toBeConverted.isEmpty()) {\n return null;\n }\n try {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss z yyyy\", DateForma... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_527 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/utils/SortsTest.java",
"identifier": "SortsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptySortListing() throws Exception {\n Sorts sorts = new Sorts(\"\");\n\n List<Sort> sortList = sorts.asList();\n\n Assert.assertTrue(sortList.isEmpty());\n }",
"class_method_signature": "SortsTest.testEmptySortListing()",
"constructor": false,
"ful... | {
"fields": [
{
"declarator": "sorts",
"modifier": "private",
"original_string": "private List<Sort> sorts;",
"type": "List<Sort>",
"var_name": "sorts"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/utils/Sorts.java",
"identifier": "Sorts",
"i... | {
"body": "public List<Sort> asList() {\n return sorts;\n }",
"class_method_signature": "Sorts.asList()",
"constructor": false,
"full_signature": "public List<Sort> asList()",
"identifier": "asList",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "List<Sort>",
"sig... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_99 | {
"fields": [
{
"declarator": "customPostMessageEventListener = new CustomPostMessageEventListener()",
"modifier": "@Spy\n private final",
"original_string": "@Spy\n private final CustomPostMessageEventListener customPostMessageEventListener = new CustomPostMessageEventListener();",
... | {
"body": "@Test\n public void onSuccessOrError_should_not_be_called_with_invalid_json() throws Exception {\n final String jsonMessage = \"{\\\"message\\\":\\\"success\\\",action\\\":\\\"Start process\\\"}\";\n customPostMessageEventListener.setActionToWatch(\"Start process\");\n\n customPostM... | {
"fields": [],
"file": "portal/src/main/java/org/bonitasoft/console/client/user/task/action/PostMessageEventListener.java",
"identifier": "PostMessageEventListener",
"interfaces": "",
"methods": [
{
"class_method_signature": "PostMessageEventListener.onMessageEvent(final String eventData)",
"... | {
"body": "public void onMessageEvent(final String eventData) {\n try {\n final JSONValue root = JSONParser.parseStrict(eventData);\n final JSONObject fullJSONMessage = root.isObject();\n if (isActionWatched(fullJSONMessage)) {\n handleJSONMessage(fullJSONMessage... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_177 | {
"fields": [
{
"declarator": "request",
"modifier": "@Mock",
"original_string": "@Mock\n HttpServletRequest request;",
"type": "HttpServletRequest",
"var_name": "request"
},
{
"declarator": "requestAccessor",
"modifier": "@Mock",
"original_string": "@Moc... | {
"body": "@Test\n public void testGetURLToRedirectToFromRequest() throws Exception {\n doReturn(null).when(authenticationManager).getLoginPageURL(eq(requestAccessor), anyString());\n doReturn(\"redirectURLFromRequest\").when(request).getParameter(LogoutServlet.LOGIN_URL_PARAM_NAME);\n \n ... | {
"fields": [
{
"declarator": "serialVersionUID = 739607235407639011L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 739607235407639011L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOGIN_P... | {
"body": "protected String getURLToRedirectTo(final HttpServletRequestAccessor requestAccessor, final long tenantId)\n throws AuthenticationManagerNotFoundException, UnsupportedEncodingException, ConsumerNotFoundException, ServletException {\n final AuthenticationManager authenticationManager = get... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_659 | {
"fields": [
{
"declarator": "engine",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private IdentityAPI engine;",
"type": "IdentityAPI",
"var_name": "engine"
},
{
"declarator": "client",
"modifier": "@InjectMocks\n private",
"original... | {
"body": "@Test\n public void should_create_a_given_definition() throws Exception {\n given(engine.createCustomUserInfoDefinition(any(CustomUserInfoDefinitionCreator.class)))\n .willReturn(new EngineCustomUserInfoDefinition(1L, \"foo\", \"bar\"));\n\n CustomUserInfoDefinition definiti... | {
"fields": [
{
"declarator": "identity",
"modifier": "private",
"original_string": "private IdentityAPI identity;",
"type": "IdentityAPI",
"var_name": "identity"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/engineclient/CustomUserInfoEngineClient.java",
... | {
"body": "public CustomUserInfoDefinition createDefinition(CustomUserInfoDefinitionCreator creator) {\n try {\n return identity.createCustomUserInfoDefinition(creator);\n } catch (CreationException e) {\n throw new APIException(new _(\"An error occurred while creating a definition... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_209 | {
"fields": [
{
"declarator": "ICON_ID = 1238970432L",
"modifier": "private static final",
"original_string": "private static final long ICON_ID = 1238970432L;",
"type": "long",
"var_name": "ICON_ID"
},
{
"declarator": "iconServlet",
"modifier": "@Spy\n private... | {
"body": "@Test\n public void should_status_be_NOT_FOUND_when_icon_does_not_exists_in_engine() throws Exception {\n doThrow(NotFoundException.class).when(identityAPI).getIcon(ICON_ID);\n httpServletRequest.setPathInfo(\"/\" + String.valueOf(ICON_ID));\n\n iconServlet.doGet(httpServletRequest,... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOGGER = Logger.getLogger(IconServlet.cla... | {
"body": "@Override\n protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException {\n String iconIdPath = request.getPathInfo();\n if (iconIdPath == null || iconIdPath.isEmpty()) {\n response.setStatus(HttpServletResponse.SC_BAD_REQUE... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_21 | {
"fields": [],
"file": "forms/forms-server/src/test/java/org/bonitasoft/forms/server/api/impl/util/WidgetExpressionEntryTest.java",
"identifier": "WidgetExpressionEntryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWidgetExpressionEntryIsNotEqualsToNull() {\n WidgetExpressionEntry widget =\n new WidgetExpressionEntry(\"widgetId\", ExpressionId.WIDGET_DISPLAY_CONDITION);\n\n boolean result = widget.equals(null);\n\n assertFalse(result);\n }",
"class_m... | {
"fields": [
{
"declarator": "EXPRESSION_KEY_SEPARATOR = \":\"",
"modifier": "private static final",
"original_string": "private static final String EXPRESSION_KEY_SEPARATOR = \":\";",
"type": "String",
"var_name": "EXPRESSION_KEY_SEPARATOR"
},
{
"declarator": "entry",... | {
"body": "@Override\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n WidgetExpressionEntry other = (Wi... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_435 | {
"fields": [
{
"declarator": "applicationAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ApplicationAPI applicationAPI;",
"type": "ApplicationAPI",
"var_name": "applicationAPI"
},
{
"declarator": "pageAPI",
"modifier": "@Mock\n p... | {
"body": "@Test(expected = APIException.class)\n public void should_throw_APIException_when_ApplicationAPI_throws_an_exception_on_UpDate() throws Exception {\n //given\n given(applicationAPI.updateApplication(anyLong(), any(ApplicationUpdater.class))).willThrow(new UpdateException(\"\"));\n\n ... | {
"fields": [
{
"declarator": "applicationAPI",
"modifier": "private final",
"original_string": "private final ApplicationAPI applicationAPI;",
"type": "ApplicationAPI",
"var_name": "applicationAPI"
},
{
"declarator": "converter",
"modifier": "private final",
... | {
"body": "@Override\n public ApplicationItem update(final APIID id, final Map<String, String> attributes) {\n try {\n final ApplicationUpdater applicationUpdater = converter.toApplicationUpdater(attributes);\n final Application application = applicationAPI.updateApplication(id.toLong(... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_120 | {
"fields": [
{
"declarator": "processFormService",
"modifier": "@Spy",
"original_string": "@Spy\n ProcessFormService processFormService;",
"type": "ProcessFormService",
"var_name": "processFormService"
},
{
"declarator": "processAPI",
"modifier": "@Mock",
... | {
"body": "@Test\n public void isAllowedToStartProcess_should_return_false() throws Exception {\n final Map<String, Serializable> parameters = new HashMap<String, Serializable>();\n parameters.put(\"USER_ID_KEY\", 1L);\n parameters.put(\"PROCESS_DEFINITION_ID_KEY\", 42L);\n when(command... | {
"fields": [
{
"declarator": "PROCESS_DEPLOY = \"process_deploy\"",
"modifier": "protected static final",
"original_string": "protected static final String PROCESS_DEPLOY = \"process_deploy\";",
"type": "String",
"var_name": "PROCESS_DEPLOY"
},
{
"declarator": "LOGGER ... | {
"body": "public boolean isAllowedToStartProcess(final APISession apiSession, final long processDefinitionId, final long enforcedUserId) throws BonitaException {\n if (ActivationState.ENABLED.equals(getProcessAPI(apiSession).getProcessDeploymentInfo(processDefinitionId).getActivationState())) {\n f... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_570 | {
"fields": [
{
"declarator": "datastore",
"modifier": "",
"original_string": "AbstractFlowNodeDatastore<FlowNodeItem, FlowNodeInstance> datastore;",
"type": "AbstractFlowNodeDatastore<FlowNodeItem, FlowNodeInstance>",
"var_name": "datastore"
}
],
"file": "server/src/test/jav... | {
"body": "@Test\n public void makeSearchOptionBuilder_without_state_Filter_Adds_only_Unwanted_state_SearchOption() throws Exception {\n final Map<String, String> filters = new HashMap<String, String>();\n filters.put(FlowNodeInstanceSearchDescriptor.STATE_NAME, \"ready\");\n final SearchOptio... | {
"fields": [
{
"declarator": "updateHelper",
"modifier": "private",
"original_string": "private DatastoreHasUpdate<FlowNodeItem> updateHelper;",
"type": "DatastoreHasUpdate<FlowNodeItem>",
"var_name": "updateHelper"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/... | {
"body": "protected SearchOptionsBuilder makeSearchOptionBuilder(final int page, final int resultsByPage, final String search, final String orders,\n final Map<String, String> filters) {\n final SearchOptionsBuilder builder = SearchOptionsBuilderUtil.buildSearchOptions(page, resultsByPage, orders, ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_823 | {
"fields": [
{
"declarator": "datastore",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ProcessConnectorDependencyDatastore datastore;",
"type": "ProcessConnectorDependencyDatastore",
"var_name": "datastore"
},
{
"declarator": "apiProcessConn... | {
"body": "@Test(expected = APIFilterMandatoryException.class)\n public void checkConnectorNameIsMandatory() throws Exception {\n Map<String, String> filters = buildFilters(\"1\", \"\", \"aConnectorVersion\");\n\n apiProcessConnectorDependency.checkMandatoryAttributes(filters);\n }",
"class_meth... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/process/APIProcessConnectorDependency.java",
"identifier": "APIProcessConnectorDependency",
"interfaces": "implements\n APIHasSearch<ProcessConnectorDependencyItem>",
"methods": [
{
"class_method_signature": ... | {
"body": "protected void checkMandatoryAttributes(final Map<String, String> filters) {\n if (MapUtil.isBlank(filters, ATTRIBUTE_PROCESS_ID)) {\n throw new APIFilterMandatoryException(ATTRIBUTE_PROCESS_ID);\n }\n if (MapUtil.isBlank(filters, ATTRIBUTE_CONNECTOR_NAME)) {\n th... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_767 | {
"fields": [
{
"declarator": "attributeChecker",
"modifier": "private",
"original_string": "private APICaseVariableAttributeChecker attributeChecker;",
"type": "APICaseVariableAttributeChecker",
"var_name": "attributeChecker"
}
],
"file": "server/src/test/java/org/bonitasoft... | {
"body": "@Test(expected = APIException.class)\n public void checkUpdateAttributesCheckForAttributeValue() throws Exception {\n Map<String, String> attributes = buildSuitableUpdateAttributes();\n attributes.remove(CaseVariableItem.ATTRIBUTE_VALUE);\n\n attributeChecker.checkUpdateAttributes(a... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/cases/APICaseVariableAttributeChecker.java",
"identifier": "APICaseVariableAttributeChecker",
"interfaces": "",
"methods": [
{
"class_method_signature": "APICaseVariableAttributeChecker.checkUpdateAttributes(Map<Str... | {
"body": "public void checkUpdateAttributes(Map<String, String> attributes) {\n if (attributes == null || attributes.isEmpty()) {\n throw new APIException(format(\"Attributes '%s' and '%s' must be specified\", CaseVariableItem.ATTRIBUTE_TYPE, CaseVariableItem.ATTRIBUTE_VALUE));\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_337 | {
"fields": [
{
"declarator": "collector = new ChildrenMenuCollector(1L)",
"modifier": "",
"original_string": "ChildrenMenuCollector collector = new ChildrenMenuCollector(1L);",
"type": "ChildrenMenuCollector",
"var_name": "collector"
},
{
"declarator": "menu = new Appl... | {
"body": "@Test\n public void should_be_collectible_when_menu_parentId_is_the_given_parentId() {\n menu.setParentId(1L);\n\n assertThat(collector.isCollectible(menu)).isTrue();\n }",
"class_method_signature": "ChildrenMenuCollectorTest.should_be_collectible_when_menu_parentId_is_the_given_paren... | {
"fields": [
{
"declarator": "parentId",
"modifier": "private final",
"original_string": "private final Long parentId;",
"type": "Long",
"var_name": "parentId"
}
],
"file": "server/src/main/java/org/bonitasoft/livingapps/menu/ChildrenMenuCollector.java",
"identifier": "Chi... | {
"body": "@Override\n public boolean isCollectible(final ApplicationMenu menu) {\n return parentId.equals(menu.getParentId());\n }",
"class_method_signature": "ChildrenMenuCollector.isCollectible(final ApplicationMenu menu)",
"constructor": false,
"full_signature": "@Override public boolean isColl... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_622 | {
"fields": [
{
"declarator": "TENANT_ID = 1L",
"modifier": "public static final",
"original_string": "public static final long TENANT_ID = 1L;",
"type": "long",
"var_name": "TENANT_ID"
},
{
"declarator": "PAGE_ID = 123l",
"modifier": "public static final",
... | {
"body": "@Test\n public void should_call_customPageService_for_custom_page_permissions_when_adding_a_page() throws Exception {\n // Given\n deleteDir(pagesDir);\n when(pageAPI.createPage(any(String.class), any(byte[].class))).thenReturn(mockedPage);\n\n // When\n pageDatastore.... | {
"fields": [
{
"declarator": "UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\"",
"modifier": "public static final",
"original_string": "public static final String UNMAPPED_ATTRIBUTE_ZIP_FILE = \"pageZip\";",
"type": "String",
"var_name": "UNMAPPED_ATTRIBUTE_ZIP_FILE"
},
{
"de... | {
"body": "@Override\n public PageItem add(final PageItem pageItem) {\n final String zipFileAttribute = pageItem.getAttributeValue(UNMAPPED_ATTRIBUTE_ZIP_FILE);\n final String[] filenames = zipFileAttribute.split(FileUploadServlet.RESPONSE_SEPARATOR);\n final String filename = filenames[0];\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_788 | {
"fields": [
{
"declarator": "userDatastore",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private UserDatastore userDatastore;",
"type": "UserDatastore",
"var_name": "userDatastore"
},
{
"declarator": "processDatastore",
"modifier": "@Mock\n ... | {
"body": "@Test\n public final void fillCounters_should_fill_number_of_failed_flow_nodes_when_counter_of_failed_flow_nodes_is_active() {\n // Given\n final APIID id = APIID.makeAPIID(78L);\n final CaseItem item = mock(CaseItem.class);\n doReturn(id).when(item).getId();\n\n final... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/cases/APICase.java",
"identifier": "APICase",
"interfaces": "implements APIHasGet<CaseItem>, APIHasAdd<CaseItem>, APIHasSearch<CaseItem>, APIHasDelete",
"methods": [
{
"class_method_signature": "APICase.defineItemDe... | {
"body": "@Override\n protected void fillCounters(final CaseItem item, final List<String> counters) {\n fillNumberOfFailedFlowNodesIfFailedCounterExists(item, counters);\n fillNumberOfPendingFlowNodesIfActiveCounterExists(item, counters);\n }",
"class_method_signature": "APICase.fillCounters(fi... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_272 | {
"fields": [
{
"declarator": "PAGE_NAME = \"pageName\"",
"modifier": "public static final",
"original_string": "public static final String PAGE_NAME = \"pageName\";",
"type": "String",
"var_name": "PAGE_NAME"
},
{
"declarator": "PROCESS_DEFINITION_ID = 123L",
"mo... | {
"body": "@Test\n public void should_getPage_by_name() throws Exception {\n // when\n pageResourceProvider.getPage(pageApi);\n\n //then\n verify(pageApi).getPageByName(PAGE_NAME);\n }",
"class_method_signature": "PageResourceProviderImplTest.should_getPage_by_name()",
"construct... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(PageResourceProviderImpl.class.getName())",
"modifier": "private static",
"original_string": "private static Logger LOGGER = Logger.getLogger(PageResourceProviderImpl.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "@Override\n public Page getPage(final PageAPI pageAPI) throws PageNotFoundException {\n if (pageId != null) {\n return pageAPI.getPage(pageId);\n }\n return pageAPI.getPageByName(getPageName());\n }",
"class_method_signature": "PageResourceProviderImpl.getPage(final ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_858 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/json/JSonSimpleDeserializerTest.java",
"identifier": "JSonSimpleDeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEmptyInput() {\n final AbstractTreeNode<String> tree = JSonSimpleDeserializer.unserializeTree(\"\");\n\n assertNull(tree);\n }",
"class_method_signature": "JSonSimpleDeserializerTest.testEmptyInput()",
"constructor": false,
"full_signature": "@Test public v... | {
"fields": [
{
"declarator": "INSTANCE = null",
"modifier": "private static",
"original_string": "private static JSonSimpleDeserializer INSTANCE = null;",
"type": "JSonSimpleDeserializer",
"var_name": "INSTANCE"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/serv... | {
"body": "public static AbstractTreeNode<String> unserializeTree(final String json) {\n\n return getInstance()._unserializeTree(json);\n }",
"class_method_signature": "JSonSimpleDeserializer.unserializeTree(final String json)",
"constructor": false,
"full_signature": "public static AbstractTreeNode<S... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_360 | {
"fields": [
{
"declarator": "LAYOUT_PAGE_NAME = \"layoutPageName\"",
"modifier": "public static final",
"original_string": "public static final String LAYOUT_PAGE_NAME = \"layoutPageName\";",
"type": "String",
"var_name": "LAYOUT_PAGE_NAME"
},
{
"declarator": "hsReque... | {
"body": "@Test\n public void should_access_Theme_resource() throws Exception {\n accessAuthorizedPage(\"HumanResources\", \"theme/css/file.css\");\n final File themeFolder = new File(\"theme\");\n final String customPageThemeName = \"custompage_theme\";\n given(applicationModel.getApp... | {
"fields": [
{
"declarator": "applicationModelFactory",
"modifier": "private final",
"original_string": "private final ApplicationModelFactory applicationModelFactory;",
"type": "ApplicationModelFactory",
"var_name": "applicationModelFactory"
},
{
"declarator": "bonita... | {
"body": "public void route(final HttpServletRequest hsRequest, final HttpServletResponse hsResponse, final APISession session, final PageRenderer pageRenderer,\n final ResourceRenderer resourceRenderer, final BonitaHomeFolderAccessor bonitaHomeFolderAccessor)\n throws CreationException, Bonita... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_730 | {
"fields": [
{
"declarator": "API_EXTENSION_POST_MAPPING_KEY = \"apiExtension|POST|myPostResource\"",
"modifier": "public static final",
"original_string": "public static final String API_EXTENSION_POST_MAPPING_KEY = \"apiExtension|POST|myPostResource\";",
"type": "String",
"var_nam... | {
"body": "@Test\n public void should_resolve_pageId() throws Exception {\n //given\n final Request request = new Request(Method.POST, \"/bonita/API/extension/myPostResource\");\n doReturn(Locale.FRENCH).when(httpServletRequest).getLocale();\n doReturn(pageReference).when(pageMappingSer... | {
"fields": [
{
"declarator": "MAPPING_KEY_SEPARATOR = \"|\"",
"modifier": "public static final",
"original_string": "public static final String MAPPING_KEY_SEPARATOR = \"|\";",
"type": "String",
"var_name": "MAPPING_KEY_SEPARATOR"
},
{
"declarator": "MAPPING_KEY_PREFIX... | {
"body": "public Long resolvePageId(APISession apiSession) throws BonitaException {\n final HttpServletRequest httpServletRequest = getHttpServletRequest();\n final PageReference pageReference;\n pageReference = pageMappingService.getPage(httpServletRequest, apiSession, generateMappingKey(), htt... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_225 | {
"fields": [
{
"declarator": "urlBuilder",
"modifier": "",
"original_string": "UrlBuilder urlBuilder;",
"type": "UrlBuilder",
"var_name": "urlBuilder"
},
{
"declarator": "specialULRCharacters = \"!'();:@&=+$,/?# \"",
"modifier": "private final static",
"ori... | {
"body": "@Test\n public void should_leave_path_unchanged2() throws Exception {\n urlBuilder = new UrlBuilder(\"http://localhost:8080/bonita%2Bsoft?param=value\");\n\n assertThat(urlBuilder.build()).isEqualTo(\"http://localhost:8080/bonita%2Bsoft?param=value\");\n }",
"class_method_signature": ... | {
"fields": [
{
"declarator": "uriBuilder",
"modifier": "private final",
"original_string": "private final URIBuilder uriBuilder;",
"type": "URIBuilder",
"var_name": "uriBuilder"
},
{
"declarator": "parameters = new LinkedList<>()",
"modifier": "private",
"o... | {
"body": "public String build() {\n if (!parameters.isEmpty()) {\n uriBuilder.setParameters(parameters);\n }\n return uriBuilder.toString();\n }",
"class_method_signature": "UrlBuilder.build()",
"constructor": false,
"full_signature": "public String build()",
"identifier": ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_675 | {
"fields": [
{
"declarator": "groupAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private GroupAPI groupAPI;",
"type": "GroupAPI",
"var_name": "groupAPI"
},
{
"declarator": "groupEngineClient",
"modifier": "private",
"original_string... | {
"body": "@Test(expected = APIException.class)\n public void getPath_throw_APIexception_if_groupId_is_not_a_number() throws Exception {\n groupEngineClient.getPath(\"notANumber\");\n }",
"class_method_signature": "GroupEngineClientTest.getPath_throw_APIexception_if_groupId_is_not_a_number()",
"const... | {
"fields": [
{
"declarator": "groupAPI",
"modifier": "private",
"original_string": "private GroupAPI groupAPI;",
"type": "GroupAPI",
"var_name": "groupAPI"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/engineclient/GroupEngineClient.java",
"identifier":... | {
"body": "public String getPath(String groupId) {\n try {\n return groupAPI.getGroup(parseId(groupId)).getPath();\n } catch (GroupNotFoundException e) {\n throw new APIException(new _(\"Unable to get group path, group not found\"));\n }\n }",
"class_method_signature": ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_419 | {
"fields": [
{
"declarator": "converter = Mockito.mock(AttributeConverter.class)",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private AttributeConverter converter = Mockito.mock(AttributeConverter.class);",
"type": "AttributeConverter",
"var_name": "converter"
... | {
"body": "@Test\n public void testFieldConvertion() {\n Mockito.doReturn(\"converted\").when(converter).convert(\"attribute\");\n Field field = new Field(\"attribute\", converter);\n\n String s = field.toString();\n\n Assert.assertEquals(\"converted\", s);\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "field",
"modifier": "private final",
"original_string": "private final String field;",
"type": "String",
"var_name": "field"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/filter/Field.java",
"identifier": "Field",... | {
"body": "@Override\n public String toString() {\n return field;\n }",
"class_method_signature": "Field.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_726 | {
"fields": [
{
"declarator": "API_EXTENSION_POST_MAPPING_KEY = \"apiExtension|POST|myPostResource\"",
"modifier": "public static final",
"original_string": "public static final String API_EXTENSION_POST_MAPPING_KEY = \"apiExtension|POST|myPostResource\";",
"type": "String",
"var_nam... | {
"body": "@Test\n public void should_get_resolve_class_file_name() throws Exception {\n //given\n final Request request = new Request(Method.GET, \"/bonita/API/extension/helloWorld\");\n final ResourceExtensionResolver resourceExtensionResolver = createSpy(request, \"/bonita/API/extension/hel... | {
"fields": [
{
"declarator": "MAPPING_KEY_SEPARATOR = \"|\"",
"modifier": "public static final",
"original_string": "public static final String MAPPING_KEY_SEPARATOR = \"|\";",
"type": "String",
"var_name": "MAPPING_KEY_SEPARATOR"
},
{
"declarator": "MAPPING_KEY_PREFIX... | {
"body": "public File resolveRestApiControllerFile(PageResourceProviderImpl pageResourceProvider) throws NotFoundException {\n final Properties properties = new Properties();\n\n try (final InputStream resourceAsStream = pageResourceProvider.getResourceAsStream(\"page.properties\");) {\n pro... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_376 | {
"fields": [
{
"declarator": "hsRequest = new MockHttpServletRequest()",
"modifier": "",
"original_string": "MockHttpServletRequest hsRequest = new MockHttpServletRequest();",
"type": "MockHttpServletRequest",
"var_name": "hsRequest"
},
{
"declarator": "hsResponse = ne... | {
"body": "@Test\n public void should_redirect_to_valide_url_on_missing_slash() throws Exception {\n String targetURL = \"/bonita/apps/AppToken/pageToken/content/\";\n doReturn(targetURL).when(hsResponse).encodeRedirectURL(targetURL);\n hsRequest.setContextPath(\"/bonita\");\n hsRequest... | {
"fields": [
{
"declarator": "RESOURCE_PATH_SEPARATOR = \"/content\"",
"modifier": "public static final",
"original_string": "public static final String RESOURCE_PATH_SEPARATOR = \"/content\";",
"type": "String",
"var_name": "RESOURCE_PATH_SEPARATOR"
},
{
"declarator":... | {
"body": "@Override\n protected void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {\n final String pathInfo = request.getPathInfo();\n final List<String> pathSegments = resourceRenderer.getPathSegments(pathInfo);\n if (isVa... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_399 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private FinderFactory factory;",
"type": "FinderFactory",
"var_name": "factory"
},
{
"declarator": "processAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n... | {
"body": "@Test\n public void should_getResourceFinderFor_return_result_of_first_handler(){\n final FinderFactory finderFactory = new FinderFactory(Collections.<Class<? extends ServerResource>,ResourceFinder>singletonMap(null, new ResourceFinder() {\n @Override\n public Serializable t... | {
"fields": [
{
"declarator": "finders",
"modifier": "protected",
"original_string": "protected Map<Class<? extends ServerResource>, ResourceFinder> finders;",
"type": "Map<Class<? extends ServerResource>, ResourceFinder>",
"var_name": "finders"
},
{
"declarator": "reso... | {
"body": "public Serializable getContextResultElement(final Serializable object) {\n final ResourceFinder resourceFinderFor = getResourceFinderFor(object);\n if (resourceFinderFor != null) {\n return resourceFinderFor.toClientObject(object);\n }\n return object;\n }",
"cla... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_663 | {
"fields": [
{
"declarator": "engine",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private IdentityAPI engine;",
"type": "IdentityAPI",
"var_name": "engine"
},
{
"declarator": "client",
"modifier": "@InjectMocks\n private",
"original... | {
"body": "@Test\n public void should_list_definitions_for_a_given_range() throws Exception {\n given(engine.getCustomUserInfoDefinitions(0, 2)).willReturn(Arrays.<CustomUserInfoDefinition>asList(\n new EngineCustomUserInfoDefinition(1L),\n new EngineCustomUserInfoDefinition(2L... | {
"fields": [
{
"declarator": "identity",
"modifier": "private",
"original_string": "private IdentityAPI identity;",
"type": "IdentityAPI",
"var_name": "identity"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/engineclient/CustomUserInfoEngineClient.java",
... | {
"body": "public List<CustomUserInfoDefinition> listDefinitions(int startIndex, int maxResult) {\n return identity.getCustomUserInfoDefinitions(startIndex, maxResult);\n }",
"class_method_signature": "CustomUserInfoEngineClient.listDefinitions(int startIndex, int maxResult)",
"constructor": false,
"f... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_233 | {
"fields": [
{
"declarator": "DATE_01_01_1970_13H_AS_LONG_GMT = 46800000L",
"modifier": "public static final",
"original_string": "public static final long DATE_01_01_1970_13H_AS_LONG_GMT = 46800000L;",
"type": "long",
"var_name": "DATE_01_01_1970_13H_AS_LONG_GMT"
},
{
... | {
"body": "@Test\n public void getProcessedInputs_with_complex_input_should_return_processed_input() throws Exception {\n final List<InputDefinition> inputDefinition = generateComplexInputDefinition();\n when(contractDefinition.getInputs()).thenReturn(inputDefinition);\n final Map<String, Seri... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(ContractTypeConverter.class.getName())",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = Logger.getLogger(ContractTypeConverter.class.getName());",
"type": "Logger",
"var_name": ... | {
"body": "public Map<String, Serializable> getProcessedInput(final ContractDefinition processContract, final Map<String, Serializable> inputs,\n final long maxSizeForTenant, final long tenantId) throws FileNotFoundException {\n this.maxSizeForTenant = maxSizeForTenant;\n this.tenantId = tena... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_819 | {
"fields": [
{
"declarator": "PROCESS_DEFINITION_ID = 4L",
"modifier": "private static final",
"original_string": "private static final long PROCESS_DEFINITION_ID = 4L;",
"type": "long",
"var_name": "PROCESS_DEFINITION_ID"
},
{
"declarator": "TEST_CONTRACT_API_URL = \"... | {
"body": "@Test(expected = APIException.class)\n public void should_throw_exception_if_attribute_is_not_found() throws Exception {\n // given:\n doReturn(null).when(processContractResource).getAttribute(anyString());\n\n // when:\n processContractResource.getContract();\n }",
"cla... | {
"fields": [
{
"declarator": "PROCESS_DEFINITION_ID = \"processDefinitionId\"",
"modifier": "private static final",
"original_string": "private static final String PROCESS_DEFINITION_ID = \"processDefinitionId\";",
"type": "String",
"var_name": "PROCESS_DEFINITION_ID"
},
{
... | {
"body": "@Get(\"json\")\n public ContractDefinition getContract() throws ProcessDefinitionNotFoundException {\n ContractDefinition processContract = processAPI.getProcessContract(getProcessDefinitionIdParameter());\n return typeConverterUtil.getAdaptedContractDefinition(processContract);\n }",
... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_321 | {
"fields": [
{
"declarator": "applicationAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ApplicationAPI applicationAPI;",
"type": "ApplicationAPI",
"var_name": "applicationAPI"
},
{
"declarator": "tenantFolder",
"modifier": "@Mock\n... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void should_importFileContent_with_invalid_policy_throw_error() throws Exception {\n spiedApplicationImportService.importFileContent(new byte[0], \"NOT_AUTHORIZED_POLICY\");\n }",
"class_method_signature": "ApplicationsImportServiceTe... | {
"fields": [
{
"declarator": "TOKEN = \"/application/import\"",
"modifier": "public final static",
"original_string": "public final static String TOKEN = \"/application/import\";",
"type": "String",
"var_name": "TOKEN"
},
{
"declarator": "FILE_UPLOAD = \"applicationsDa... | {
"body": "@Override\n public ImportStatusMessages importFileContent(final byte[] fileContent, final String importPolicyAsString) throws ExecutionException, ImportException, AlreadyExistsException, InvalidSessionException, BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException {\n final Appl... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_771 | {
"fields": [
{
"declarator": "attributeChecker",
"modifier": "private",
"original_string": "private APICaseVariableAttributeChecker attributeChecker;",
"type": "APICaseVariableAttributeChecker",
"var_name": "attributeChecker"
}
],
"file": "server/src/test/java/org/bonitasoft... | {
"body": "@Test(expected = APIException.class)\n public void should_throw_exception_when_attributes_are_null() throws Exception {\n attributeChecker.checkUpdateAttributes(null);\n }",
"class_method_signature": "APICaseVariableAttributeCheckerTest.should_throw_exception_when_attributes_are_null()",
"... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/cases/APICaseVariableAttributeChecker.java",
"identifier": "APICaseVariableAttributeChecker",
"interfaces": "",
"methods": [
{
"class_method_signature": "APICaseVariableAttributeChecker.checkUpdateAttributes(Map<Str... | {
"body": "public void checkUpdateAttributes(Map<String, String> attributes) {\n if (attributes == null || attributes.isEmpty()) {\n throw new APIException(format(\"Attributes '%s' and '%s' must be specified\", CaseVariableItem.ATTRIBUTE_TYPE, CaseVariableItem.ATTRIBUTE_VALUE));\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
11337147_264 | {
"fields": [
{
"declarator": "PAGE_ID = 42L",
"modifier": "public static final",
"original_string": "public static final long PAGE_ID = 42L;",
"type": "long",
"var_name": "PAGE_ID"
},
{
"declarator": "pageRenderer",
"modifier": "@Mock",
"original_string": "... | {
"body": "@Test\n public void should_redirect_for_missing_slash() throws Exception {\n when(hsRequest.getPathInfo()).thenReturn(\"/process/processName/processVersion/content\");\n when(hsRequest.getContextPath()).thenReturn(\"/bonita\");\n when(hsRequest.getServletPath()).thenReturn(\"/portal... | {
"fields": [
{
"declarator": "serialVersionUID = 2789496969243916444L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 2789496969243916444L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOGGE... | {
"body": "@Override\n protected void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {\n final String pathInfo = request.getPathInfo();\n\n if (!pathInfo.contains(RESOURCE_PATH_SEPARATOR + \"/\") && pathInfo.indexOf(API_PATH_SEPARATO... | {
"created": null,
"fork": null,
"fork_count": 45,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 11337147,
"size": 98566,
"stargazer_count": 19,
"stars": null,
"updates": null,
"url": "https://github.com/bonitasoft/bonita-web"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.