id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
11337147_634 | {
"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_null_when_null_page_is_given() {\n //given\n final Page nullPage = null;\n //when\n final PageItem testPageItem = pageDatastore.convertEngineToConsoleItem(nullPage);\n //then\n assertThat(testPageItem)... | {
"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_458 | {
"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_updatedBy_on_convert_attribute_updatedBy() throws Exception {\n //when\n final String value = converter.convert(ApplicationItem.ATTRIBUTE_UPDATED_BY);\n\n //then\n assertThat(value).isEqualTo(ApplicationSearchDescr... | {
"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_585 | {
"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 testTotalCanBeRetrieved() {\n when(result.getCount()).thenReturn(5L);\n\n ItemSearchResultConverter<IItem, String> itemSearchResult = new ItemSearchResultConverter<IItem, String>(3, 2, result, converter);\n\n assertEquals(5L, itemSearchResult.toItemSearchResult()... | {
"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_839 | {
"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 search_should_retrieve_the_list_of_item_from_the_specified_range() throws Exception {\n given(engine.listDefinitions(4, 2)).willReturn(Arrays.<CustomUserInfoDefinition> asList(\n new EngineCustomUserInfoDefinition(3L),\n new EngineCustomUserInfoDe... | {
"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 ItemSearchResult<CustomUserInfoDefinitionItem> search(\n final int page,\n final int resultsByPage,\n final String search,\n final String orders,\n final Map<String, String> filters) {\n\n check(search == null, new _(\"Search terms are no... | {
"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_643 | {
"fields": [
{
"declarator": "profileAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ProfileAPI profileAPI;",
"type": "ProfileAPI",
"var_name": "profileAPI"
},
{
"declarator": "engineClient",
"modifier": "private",
"original_s... | {
"body": "@Test(expected = APIException.class)\n public void searchProfileEntries_call_engine_and_raise_Search_Exception_because_of_invalid_options() throws SearchException {\n SearchOptions searchOptions = new SearchOptionsBuilder(-1, 10).done();\n \n doThrow(new APIException(\"Search option... | {
"fields": [
{
"declarator": "profileApi",
"modifier": "private final",
"original_string": "private final ProfileAPI profileApi;",
"type": "ProfileAPI",
"var_name": "profileApi"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/engineclient/ProfileEntryEngine... | {
"body": "public SearchResult<ProfileEntry> searchProfiles(final SearchOptions options) {\n try {\n return profileApi.searchProfileEntries(options);\n } catch (final InvalidSessionException e) {\n throw new APISessionInvalidException(e);\n } catch (final SearchException e) ... | {
"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_213 | {
"fields": [
{
"declarator": "tempFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder tempFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "tempFolder"
},
{
"declarator": "fileU... | {
"body": "@Test\n public void should_set_413_status_code_with_empty_body_when_file_is_too_big() throws Exception {\n final ServletFileUpload serviceFileUpload = mock(ServletFileUpload.class);\n final HttpServletResponse response = mock(HttpServletResponse.class);\n final PrintWriter printer =... | {
"fields": [
{
"declarator": "serialVersionUID = 58370675886169565L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 58370675886169565L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "server/src/main/java/... | {
"body": "@Override\n protected void defineUploadDirectoryPath(final HttpServletRequest request) {\n final long tenantId = getAPISession(request).getTenantId();\n setUploadDirectoryPath(WebBonitaConstantsUtils.getInstance(tenantId).getTempFolder().getPath());\n }",
"class_method_signature": "Te... | {
"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_706 | {
"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 search_should_return_the_result_of_dataStore_search() throws Exception {\n //given\n @SuppressWarnings(\"unchecked\")\n final ItemSearchResult<ApplicationItem> result = mock(ItemSearchResult.class);\n given(dataStore.search(0, 10, \"request\", \"default\",... | {
"fields": [
{
"declarator": "creator",
"modifier": "private final",
"original_string": "private final ApplicationDataStoreCreator creator;",
"type": "ApplicationDataStoreCreator",
"var_name": "creator"
},
{
"declarator": "applicationDataStoreFactory",
"modifier"... | {
"body": "@Override\n public ItemSearchResult<ApplicationItem> search(final int page, final int resultsByPage, final String search, final String orders,\n final Map<String, String> filters) {\n return creator.create(getEngineSession()).search(page, resultsByPage, search, orders, filters);\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_356 | {
"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_redirect_to_home_page_with_query_parameters() throws Exception {\n given(applicationModel.getApplicationHomePage()).willReturn(\"home/\");\n given(applicationModel.getApplicationLayoutName()).willReturn(LAYOUT_PAGE_NAME);\n given(applicationModel.hasProfil... | {
"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_182 | {
"fields": [
{
"declarator": "req",
"modifier": "@Mock",
"original_string": "@Mock\n HttpServletRequest req;",
"type": "HttpServletRequest",
"var_name": "req"
},
{
"declarator": "resp",
"modifier": "@Mock",
"original_string": "@Mock\n HttpServletRespo... | {
"body": "@Test\n public void testPasswordIsDroppedWhenParameterIsBeforeHash() throws Exception {\n final LoginServlet servlet = new LoginServlet();\n\n final String cleanQueryString = servlet.dropPassword(\"?username=walter.bates&password=bpm#hash\");\n\n assertThat(cleanQueryString, is(\"?u... | {
"fields": [
{
"declarator": "serialVersionUID = -5326931127638029215L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -5326931127638029215L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOG... | {
"body": "public String dropPassword(final String content) {\n String tmp = content;\n if (content != null && content.contains(\"password\")) {\n tmp = tmp.replaceAll(\"[&]?password=([^&|#]*)?\", \"\");\n }\n return tmp;\n }",
"class_method_signature": "LoginServlet.dropPa... | {
"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_478 | {
"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_the_ApplicationMenu_supplied_by_the_engine_converted_to_item_on_get() throws Exception {\n //given\n final ApplicationMenuItem itemToCreate = new ApplicationMenuItem();\n final ApplicationMenuImpl applicationMenu = new ApplicationMenuImpl(\"firstMen... | {
"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 get(final APIID id) {\n try {\n final ApplicationMenu applicationMenu = applicationAPI.getApplicationMenu(id.toLong());\n return converter.toApplicationMenuItem(applicationMenu);\n } catch (final Exception e) {\n throw... | {
"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_881 | {
"fields": [
{
"declarator": "converter",
"modifier": "private",
"original_string": "private LongConverter converter;",
"type": "LongConverter",
"var_name": "converter"
}
],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/utils/converter/typed/LongConv... | {
"body": "@Test(expected = ConversionException.class)\n public void nonParsableStringThrowAConversionException() throws Exception {\n converter.convert(\"nonParsable\");\n }",
"class_method_signature": "LongConverterTest.nonParsableStringThrowAConversionException()",
"constructor": false,
"full_si... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/framework/utils/converter/typed/LongConverter.java",
"identifier": "LongConverter",
"interfaces": "implements Converter<Long>",
"methods": [
{
"class_method_signature": "LongConverter.convert(String toBeConverted)",
"... | {
"body": "@Override\n public Long convert(String toBeConverted) throws ConversionException {\n if (toBeConverted == null || toBeConverted.isEmpty()) {\n return null;\n }\n try {\n return Long.parseLong(toBeConverted);\n } catch (NumberFormatException e) {\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_83 | {
"fields": [
{
"declarator": "TENANT_ID = 12L",
"modifier": "public static final",
"original_string": "public static final long TENANT_ID = 12L;",
"type": "long",
"var_name": "TENANT_ID"
},
{
"declarator": "COMPOUND_PERMISSIONS_MAPPING_FILE = \"compound.properties\"",
... | {
"body": "@Test\n public void should_getProperty_return_the_right_custom_permissions() throws Exception {\n\n final ConfigurationFile tenantProperties = new ConfigurationFile(CUSTOM_PERMISSIONS_MAPPING_FILE, TENANT_ID);\n\n final String customValue = tenantProperties.getProperty(\"profile|User\");\n... | {
"fields": [
{
"declarator": "propertiesFilename",
"modifier": "private final",
"original_string": "private final String propertiesFilename;",
"type": "String",
"var_name": "propertiesFilename"
},
{
"declarator": "tenantId",
"modifier": "private final",
"or... | {
"body": "public String getProperty(final String propertyName) {\n return getPropertiesOfScope().getProperty(propertyName);\n }",
"class_method_signature": "ConfigurationFile.getProperty(final String propertyName)",
"constructor": false,
"full_signature": "public String getProperty(final String prope... | {
"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_497 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/profile/ProfileSearchDescriptorConverterTest.java",
"identifier": "ProfileSearchDescriptorConverterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWeCanConvertTheProfileName() throws Exception {\n String descriptor = new ProfileSearchDescriptorConverter().convert(ProfileItem.ATTRIBUTE_NAME);\n\n assertEquals(ProfileSearchDescriptor.NAME, descriptor);\n }",
"class_method_signature": "ProfileSearchDescripto... | {
"fields": [
{
"declarator": "mapping = new HashMap<>()",
"modifier": "private static final",
"original_string": "private static final Map<String, String> mapping = new HashMap<>();",
"type": "Map<String, String>",
"var_name": "mapping"
}
],
"file": "server/src/main/java/org... | {
"body": "@Override\n public String convert(String attribute) {\n String descriptor = mapping.get(attribute);\n if (descriptor == null) {\n throw new RuntimeException(attribute + \" has no valid search descriptor\");\n }\n return descriptor;\n }",
"class_method_signatur... | {
"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_244 | {
"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_ignore_extra_characters_in_String_for_LocalDates() {\n ContractTypeConverter converter = new ContractTypeConverter(ISO_8601_DATE_PATTERNS);\n\n final Object localDateString = converter.convertToType(Type.LOCALDATE, \"1987-12-12T10:00:00\");\n\n ... | {
"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_614 | {
"fields": [
{
"declarator": "customPageContentValidator",
"modifier": "private",
"original_string": "private CustomPageContentValidator customPageContentValidator;",
"type": "CustomPageContentValidator",
"var_name": "customPageContentValidator"
},
{
"declarator": "exp... | {
"body": "@Test\n public void should_throw_exception_when_theme_css_not_found() throws Exception {\n final File invalidThemePage = new File(getClass().getResource(\"/invalidThemePage\").toURI());\n \n expectedException.expect(InvalidPageZipContentException.class);\n expectedException.e... | {
"fields": [
{
"declarator": "INDEX_GROOVY = \"Index.groovy\"",
"modifier": "private static final",
"original_string": "private static final String INDEX_GROOVY = \"Index.groovy\";",
"type": "String",
"var_name": "INDEX_GROOVY"
},
{
"declarator": "INDEX_HTML = \"index.... | {
"body": "public void validate(File pageFolder) throws InvalidPageZipContentException {\n final File[] rootFiles = pageFolder.listFiles();\n if (rootFiles == null) {\n throw new InvalidPageZipContentException(\n \"Content not found.\");\n }\n Properties pageP... | {
"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_301 | {
"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_get_Forbidden_Status_when_page_unAuthorize() throws Exception {\n hsRequest.setPathInfo(\"/pageToken/\");\n hsRequest.setParameter(\"applicationId\", \"1\");\n given(resourceRenderer.getPathSegments(\"/pageToken/\")).willReturn(Arrays.asList(\"pageToken\")... | {
"fields": [
{
"declarator": "APP_TOKEN_PARAM = \"appToken\"",
"modifier": "public static final",
"original_string": "public static final String APP_TOKEN_PARAM = \"appToken\";",
"type": "String",
"var_name": "APP_TOKEN_PARAM"
},
{
"declarator": "serialVersionUID = -54... | {
"body": "@Override\n protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {\n /*\n * Check if requested URL is missing last slash, like \"custom-page/page-name\".\n * If missing, redirect to \"custom-page/page-name/... | {
"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_751 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock",
"original_string": "@Mock\n ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "restResource",
"modifier": "private",
"original_string": "private BPMM... | {
"body": "@Test\n public void sendMessage_should_throw_exception_if_targetProcess_is_not_set() {\n // given:\n final BPMMessage bpmMessage = new BPMMessage();\n bpmMessage.setMessageName(\"my msg\");\n bpmMessage.setTargetFlowNode(\"activity\");\n\n // then:\n expectedExc... | {
"fields": [
{
"declarator": "SUPPORTED_TYPES = new HashSet<>()",
"modifier": "private static final",
"original_string": "private static final Set<String> SUPPORTED_TYPES = new HashSet<>();",
"type": "Set<String>",
"var_name": "SUPPORTED_TYPES"
},
{
"declarator": "proc... | {
"body": "@Post(\"json\")\n public void sendMessage(BPMMessage message) {\n validateMandatoryAttributes(message);\n try {\n Map<Expression, Expression> msgContent = new HashMap<>();\n if (message.getMessageContent() != null) {\n for (Map.Entry<String, BPMMessageV... | {
"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_897 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private ConverterFactory factory;",
"type": "ConverterFactory",
"var_name": "factory"
}
],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/utils/converter/ConverterFacto... | {
"body": "@Test\n @Ignore(\"until ENGINE-1099 is resolved\")\n public void factoryCreateADateConverterForDateClassName() throws Exception {\n \n Converter<?> createConverter = factory.createConverter(Date.class.getName());\n \n assertTrue(createConverter instanceof DateConverter);\n... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/framework/utils/converter/ConverterFactory.java",
"identifier": "ConverterFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "ConverterFactory.createConverter(String className)",
"constructor": false... | {
"body": "public Converter<?> createConverter(String className) {\n if (isClass(String.class, className)) {\n return new StringConverter();\n } else if (isClass(Date.class, className)) {\n return new DateConverter();\n } else if (isClass(Double.class, className)) {\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_194 | {
"fields": [
{
"declarator": "urlProtecter = new URLProtector()",
"modifier": "",
"original_string": "URLProtector urlProtecter = new URLProtector();",
"type": "URLProtector",
"var_name": "urlProtecter"
}
],
"file": "server/src/test/java/org/bonitasoft/console/common/server/... | {
"body": "@Test\n public void it_should_filter_capital_letters(){\n assertEquals(\":.google.com\", urlProtecter.protectRedirectUrl(\"HTTPS://WWW.google.com\"));\n }",
"class_method_signature": "URLProtectorTest.it_should_filter_capital_letters()",
"constructor": false,
"full_signature": "@Test pub... | {
"fields": [
{
"declarator": "tokens = Arrays.asList(\"https\", \"http\", \"www\", \"HTTPS\", \"HTTP\", \"WWW\", \"//\")",
"modifier": "protected",
"original_string": "protected List<String> tokens = Arrays.asList(\"https\", \"http\", \"www\", \"HTTPS\", \"HTTP\", \"WWW\", \"//\");",
"typ... | {
"body": "public String protectRedirectUrl(String redirectUrl) {\n if (redirectUrl != null && !redirectUrl.startsWith(\"portal\")) {\n return removeTokenFromUrl(redirectUrl, new ArrayList<String>(tokens));\n }\n return redirectUrl;\n }",
"class_method_signature": "URLProtector.pr... | {
"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_481 | {
"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(expected = APIException.class)\n public void should_throw_APIException_on_delete_when_engine_throws_exception() throws Exception {\n doThrow(new DeletionException(\"\")).when(applicationAPI).deleteApplicationMenu(1);\n\n //when\n dataStore.delete(Arrays.<APIID> asList(APIID.ma... | {
"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 void delete(final List<APIID> ids) {\n try {\n for (final APIID id : ids) {\n applicationAPI.deleteApplicationMenu(id.toLong());\n }\n } catch (final Exception e) {\n throw new APIException(e);\n }\n }",
"class_... | {
"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_95 | {
"fields": [],
"file": "common/src/test/java/org/bonitasoft/web/toolkit/client/common/json/JSonSerializerTest.java",
"identifier": "JSonSerializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void should_serialize_only_first_cause_of_an_exception() throws Exception {\n Exception exception = new Exception(\"first one\", new Exception(\"second one\", new Exception(\"third one\")));\n\n String serialize = JSonSerializer.serialize(exception);\n\n assertThat(se... | {
"fields": [],
"file": "common/src/main/java/org/bonitasoft/web/toolkit/client/common/json/JSonSerializer.java",
"identifier": "JSonSerializer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JSonSerializer.serialize(final JsonSerializable object)",
"constructor": false,
"f... | {
"body": "public static String serialize(final JsonSerializable object) {\n return serializeInternal(object).toString();\n }",
"class_method_signature": "JSonSerializer.serialize(final JsonSerializable object)",
"constructor": false,
"full_signature": "public static String serialize(final JsonSeriali... | {
"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_878 | {
"fields": [
{
"declarator": "converter",
"modifier": "private",
"original_string": "private LongConverter converter;",
"type": "LongConverter",
"var_name": "converter"
}
],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/framework/utils/converter/typed/LongConv... | {
"body": "@Test\n public void nullIsConvertedToNull() throws Exception {\n\n Long converted = converter.convert(null);\n\n assertNull(converted);\n }",
"class_method_signature": "LongConverterTest.nullIsConvertedToNull()",
"constructor": false,
"full_signature": "@Test public void nullIsCon... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/framework/utils/converter/typed/LongConverter.java",
"identifier": "LongConverter",
"interfaces": "implements Converter<Long>",
"methods": [
{
"class_method_signature": "LongConverter.convert(String toBeConverted)",
"... | {
"body": "@Override\n public Long convert(String toBeConverted) throws ConversionException {\n if (toBeConverted == null || toBeConverted.isEmpty()) {\n return null;\n }\n try {\n return Long.parseLong(toBeConverted);\n } catch (NumberFormatException e) {\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_602 | {
"fields": [
{
"declarator": "converter",
"modifier": "private",
"original_string": "private UserSearchAttributeConverter converter;",
"type": "UserSearchAttributeConverter",
"var_name": "converter"
}
],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/... | {
"body": "@Test\n public void convertFistName() throws Exception {\n String convert = converter.convert(UserItem.ATTRIBUTE_FIRSTNAME);\n\n assertEquals(UserSearchDescriptor.FIRST_NAME, convert);\n }",
"class_method_signature": "UserSearchAttributeConverterTest.convertFistName()",
"constructor... | {
"fields": [
{
"declarator": "mapping = new HashMap<>()",
"modifier": "protected static",
"original_string": "protected static Map<String, String> mapping = new HashMap<>();",
"type": "Map<String, String>",
"var_name": "mapping"
},
{
"declarator": "valueTypeMapping = n... | {
"body": "@Override\n public String convert(final String attribute) {\n return mapping.get(attribute);\n }",
"class_method_signature": "UserSearchAttributeConverter.convert(final String attribute)",
"constructor": false,
"full_signature": "@Override public String convert(final String attribute)",
... | {
"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_252 | {
"fields": [
{
"declarator": "request",
"modifier": "private",
"original_string": "private MockHttpServletRequest request;",
"type": "MockHttpServletRequest",
"var_name": "request"
},
{
"declarator": "requestAccessor",
"modifier": "private",
"original_strin... | {
"body": "@Test\n public void testGetSimpleLoginpageURL() throws Exception {\n String redirectUrl = \"%2Fportal%2Fhomepage\";\n\n String loginURL = standardLoginManagerImpl.getLoginPageURL(requestAccessor, redirectUrl);\n\n assertThat(loginURL).isEqualToIgnoringCase(\"bonita/login.jsp?tenant=... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(StandardAuthenticationManagerImpl.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(StandardAuthenticationManagerImpl.class.getName());",
"type": "Logger"... | {
"body": "@Override\n public String getLoginPageURL(final HttpServletRequestAccessor request, final String redirectURL) throws ServletException {\n final StringBuilder url = new StringBuilder();\n String context = request.asHttpServletRequest().getContextPath();\n final String servletPath = r... | {
"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_747 | {
"fields": [
{
"declarator": "dataStoreFactory",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private APIApplicationDataStoreFactory dataStoreFactory;",
"type": "APIApplicationDataStoreFactory",
"var_name": "dataStoreFactory"
},
{
"declarator": "app... | {
"body": "@Test\n public void should_fill_page_deploy_when_requested() {\n final ApplicationPageItem applicationPage = new ApplicationPageItem();\n applicationPage.setPageId(2L);\n final PageItem customPage = new PageItem();\n customPage.setContentName(\"bar\");\n given(pageData... | {
"fields": [
{
"declarator": "factory",
"modifier": "private final",
"original_string": "private final APIApplicationDataStoreFactory factory;",
"type": "APIApplicationDataStoreFactory",
"var_name": "factory"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/... | {
"body": "@Override\n protected void fillDeploys(final ApplicationPageItem item, final List<String> deploys) {\n addDeployer(new PageDeployer(\n factory.createPageDataStore(getEngineSession()), ApplicationPageItem.ATTRIBUTE_PAGE_ID));\n addDeployer(new ApplicationDeployer(\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_317 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/console/server/ConsoleServiceFactoryTest.java",
"identifier": "ConsoleServiceFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getService_should_return_ProcessActorImportService_when_bpm_process_importActors() throws Exception {\n // Given\n ConsoleServiceFactory consoleServiceFacotry = new ConsoleServiceFactory();\n \n // When\n Service service = consoleServiceFacotry.getS... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/console/server/ConsoleServiceFactory.java",
"identifier": "ConsoleServiceFactory",
"interfaces": "implements ServiceFactory",
"methods": [
{
"class_method_signature": "ConsoleServiceFactory.getService(final String calledToolToken)",
... | {
"body": "@Override\n public Service getService(final String calledToolToken) {\n if (OrganizationImportService.TOKEN.equals(calledToolToken)) {\n return new OrganizationImportService();\n } else if (ProcessActorImportService.TOKEN.equals(calledToolToken)) {\n return new Proces... | {
"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_439 | {
"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_on_delete_when_engine_throws_exception() throws Exception {\n doThrow(new DeletionException(\"\")).when(applicationAPI).deleteApplication(1);\n\n //when\n dataStore.delete(Arrays.<APIID> asList(APIID.makeAP... | {
"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 void delete(final List<APIID> ids) {\n try {\n for(final APIID id :ids){\n applicationAPI.deleteApplication(id.toLong());\n }\n } catch (final Exception e) {\n throw new APIException(e);\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_593 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/converter/LongValueConverterTest.java",
"identifier": "LongValueConverterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NumberFormatException.class)\n public void testStringConvertionThrowsExceptio() throws Exception {\n new LongValueConverter().convert(\"abc\");\n }",
"class_method_signature": "LongValueConverterTest.testStringConvertionThrowsExceptio()",
"constructor": false,
"full_sign... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/converter/LongValueConverter.java",
"identifier": "LongValueConverter",
"interfaces": "implements ValueConverter<Long>",
"methods": [
{
"class_method_signature": "LongValueConverter.convert(String value)",
"... | {
"body": "@Override\n public Long convert(String value) {\n return Long.valueOf(value);\n }",
"class_method_signature": "LongValueConverter.convert(String value)",
"constructor": false,
"full_signature": "@Override public Long convert(String value)",
"identifier": "convert",
"invocations": [
... | {
"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_205 | {
"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_set_normal_headers_when_user_agent_is_not_firefox() throws Exception {\n havingIcon(ICON_ID, \"content\".getBytes());\n httpServletRequest.addHeader(\"User-Agent\", \"Chrome-1238941\");\n httpServletRequest.setPathInfo(\"/\" + String.valueOf(ICON_ID));\n\n... | {
"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_655 | {
"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 deleteProcessInstancesByBunch_delete_archived_processes_instances_by_bunch() throws Exception {\n when(processAPI.deleteProcessInstances(1L, 0, BUNCH_SIZE))\n .thenReturn(BUNCH_SIZE.longValue(), BUNCH_SIZE.longValue(), 0L);\n\n final List<Long> processLis... | {
"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 void deleteProcessInstancesByBunch(final long processId, final int bunchSize, final List<Long> processesAllowedToBeDeletedIds)\n throws DeletionException, ProcessDefinitionNotFoundException {\n long numberOfDeletedProcessInstances = 0;\n do {\n try {\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_340 | {
"fields": [
{
"declarator": "applicationApi",
"modifier": "@Mock",
"original_string": "@Mock\n ApplicationAPI applicationApi;",
"type": "ApplicationAPI",
"var_name": "applicationApi"
},
{
"declarator": "pageApi",
"modifier": "@Mock",
"original_string": ... | {
"body": "@Test\n public void should_sort_application_menu_search() throws Exception {\n givenSearchApplicationMenusWillReturns(Collections.<ApplicationMenu> emptyList());\n\n model.getMenuList();\n final ArgumentCaptor<SearchOptions> captor = ArgumentCaptor.forClass(SearchOptions.class);\n ... | {
"fields": [
{
"declarator": "profileApi",
"modifier": "private final",
"original_string": "private final ProfileAPI profileApi;",
"type": "ProfileAPI",
"var_name": "profileApi"
},
{
"declarator": "applicationApi",
"modifier": "private final",
"original_str... | {
"body": "public List<Menu> getMenuList() throws SearchException, ApplicationPageNotFoundException {\n return factory.create(applicationApi.searchApplicationMenus(new SearchOptionsBuilder(0, Integer.MAX_VALUE)\n .filter(ApplicationMenuSearchDescriptor.APPLICATION_ID, application.getId())\n .sort... | {
"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_710 | {
"fields": [
{
"declarator": "fakeService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FakeService fakeService;",
"type": "FakeService",
"var_name": "fakeService"
},
{
"declarator": "headers = new Series<>(Header.class)",
"modifier":... | {
"body": "@Test(expected = APIException.class)\n public void nullMandatoryParameterIsForbidden() throws Exception {\n new CommonResource().verifyNotNullParameter(null, \"unused\");\n }",
"class_method_signature": "CommonResourceTest.nullMandatoryParameterIsForbidden()",
"constructor": false,
"full... | {
"fields": [
{
"declarator": "sessionSingleton = null",
"modifier": "private",
"original_string": "private APISession sessionSingleton = null;",
"type": "APISession",
"var_name": "sessionSingleton"
},
{
"declarator": "LOGGER = Logger.getLogger(CommonResource.class.getN... | {
"body": "protected void verifyNotNullParameter(final Object parameter, final String parameterName) throws APIException {\n if (parameter == null) {\n throw new APIException(\"Parameter \" + parameterName + \" is mandatory.\");\n }\n }",
"class_method_signature": "CommonResource.verifyN... | {
"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_854 | {
"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(expected = APIException.class)\n public void should_fail_when_passing_a_term_to_the_search() {\n api.search(0, 2, \"foo\", \"Fix order\", Collections.singletonMap(\"userId\", \"3\")).getResults();\n }",
"class_method_signature": "APICustomUserInfoUserTest.should_fail_when_passing_a_ter... | {
"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": "engineClientCreator",
"modifier"... | {
"body": "@Override\n public ItemSearchResult<CustomUserInfoItem> search(int page, int resultsByPage, String search, String orders, Map<String, String> filters) {\n check(containsOnly(FILTER_USER_ID, filters), new _(\"The only mandatory filter is %name%\", new Arg(\"name\", FILTER_USER_ID)));\n chec... | {
"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_507 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/datastore/profile/entry/ProfileEntrySearchDescriptorConverterTest.java",
"identifier": "ProfileEntrySearchDescriptorConverterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWeCanConvertTheProfileEntryParentId() throws Exception {\n String descriptor = new ProfileEntrySearchDescriptorConverter()\n .convert(ProfileEntryItem.ATTRIBUTE_PROFILE_ID);\n\n assertEquals(ProfileEntrySearchDescriptor.PROFILE_ID, descriptor);\n }... | {
"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/profile/entr... | {
"body": "@Override\n public String convert(String attribute) {\n return MapUtil.getMandatory(mapping, attribute);\n }",
"class_method_signature": "ProfileEntrySearchDescriptorConverter.convert(String attribute)",
"constructor": false,
"full_signature": "@Override public String convert(String attr... | {
"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_157 | {
"fields": [
{
"declarator": "resourcesPermissionsMapping",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ResourcesPermissionsMapping resourcesPermissionsMapping;",
"type": "ResourcesPermissionsMapping",
"var_name": "resourcesPermissionsMapping"
},
... | {
"body": "@Test\n public void should_checkValidCondition_check_unauthorized_if_no_tenant_session() throws ServletException {\n doReturn(null).when(httpSession).getAttribute(SessionUtil.API_SESSION_PARAM_KEY);\n doReturn(\"API/bpm/case/15\").when(request).getRequestURI();\n //when\n fin... | {
"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": "@Override\n protected boolean checkValidCondition(final HttpServletRequest httpRequest, final HttpServletResponse httpResponse) throws ServletException {\n try {\n if (httpRequest.getRequestURI().matches(PLATFORM_API_URI_REGEXP)) {\n return platformAPIsCheck(httpRequest,... | {
"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_442 | {
"fields": [
{
"declarator": "STATE = ApplicationState.DEACTIVATED.name()",
"modifier": "private static final",
"original_string": "private static final String STATE = ApplicationState.DEACTIVATED.name();",
"type": "String",
"var_name": "STATE"
},
{
"declarator": "UPDA... | {
"body": "@Test\n public void applicationItem_with_null_homepage_id_should_not_return_null() throws Exception {\n //given\n final ApplicationImpl application = new ApplicationImpl(DISPLAY_NAME, VERSION, DESCRIPTION, LAYOUT_ID, THEME_ID);\n application.setId(15);\n application.setDispla... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/application/ApplicationItemConverter.java",
"identifier": "ApplicationItemConverter",
"interfaces": "",
"methods": [
{
"class_method_signature": "ApplicationItemConverter.toApplicationItem(final Application applic... | {
"body": "public ApplicationItem toApplicationItem(final Application application) {\n final ApplicationItem item = new ApplicationItem();\n item.setId(application.getId());\n item.setToken(application.getToken());\n item.setDisplayName(application.getDisplayName());\n item.setVersi... | {
"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_56 | {
"fields": [
{
"declarator": "testDirectory = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder testDirectory = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "testDirectory"
},
{
"declarator... | {
"body": "@Test\n public void should_return_zip_as_byte_array() throws Exception {\n final byte[] content = createStyleFiles(\"bonita.css\");\n final ThemeArchive themeArchive = new ThemeArchive(content);\n\n assertThat(themeArchive.asByteArray()).isEqualTo(content);\n }",
"class_method_... | {
"fields": [
{
"declarator": "zippedTheme",
"modifier": "private",
"original_string": "private byte[] zippedTheme;",
"type": "byte[]",
"var_name": "zippedTheme"
}
],
"file": "common/src/main/java/org/bonitasoft/console/common/server/themes/ThemeArchive.java",
"identifier":... | {
"body": "public byte[] asByteArray() {\n checkZippedThemeIsSet();\n return zippedTheme;\n }",
"class_method_signature": "ThemeArchive.asByteArray()",
"constructor": false,
"full_signature": "public byte[] asByteArray()",
"identifier": "asByteArray",
"invocations": [
"checkZippedThemeI... | {
"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_291 | {
"fields": [
{
"declarator": "PAGE_NO_API_EXTENSION_PROPERTIES = \"pageNoApiExtension.properties\"",
"modifier": "public static final",
"original_string": "public static final String PAGE_NO_API_EXTENSION_PROPERTIES = \"pageNoApiExtension.properties\";",
"type": "String",
"var_name"... | {
"body": "@Test\n public void should_not_return_it_when_unkown_resource_is_declared_in_PageProperties_and_flag_false() throws Exception {\n // Given\n final String fileContent = \"name=customPage1\\n\" +\n \"resources=[GET|unkown/resource, PUT|identity/user]\";\n\n final File p... | {
"fields": [
{
"declarator": "PAGE_PROPERTIES = \"page.properties\"",
"modifier": "private static final",
"original_string": "private static final String PAGE_PROPERTIES = \"page.properties\";",
"type": "String",
"var_name": "PAGE_PROPERTIES"
},
{
"declarator": "GET_SY... | {
"body": "public Set<String> getCustomPagePermissions(final Properties pageProperties,\n final ResourcesPermissionsMapping resourcesPermissionsMapping,\n final boolean alsoReturnResourcesNotFound) {\n final PropertiesWithSet pagePropertiesWithSet = new PropertiesWithSet(pageProperties);\... | {
"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_784 | {
"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(expected = APIException.class)\n public final void search_should_throw_exception_when_team_manager_and_supervisor_filters_are_used_together() {\n final int page = 6;\n final int resultsByPage = 10;\n final String search = \"plop\";\n final String orders = CaseItem.ATTRI... | {
"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 public ItemSearchResult<CaseItem> search(final int page, final int resultsByPage, final String search, final String orders,\n final Map<String, String> filters) {\n // Check that team manager and supervisor filters are not used together\n if (filters.containsKey(Case... | {
"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_100 | {
"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_action_not_watched() throws Exception {\n final String jsonMessage = \"{\\\"message\\\":\\\"error\\\",\\\"action\\\":\\\"\\\"}\";\n customPostMessageEventListener.setActionToWatch(\"Start process\");\n\n customPostMessag... | {
"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_550 | {
"fields": [
{
"declarator": "documentDatastore",
"modifier": "private",
"original_string": "private CaseDocumentDatastore documentDatastore;",
"type": "CaseDocumentDatastore",
"var_name": "documentDatastore"
},
{
"declarator": "constantsValue",
"modifier": "@Moc... | {
"body": "@Test\n public void it_should_create_documentvalue_with_given_filename() throws DocumentException, IOException {\n final URL docUrl = getClass().getResource(\"/doc.jpg\");\n when(tenantFolder.getTempFile(docUrl.getPath(), 1L)).thenReturn(new File(docUrl.getPath()));\n\n // When\n ... | {
"fields": [
{
"declarator": "constants",
"modifier": "protected final",
"original_string": "protected final WebBonitaConstantsUtils constants;",
"type": "WebBonitaConstantsUtils",
"var_name": "constants"
},
{
"declarator": "processAPI",
"modifier": "protected fi... | {
"body": "protected DocumentValue buildDocumentValueFromUploadPath(final String uploadPath, final int index, String fileName)\n throws DocumentException, IOException {\n\n String mimeType = null;\n byte[] fileContent = null;\n\n if (uploadPath != null) {\n final File theSou... | {
"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_803 | {
"fields": [],
"file": "server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/flownode/APIActivityTest.java",
"identifier": "APIActivityTest",
"interfaces": "",
"superclass": "extends APITestWithMock"
} | {
"body": "@Test\n public void should_have_default_search_order() throws Exception {\n final APIActivity apiActivity = new APIActivity();\n\n final String defineDefaultSearchOrder = apiActivity.defineDefaultSearchOrder();\n\n assertThat(defineDefaultSearchOrder).as(\"sould have a default searc... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/flownode/APIActivity.java",
"identifier": "APIActivity",
"interfaces": "",
"methods": [
{
"class_method_signature": "APIActivity.defineDefaultSearchOrder()",
"constructor": false,
"full_signature": "@Ove... | {
"body": "@Override\n public String defineDefaultSearchOrder() {\n return ActivityInstanceSearchDescriptor.STATE_NAME + ISearchDirection.SORT_ORDER_ASCENDING;\n }",
"class_method_signature": "APIActivity.defineDefaultSearchOrder()",
"constructor": false,
"full_signature": "@Override public String ... | {
"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_415 | {
"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_greater_than_filter_when_is_applicable() {\n // given:\n final String filterName = \"someFilterKey\";\n final String engineAttributeName = \"EngineNumericKey\";\n final Map<String, String> filters = new HashMap<Strin... | {
"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_696 | {
"fields": [
{
"declarator": "businessDataModelResource",
"modifier": "protected",
"original_string": "protected BusinessDataModelResource businessDataModelResource;",
"type": "BusinessDataModelResource",
"var_name": "businessDataModelResource"
},
{
"declarator": "tena... | {
"body": "@Test\n public void uninstall_should_throw_APIException_if_error_occurs() throws Exception {\n final File bdmFile = testBDMFile();\n final BusinessDataModelItem item = new BusinessDataModelItem();\n item.setFileUpload(bdmFile.getName());\n doReturn(bdmFile.getAbsolutePath()).... | {
"fields": [
{
"declarator": "tenantAdministrationAPI",
"modifier": "private final",
"original_string": "private final TenantAdministrationAPI tenantAdministrationAPI;",
"type": "TenantAdministrationAPI",
"var_name": "tenantAdministrationAPI"
},
{
"declarator": "bonita... | {
"body": "public String getCompleteTempFilePath(final String path) throws IOException {\n return bonitaHomeFolderAccessor.getCompleteTempFilePath(path, apiSession.getTenantId());\n }",
"class_method_signature": "BusinessDataModelResource.getCompleteTempFilePath(final String path)",
"constructor": false... | {
"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_383 | {
"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_BusinessDataReferencesResourceFinder_for_BusinessDataReferencesResource() throws Exception {\n\n final Finder finder = factory.create(BusinessDataReferencesResource.class);\n\n assertThat(finder).isInstanceOf(BusinessDataReferencesResourceFinder.class);\n ... | {
"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_679 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "caseEngineClient",
"modifier": "private",
"origin... | {
"body": "@Test\n public void a_process_can_be_started_with_variables() throws Exception {\n final long expectedProcessId = 1L;\n final long userId = 1L;\n final Map<String, Serializable> variables = someVariables();\n\n caseEngineClient.start(userId, expectedProcessId, variables);\n\n... | {
"fields": [
{
"declarator": "processAPI",
"modifier": "protected",
"original_string": "protected ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/engineclient/CaseEngineClient.java",
... | {
"body": "public ProcessInstance start(final long userId, final long processId) {\n return start(userId, processId, null);\n }",
"class_method_signature": "CaseEngineClient.start(final long userId, final long processId)",
"constructor": false,
"full_signature": "public ProcessInstance start(final lon... | {
"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_229 | {
"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 getProcessedInput_when_no_contract() throws Exception {\n final Map<String, Serializable> input = new HashMap<>();\n\n final Map<String, Serializable> processedInput = contractTypeConverter.getProcessedInput(null, input, maxSizeForTenant, tenantId);\n\n assertTha... | {
"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_815 | {
"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_fill_number_of_failed_cases_when_counter_of_failed_cases_is_active() {\n // Given\n final APIID id = APIID.makeAPIID(78L);\n final ProcessItem item = mock(ProcessItem.class);\n doReturn(id).when(item).getId();\n\n final Lis... | {
"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_546 | {
"fields": [
{
"declarator": "documentDatastore",
"modifier": "private",
"original_string": "private CaseDocumentDatastore documentDatastore;",
"type": "CaseDocumentDatastore",
"var_name": "documentDatastore"
},
{
"declarator": "constantsValue",
"modifier": "@Moc... | {
"body": "@Test\n public void it_should_call_engine_processAPI_getDocument() throws Exception {\n // Given\n final APIID id = APIID.makeAPIID(1l);\n\n // When\n documentDatastore.get(id);\n\n // Then\n verify(processAPI).getDocument(id.toLong());\n }",
"class_method_... | {
"fields": [
{
"declarator": "constants",
"modifier": "protected final",
"original_string": "protected final WebBonitaConstantsUtils constants;",
"type": "WebBonitaConstantsUtils",
"var_name": "constants"
},
{
"declarator": "processAPI",
"modifier": "protected fi... | {
"body": "@Override\n public CaseDocumentItem get(final APIID id) {\n try {\n final Document documentItem = processAPI.getDocument(id.toLong());\n return convertEngineToConsoleItem(documentItem);\n } catch (final Exception e) {\n throw new APIException(e);\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_116 | {
"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 isAllowedToSeeTask_should_return_false_for_archived_task() throws Exception {\n doThrow(ActivityInstanceNotFoundException.class).when(processAPI).isInvolvedInHumanTaskInstance(1L, 42L);\n final ArchivedActivityInstance archivedActivityInstance = mock(ArchivedActivityIns... | {
"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 isAllowedToSeeTask(final APISession apiSession, final long taskInstanceId, final long enforcedUserId,\n final boolean assignTask) throws BonitaException {\n final ProcessAPI processAPI = getProcessAPI(apiSession);\n try {\n if (processAPI.isInvolvedInHuman... | {
"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_403 | {
"fields": [
{
"declarator": "finderFactory",
"modifier": "@Mock",
"original_string": "@Mock\n FinderFactory finderFactory;",
"type": "FinderFactory",
"var_name": "finderFactory"
},
{
"declarator": "bonitaJacksonConverter",
"modifier": "@Mock",
"original... | {
"body": "@Test\n public void application_should_register_i18n_resources() throws Exception {\n //given\n final BonitaRestletApplication bonitaRestletApplication = new BonitaRestletApplication(finderFactory, bonitaJacksonConverter);\n\n //when\n bonitaRestletApplication.buildRouter();\... | {
"fields": [
{
"declarator": "ROUTER_EXTENSION_PREFIX = \"/extension/\"",
"modifier": "public static final",
"original_string": "public static final String ROUTER_EXTENSION_PREFIX = \"/extension/\";",
"type": "String",
"var_name": "ROUTER_EXTENSION_PREFIX"
},
{
"declar... | {
"body": "protected Router buildRouter() {\n final Context context = getContext();\n final Router router = new Router(context);\n // WARNING: if you add a route you need to declare it in org.bonitasoft.web.rest.server.FinderFactory\n\n // GET an activityData:\n router.attach(BPM_AC... | {
"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_17 | {
"fields": [
{
"declarator": "formServiceProviderImpl",
"modifier": "@Spy",
"original_string": "@Spy\n FormServiceProviderImpl formServiceProviderImpl;",
"type": "FormServiceProviderImpl",
"var_name": "formServiceProviderImpl"
},
{
"declarator": "workflowAPI",
... | {
"body": "@Test\n public void should_assignForm_call_worflowAPI() throws Exception {\n final String formId = \"formId\";\n final String expectedTaskId = \"42\";\n final String userId = \"3\";\n\n urlContext.put(FormServiceProviderUtil.USER_ID, userId);\n urlContext.put(FormServi... | {
"fields": [
{
"declarator": "UI_FORM_MODE = \"form\"",
"modifier": "private static final",
"original_string": "private static final String UI_FORM_MODE = \"form\";",
"type": "String",
"var_name": "UI_FORM_MODE"
},
{
"declarator": "LOGGER",
"modifier": "protected... | {
"body": "@Override\n public void assignForm(final String formID, final Map<String, Object> context) throws SessionTimeoutException, FormNotFoundException,\n TaskAssignationException, ForbiddenFormAccessException {\n final FormContextUtil ctxu = createFormContextUtil(context);\n logTime(\... | {
"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_680 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "caseEngineClient",
"modifier": "private",
"origin... | {
"body": "@Test(expected = APIException.class)\n public void cant_create_case_if_process_definition_is_not_found() throws Exception {\n when(processAPI.startProcess(anyLong())).thenThrow(new ProcessDefinitionNotFoundException(\"\"));\n\n caseEngineClient.start(-1L, 1L);\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "processAPI",
"modifier": "protected",
"original_string": "protected ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/engineclient/CaseEngineClient.java",
... | {
"body": "public ProcessInstance start(final long userId, final long processId) {\n return start(userId, processId, null);\n }",
"class_method_signature": "CaseEngineClient.start(final long userId, final long processId)",
"constructor": false,
"full_signature": "public ProcessInstance start(final lon... | {
"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_395 | {
"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_TaskExecutionResource_for_TaskExecutionResourceFinder() {\n final UserTaskExecutionResourceFinder userTaskExecutionResourceFinder = spy(new UserTaskExecutionResourceFinder());\n doReturn(processAPI).when(userTaskExecutionResourceFinder).getProcessAPI(any(R... | {
"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_141 | {
"fields": [
{
"declarator": "SESSION_CSRF_TOKEN = \"csrftoken\"",
"modifier": "public static final",
"original_string": "public static final String SESSION_CSRF_TOKEN = \"csrftoken\";",
"type": "String",
"var_name": "SESSION_CSRF_TOKEN"
},
{
"declarator": "request = n... | {
"body": "@Test\n public void should_not_check_csrf_token_for_GET_request() throws Exception {\n request.setMethod(\"GET\");\n\n boolean valid = filter.checkValidCondition(request, response);\n\n assertThat(valid).isTrue();\n }",
"class_method_signature": "TokenValidatorFilterTest.should... | {
"fields": [
{
"declarator": "CSRF_TOKEN_PARAM = \"CSRFToken\"",
"modifier": "private static final",
"original_string": "private static final String CSRF_TOKEN_PARAM = \"CSRFToken\";",
"type": "String",
"var_name": "CSRF_TOKEN_PARAM"
},
{
"declarator": "CSRF_TOKEN_HEAD... | {
"body": "@Override\n boolean checkValidCondition(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {\n\n if (isCsrfProtectionEnabled() && !isSafeMethod(httpRequest.getMethod())) {\n String headerFromRequest = getCSRFToken(httpRequest);\n String apiToken = (String) 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_511 | {
"fields": [
{
"declarator": "engineClient",
"modifier": "@Mock",
"original_string": "@Mock\n ProfileMemberEngineClient engineClient;",
"type": "ProfileMemberEngineClient",
"var_name": "engineClient"
},
{
"declarator": "addProfileHelper",
"modifier": "",
... | {
"body": "@Test\n public void testWeCanCreateAMembershipForAUSer() {\n ProfileMember aKnownProfile = anEngineProfileMember().build();\n when(engineClient.createProfileMember(1L, 2L, null, null)).thenReturn(aKnownProfile);\n\n ProfileMemberItem item = aProfileMemberItem().withProfileId(1L).wit... | {
"fields": [
{
"declarator": "UNSET = null",
"modifier": "private static final",
"original_string": "private static final Long UNSET = null;",
"type": "Long",
"var_name": "UNSET"
},
{
"declarator": "engineClient",
"modifier": "private",
"original_string": "... | {
"body": "@Override\n public ProfileMemberItem add(ProfileMemberItem item) {\n ProfileMember addedProfileMember = \n addProfileMember(item.getProfileId(), item.getUserId(), item.getGroupId(), item.getRoleId());\n return new ProfileMemberItemConverter().convert(addedProfileMember);\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_842 | {
"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(expected = APIException.class)\n public void search_should_throw_an_exception_when_filters_are_passed_through() throws Exception {\n api.search(0, 1,\n null,\n APICustomUserInfoDefinition.FIX_ORDER,\n Collections.singletonMap(\"name\", \"foo\"));... | {
"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 ItemSearchResult<CustomUserInfoDefinitionItem> search(\n final int page,\n final int resultsByPage,\n final String search,\n final String orders,\n final Map<String, String> filters) {\n\n check(search == null, new _(\"Search terms are no... | {
"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_907 | {
"fields": [
{
"declarator": "toolkitHttpServlet = new ToolkitHttpServlet() {\n @Override\n protected ServletCall defineServletCall(HttpServletRequest req, HttpServletResponse resp) {\n return null;\n }\n }",
"modifier": "",
"original_string": "ToolkitHttpServ... | {
"body": "@Test\n public void testIfLocaleIsNotInACookieThatBrowserLocaleIsPassedThrough() throws Exception {\n APIException exception = mock(APIException.class,\n withSettings().defaultAnswer(RETURNS_MOCKS));\n\n doReturn(writer).when(resp).getWriter();\n doReturn(new Cookie[0... | {
"fields": [
{
"declarator": "serialVersionUID = -8470006030459575773L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8470006030459575773L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOG... | {
"body": "protected final void outputException(final Throwable e, final HttpServletRequest req, final HttpServletResponse resp, final int httpStatusCode) {\n\n if (httpStatusCode >= 0) {\n resp.setStatus(httpStatusCode);\n }\n resp.setContentType(\"application/json;charset=UTF-8\");\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_40 | {
"fields": [
{
"declarator": "cacheManager = null",
"modifier": "protected",
"original_string": "protected CacheManager cacheManager = null;",
"type": "CacheManager",
"var_name": "cacheManager"
}
],
"file": "forms/forms-server/src/test/java/org/bonitasoft/forms/server/cache/... | {
"body": "@Test\n public void testClear() {\n CacheUtil.clear(cacheManager.getConfiguration().getDiskStoreConfiguration().getPath(), cacheManager.getName());\n assertNull(\"Cannot clear the cache\", CacheUtil.get(cacheManager.getName(), cacheManager.getConfiguration().getDiskStoreConfiguration().get... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(CacheUtil.class.getName())",
"modifier": "private static",
"original_string": "private static Logger LOGGER = Logger.getLogger(CacheUtil.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator"... | {
"body": "public static void clear(final String diskStorePath, final String cacheName) {\n final CacheManager cacheManager = getCacheManager(diskStorePath);\n final Cache cache = cacheManager.getCache(cacheName);\n if (cache != null) {\n cache.removeAll();\n }\n }",
"class... | {
"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_454 | {
"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_iconPath_on_convert_attribute_iconPath() throws Exception {\n //when\n final String value = converter.convert(ApplicationItem.ATTRIBUTE_ICON_PATH);\n\n //then\n assertThat(value).isEqualTo(ApplicationSearchDescript... | {
"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_287 | {
"fields": [
{
"declarator": "customPageAuthorizationsHelper",
"modifier": "@InjectMocks",
"original_string": "@InjectMocks\n CustomPageAuthorizationsHelper customPageAuthorizationsHelper;",
"type": "CustomPageAuthorizationsHelper",
"var_name": "customPageAuthorizationsHelper"
... | {
"body": "@Test\n public void should_not_authorize_page_when_appToken_not_null_and_page_unauthorized_in_application() throws Exception {\n given(applicationAPI.searchApplicationPages(any(SearchOptions.class)))\n .willReturn(new SearchResultImpl<>(0, Collections.<ApplicationPage>emptyList()))... | {
"fields": [
{
"declarator": "BONITA_LABS_PAGE_TOKEN_EXTENSION = \"BonitaLabs\"",
"modifier": "public static final",
"original_string": "public static final String BONITA_LABS_PAGE_TOKEN_EXTENSION = \"BonitaLabs\";",
"type": "String",
"var_name": "BONITA_LABS_PAGE_TOKEN_EXTENSION"
... | {
"body": "public boolean isPageAuthorized(final String appToken, final String pageName) throws BonitaException {\n if (StringUtil.isBlank(appToken)) {\n return isPageAuthorizedInPortal(pageName);\n } else {\n return isPageAuthorizedInApplication(appToken, pageName);\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_638 | {
"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 makeSearchOptionCreator_with_FILTER_CONTENT_TYPE_form_filter_map_should_return_FILTER_CONTENT_TYPE_in_filter_list() {\n final Map<String, String> filters = new HashMap<>();\n final String form = \"form\";\n filters.put(PageItem.FILTER_CONTENT_TYPE, form);\n ... | {
"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": "protected SearchOptionsCreator makeSearchOptionCreator(final int page, final int resultsByPage, final String search,\n final String orders,\n final Map<String, String> filters) {\n\n final SearchOptionsCreator searchOptionsCreator = new SearchOptionsCreator(page, resultsByPage,... | {
"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_792 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock",
"original_string": "@Mock\n ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "caseInfoResource",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test(expected = APIException.class)\n public void should_throw_exception_if_attribute_is_not_found() throws Exception {\n // given:\n doReturn(null).when(caseInfoResource).getAttribute(anyString());\n\n // when:\n caseInfoResource.getCaseInfo();\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "CASE_ID = \"caseId\"",
"modifier": "public static final",
"original_string": "public static final String CASE_ID = \"caseId\";",
"type": "String",
"var_name": "CASE_ID"
},
{
"declarator": "processAPI",
"modifier": "private final",
... | {
"body": "@Get(\"json\")\n public CaseInfo getCaseInfo() {\n try {\n final long caseId = Long.parseLong(getAttribute(CASE_ID));\n final CaseInfo caseInfo = new CaseInfo();\n caseInfo.setId(caseId);\n caseInfo.setFlowNodeStatesCounters(getFlownodeCounters(caseId))... | {
"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_268 | {
"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_not_authorize_theme_requests_to_other_paths() throws Exception {\n when(hsRequest.getParameter(\"app\")).thenReturn(null);\n when(hsRequest.getQueryString()).thenReturn(null);\n when(hsRequest.getHeader(HttpHeaders.REFERER)).thenReturn(\"/bonita/resource/p... | {
"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_849 | {
"fields": [
{
"declarator": "USER_ID = APIID.makeAPIID(123L)",
"modifier": "public static final",
"original_string": "public static final APIID USER_ID = APIID.makeAPIID(123L);",
"type": "APIID",
"var_name": "USER_ID"
},
{
"declarator": "userItem",
"modifier": "... | {
"body": "@Test\n public void should_throw_exception_when_adding_a_user_with_no_password() throws Exception {\n UserItem userItem = new UserItem();\n userItem.setUserName(\"John\");\n\n expectedException.expect(ValidationException.class);\n apiUser.add(userItem);\n }",
"class_meth... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(APIUser.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = Logger.getLogger(APIUser.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}
],
"file": "s... | {
"body": "@Override\n public UserItem add(final UserItem item) {\n\n // Finish the upload of the icon\n if (StringUtil.isBlank(item.getPassword())) {\n throw new ValidationException(Collections.singletonList(new ValidationError(\"Password\", \"%attribute% is mandatory\")));\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_326 | {
"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_getToken_return_expected_name() throws Exception {\n assertEquals(spiedApplicationImportService.getToken(), \"/application/import\");\n }",
"class_method_signature": "ApplicationsImportServiceTest.should_getToken_return_expected_name()",
"constructor": false,
"... | {
"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 String getToken() {\n return TOKEN;\n }",
"class_method_signature": "ApplicationsImportService.getToken()",
"constructor": false,
"full_signature": "@Override public String getToken()",
"identifier": "getToken",
"invocations": [],
"modifiers": "@Override public",... | {
"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_776 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "finderFactory",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void should_getTaskIDParameter_throws_an_exception_when_archived_case_id_parameter_is_null() throws Exception {\n //given\n doReturn(null).when(archivedCaseContextResource).getAttribute(ArchivedCaseContextResource.ARCHIVED_CASE_ID);\n\n try {\n //when\n ... | {
"fields": [
{
"declarator": "ARCHIVED_CASE_ID = \"archivedCaseId\"",
"modifier": "static final",
"original_string": "static final String ARCHIVED_CASE_ID = \"archivedCaseId\";",
"type": "String",
"var_name": "ARCHIVED_CASE_ID"
},
{
"declarator": "processAPI",
"m... | {
"body": "protected long getArchivedCaseIdParameter() {\n final String caseId = getAttribute(ARCHIVED_CASE_ID);\n if (caseId == null) {\n throw new APIException(\"Attribute '\" + ARCHIVED_CASE_ID + \"' is mandatory in order to get the archived case context\");\n }\n return Long... | {
"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_799 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock",
"original_string": "@Mock\n ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "restResource",
"modifier": "private",
"original_string": "private Time... | {
"body": "@Test(expected = APIException.class)\n public void updateShouldHandleNullID() throws Exception {\n doReturn(Collections.EMPTY_MAP).when(restResource).getRequestAttributes();\n\n restResource.updateTimerEventTrigger(null);\n }",
"class_method_signature": "TimerEventTriggerResourceTest.... | {
"fields": [
{
"declarator": "ID_PARAM_NAME = \"id\"",
"modifier": "public static final",
"original_string": "public static final String ID_PARAM_NAME = \"id\";",
"type": "String",
"var_name": "ID_PARAM_NAME"
},
{
"declarator": "processAPI",
"modifier": "private ... | {
"body": "@Put(\"json\")\n public TimerEventTrigger updateTimerEventTrigger(final TimerEventTrigger trigger) throws Exception {\n final String triggerId = getAttribute(ID_PARAM_NAME);\n if (triggerId == null) {\n throw new APIException(\"Attribute '\" + ID_PARAM_NAME + \"' is mandatory\")... | {
"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_263 | {
"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_get_not_found_if_the_page_does_not_exist() throws Exception {\n final String key = \"process/processName/processVersion\";\n when(hsRequest.getPathInfo()).thenReturn(\"/\" + key + \"/content/\");\n when(pageMappingService.getPage(hsRequest, apiSession, key... | {
"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_633 | {
"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 testRunSearch() throws Exception {\n final SearchOptionsCreator creator = new SearchOptionsCreator(0, 1, null, new Sorts(null), new Filters(null));\n pageDatastore.runSearch(null, creator);\n verify(pageAPI, times(1)).searchPages(creator.create());\n }",
"cl... | {
"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": "protected SearchResult<Page> runSearch(final Map<String, String> filters, final SearchOptionsCreator creator)\n throws SearchException {\n return pageAPI.searchPages(creator.create());\n }",
"class_method_signature": "PageDatastore.runSearch(final Map<String, String> filters, final 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_408 | {
"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 addStringFilterToSearchBuilder_should_do_nothing_when_filters_is_empty() {\n // given:\n final Map<String, String> filters = new HashMap<String, String>(0);\n final SearchOptionsBuilder searchOptionsBuilder = new SearchOptionsBuilder(0, 10);\n // when:\n ... | {
"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 addStringFilterToSearchBuilder(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.g... | {
"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_721 | {
"fields": [
{
"declarator": "RETURN_VALUE = \"{'return':'value'}\"",
"modifier": "public static final",
"original_string": "public static final String RETURN_VALUE = \"{'return':'value'}\";",
"type": "String",
"var_name": "RETURN_VALUE"
},
{
"declarator": "GET = \"GET... | {
"body": "@Test\n public void should_handle_return_null() throws Exception {\n //given\n method = new Method(GET);\n doReturn(method).when(request).getMethod();\n\n doReturn(null).when(restApiRenderer).handleRestApiCall(any(HttpServletRequest.class),\n any(ResourceExtens... | {
"fields": [
{
"declarator": "EMPTY_RESPONSE = \"\"",
"modifier": "public static final",
"original_string": "public static final String EMPTY_RESPONSE = \"\";",
"type": "String",
"var_name": "EMPTY_RESPONSE"
},
{
"declarator": "restApiRenderer",
"modifier": "priv... | {
"body": "@Override\n public Representation doHandle() {\n final StringRepresentation stringRepresentation = new StringRepresentation(EMPTY_RESPONSE);\n try {\n final RestApiResponse restApiResponse = handleRequest();\n fillAllContent(stringRepresentation, restApiResponse);\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_371 | {
"fields": [
{
"declarator": "hsRequest",
"modifier": "@Mock",
"original_string": "@Mock\n HttpServletRequest hsRequest;",
"type": "HttpServletRequest",
"var_name": "hsRequest"
},
{
"declarator": "hsResponse",
"modifier": "@Mock",
"original_string": "@Mo... | {
"body": "@Test\n public void should_redirectToValidPageUrl_on_missing_final_slash() throws Exception {\n doReturn(\"/appToken/pageToken\").when(hsRequest).getPathInfo();\n\n servlet.service(hsRequest, hsResponse);\n\n verify(customPageRequestModifier).redirectToValidPageUrl(hsRequest, hsResp... | {
"fields": [
{
"declarator": "serialVersionUID = -3911437607969651000L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -3911437607969651000L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOG... | {
"body": "@Override\n protected void service(final HttpServletRequest hsRequest, final HttpServletResponse hsResponse)\n throws ServletException, IOException {\n\n final APISession session = getSession(hsRequest);\n\n // Check if requested URL is missing final slash (necessary in order to... | {
"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_664 | {
"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_count_definitions() throws Exception {\n given(engine.getNumberOfCustomInfoDefinitions()).willReturn(5L);\n\n assertThat(client.countDefinitions()).isEqualTo(5);\n }",
"class_method_signature": "CustomUserInfoEngineClientTest.should_count_definitions()",
"... | {
"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 long countDefinitions() {\n return identity.getNumberOfCustomInfoDefinitions();\n }",
"class_method_signature": "CustomUserInfoEngineClient.countDefinitions()",
"constructor": false,
"full_signature": "public long countDefinitions()",
"identifier": "countDefinitions",
"invocation... | {
"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_234 | {
"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_multiple_complex_input_should_return_processed_input() throws Exception {\n final List<InputDefinition> inputDefinition = generateComplexInputDefinition();\n when(contractDefinition.getInputs()).thenReturn(inputDefinition);\n final Map<Str... | {
"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_808 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock",
"original_string": "@Mock\n ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "activityVariableResource",
"modifier": "@Spy\n @InjectMocks\n private"... | {
"body": "@Test\n public void should_do_get_call_getAttribute() throws DataNotFoundException {\n //given\n doReturn(\"\").when(activityVariableResource).getAttribute(ActivityVariableResource.ACTIVITYDATA_DATA_NAME);\n doReturn(\"1\").when(activityVariableResource).getAttribute(ActivityVariabl... | {
"fields": [
{
"declarator": "ACTIVITYDATA_ACTIVITY_ID = \"activityid\"",
"modifier": "public static final",
"original_string": "public static final String ACTIVITYDATA_ACTIVITY_ID = \"activityid\";",
"type": "String",
"var_name": "ACTIVITYDATA_ACTIVITY_ID"
},
{
"decla... | {
"body": "@Get(\"json\")\n public DataInstance getTaskVariable() {\n try {\n final String taskId = getAttribute(ACTIVITYDATA_ACTIVITY_ID);\n final String dataName = getAttribute(ACTIVITYDATA_DATA_NAME);\n return getTaskVariableInstance(dataName, Long.valueOf(taskId));\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_367 | {
"fields": [
{
"declarator": "hsRequest",
"modifier": "@Mock",
"original_string": "@Mock\n HttpServletRequest hsRequest;",
"type": "HttpServletRequest",
"var_name": "hsRequest"
},
{
"declarator": "hsResponse",
"modifier": "@Mock",
"original_string": "@Mo... | {
"body": "@Test\n public void should_send_error_404_when_the_custom_page_is_not_existing() throws Exception {\n doThrow(new PageNotFoundException(\"PageName\")).when(router).route(eq(hsRequest), eq(hsResponse), eq(session), eq(pageRenderer), eq(resourceRenderer), any(BonitaHomeFolderAccessor.class));\n\n ... | {
"fields": [
{
"declarator": "serialVersionUID = -3911437607969651000L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -3911437607969651000L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "LOG... | {
"body": "@Override\n protected void service(final HttpServletRequest hsRequest, final HttpServletResponse hsResponse)\n throws ServletException, IOException {\n\n final APISession session = getSession(hsRequest);\n\n // Check if requested URL is missing final slash (necessary in order to... | {
"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_737 | {
"fields": [
{
"declarator": "generator = new SHA1Generator()",
"modifier": "private",
"original_string": "private SHA1Generator generator = new SHA1Generator();",
"type": "SHA1Generator",
"var_name": "generator"
},
{
"declarator": "session",
"modifier": "@Mock\n... | {
"body": "@Test\n public void should_build_rights_for_all_tokens_progressively_add_to_it() throws Exception {\n given(session.getId()).willReturn(85L);\n UserRightsBuilder builder = new UserRightsBuilder(session, new TokenListProvider(Arrays.asList(\n \"token 1\", \"token 2\")));\n\n ... | {
"fields": [
{
"declarator": "session",
"modifier": "private",
"original_string": "private org.bonitasoft.engine.session.APISession session;",
"type": "org.bonitasoft.engine.session.APISession",
"var_name": "session"
},
{
"declarator": "provider",
"modifier": "pr... | {
"body": "public List<String> build() {\n List<String> rights = new ArrayList<String>();\n for (String token : provider.getTokens()) {\n rights.add(generator.getHash(token.concat(String.valueOf(session.getId()))));\n }\n return rights;\n }",
"class_method_signature": "User... | {
"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_222 | {
"fields": [
{
"declarator": "request",
"modifier": "@Mock",
"original_string": "@Mock\n HttpServletRequest request;",
"type": "HttpServletRequest",
"var_name": "request"
},
{
"declarator": "fileUploadServlet = new TenantFileUploadServlet()",
"modifier": "@Spy... | {
"body": "@Test\n public void getFilenameLastSegment_should_return_proper_filename_for_linux_paths() {\n // given\n final String filename = \"/Users/Deskt.op/process.bar\";\n\n // when\n final String filenameLastSegment = fileUploadServlet.getFilenameLastSegment(filename);\n\n /... | {
"fields": [
{
"declarator": "serialVersionUID = -948661031179067420L",
"modifier": "protected static final",
"original_string": "protected static final long serialVersionUID = -948661031179067420L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "L... | {
"body": "protected String getFilenameLastSegment(final String fileName) {\n int slashPos = fileName.lastIndexOf(\"/\");\n if (slashPos == -1) {\n slashPos = fileName.lastIndexOf(\"\\\\\");\n }\n return fileName.substring(slashPos+1);\n }",
"class_method_signature": "FileU... | {
"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_388 | {
"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_SendMessageResource_for_SendMessageResourceFinder() {\n final BPMMessageResourceFinder sendMessageResourceFinder = spy(new BPMMessageResourceFinder());\n doReturn(processAPI).when(sendMessageResourceFinder).getProcessAPI(any(Request.class));\n final... | {
"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_672 | {
"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_group_not_exists_in_engine_repository() throws Exception {\n when(groupAPI.updateGroup(eq(1L), any(GroupUpdater.class))).thenThrow(new GroupNotFoundException(new Exception()));\n \n groupEngineClient.upd... | {
"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_449 | {
"fields": [
{
"declarator": "STATE = ApplicationState.DEACTIVATED.name()",
"modifier": "private static final",
"original_string": "private static final String STATE = ApplicationState.DEACTIVATED.name();",
"type": "String",
"var_name": "STATE"
},
{
"declarator": "UPDA... | {
"body": "@Test\n public void update_with_no_Theme_page_should_send_null() {\n\n //given\n final HashMap<String, String> fields = new HashMap<String, String>();\n fields.put(ApplicationItem.ATTRIBUTE_THEME_ID, \"-1\");\n\n //when\n final ApplicationUpdater updater = converter.to... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/application/ApplicationItemConverter.java",
"identifier": "ApplicationItemConverter",
"interfaces": "",
"methods": [
{
"class_method_signature": "ApplicationItemConverter.toApplicationItem(final Application applic... | {
"body": "public ApplicationUpdater toApplicationUpdater(final Map<String, String> attributes) {\n final ApplicationUpdater applicationUpdater = getApplicationUpdater();\n\n if (attributes.containsKey(ApplicationItem.ATTRIBUTE_TOKEN)) {\n applicationUpdater.setToken(attributes.get(Applicatio... | {
"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_760 | {
"fields": [
{
"declarator": "apiDocument",
"modifier": "@Spy\n private",
"original_string": "@Spy\n private APICaseDocument apiDocument;",
"type": "APICaseDocument",
"var_name": "apiDocument"
},
{
"declarator": "datastore",
"modifier": "@Mock\n private"... | {
"body": "@Test\n public void it_should_call_the_datastore_add_method() {\n // Given\n\n // When\n apiDocument.add(documentItemMock);\n\n // Then\n verify(datastore).add(documentItemMock);\n }",
"class_method_signature": "APICaseDocumentTest.it_should_call_the_datastore_add... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/api/bpm/cases/APICaseDocument.java",
"identifier": "APICaseDocument",
"interfaces": "",
"methods": [
{
"class_method_signature": "APICaseDocument.defineItemDefinition()",
"constructor": false,
"full_signature": ... | {
"body": "@Override\n public CaseDocumentItem add(final CaseDocumentItem item) {\n return getCaseDocumentDatastore().add(item);\n }",
"class_method_signature": "APICaseDocument.add(final CaseDocumentItem item)",
"constructor": false,
"full_signature": "@Override public CaseDocumentItem add(final C... | {
"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_330 | {
"fields": [
{
"declarator": "session",
"modifier": "@Mock",
"original_string": "@Mock\n APISession session;",
"type": "APISession",
"var_name": "session"
},
{
"declarator": "applicationAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n ... | {
"body": "@Test\n public void should_getFileExportName_return_a_valide_file_name() throws Exception {\n assertThat(spiedApplicationsExportServlet.getFileExportName()).isEqualTo(\"applicationDescriptorFile.xml\");\n }",
"class_method_signature": "ApplicationsExportServletTest.should_getFileExportName_r... | {
"fields": [
{
"declarator": "EXPORT_FILE_NAME = \"applicationDescriptorFile.xml\"",
"modifier": "private static final",
"original_string": "private static final String EXPORT_FILE_NAME = \"applicationDescriptorFile.xml\";",
"type": "String",
"var_name": "EXPORT_FILE_NAME"
},
... | {
"body": "@Override\n protected String getFileExportName() {\n return EXPORT_FILE_NAME;\n }",
"class_method_signature": "ApplicationsExportServlet.getFileExportName()",
"constructor": false,
"full_signature": "@Override protected String getFileExportName()",
"identifier": "getFileExportName",
... | {
"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_625 | {
"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_updatting_page_with_unauthorized_path() throws IOException, PageNotFoundException {\n // Given\n final Map<String, String> attributes = new HashMap<>();\n attributes.put(PageDatastore.UNMAPPED_ATTRIBU... | {
"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 update(final APIID id, final Map<String, String> attributes) {\n PageItem updatedPage = null;\n final PageUpdater pageUpdater = new PageUpdater();\n try {\n\n File zipFile = null;\n final String oldURLToken = pageAPI.getPage(id.toLon... | {
"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_275 | {
"fields": [
{
"declarator": "MY_PROFILE = \"myProfile\"",
"modifier": "public static final",
"original_string": "public static final String MY_PROFILE = \"myProfile\";",
"type": "String",
"var_name": "MY_PROFILE"
},
{
"declarator": "pageContextHelper",
"modifier... | {
"body": "@Test\n public void should_getCurrentLocale_return_request_parameter() throws Exception {\n //given\n doReturn(locale.toString()).when(request).getParameter(LocaleUtils.LOCALE_PARAM);\n pageContextHelper = new PageContextHelper(request);\n\n //when\n final Locale retur... | {
"fields": [
{
"declarator": "PROFILE_PARAM = \"profile\"",
"modifier": "public static final",
"original_string": "public static final String PROFILE_PARAM = \"profile\";",
"type": "String",
"var_name": "PROFILE_PARAM"
},
{
"declarator": "ATTRIBUTE_API_SESSION = \"apiS... | {
"body": "public Locale getCurrentLocale() {\n return LocaleUtils.getUserLocale(request);\n }",
"class_method_signature": "PageContextHelper.getCurrentLocale()",
"constructor": false,
"full_signature": "public Locale getCurrentLocale()",
"identifier": "getCurrentLocale",
"invocations": [
"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_598 | {
"fields": [
{
"declarator": "groupEngineClient",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private GroupEngineClient groupEngineClient;",
"type": "GroupEngineClient",
"var_name": "groupEngineClient"
},
{
"declarator": "bonitaHomeFolderAccessor",... | {
"body": "@Test\n public void convert_set_parent_path_to_empty_if_parentGroupId_is_an_empty_string() throws Exception {\n HashMap<String, String> attributes = buildSimpleAttribute(GroupItem.ATTRIBUTE_PARENT_GROUP_ID, \"\");\n\n GroupUpdater updater = groupUpdaterConverter.convert(attributes, 12L);\n... | {
"fields": [
{
"declarator": "groupEngineClient",
"modifier": "private",
"original_string": "private GroupEngineClient groupEngineClient;",
"type": "GroupEngineClient",
"var_name": "groupEngineClient"
}
],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastor... | {
"body": "public GroupUpdater convert(Map<String, String> attributes, long tenantId) {\n GroupUpdater updater = new GroupUpdater();\n if (attributes.containsKey(GroupItem.ATTRIBUTE_DESCRIPTION)) {\n updater.updateDescription(attributes.get(GroupItem.ATTRIBUTE_DESCRIPTION));\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_26 | {
"fields": [
{
"declarator": "util = new FormFieldValuesUtil()",
"modifier": "",
"original_string": "FormFieldValuesUtil util = new FormFieldValuesUtil();",
"type": "FormFieldValuesUtil",
"var_name": "util"
}
],
"file": "forms/forms-server/src/test/java/org/bonitasoft/forms/... | {
"body": "@Test\n public void testStoreWidgetsInCacheAndSetCacheIDWithDisplayCondition() {\n final List<FormWidget> formWidgets = new ArrayList<FormWidget>();\n final FormWidget widget1 = new FormWidget();\n widget1.setId(\"widget1\");\n widget1.setDisplayConditionExpression(new Expres... | {
"fields": [
{
"declarator": "INDEX_SEPARATOR = \"_\"",
"modifier": "protected static final",
"original_string": "protected static final String INDEX_SEPARATOR = \"_\";",
"type": "String",
"var_name": "INDEX_SEPARATOR"
},
{
"declarator": "WIDGET_LABEL = \"label\"",
... | {
"body": "public void storeWidgetsInCacheAndSetCacheID(final long tenantID, final String formID, final String pageID, final String locale,\n final Date processDeployementDate, final List<FormWidget> formWidgets) {\n\n final FormCacheUtil formCacheUtil = FormCacheUtilFactory.getTenantFormCacheUtil(t... | {
"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_432 | {
"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\n public void should_create_default_home_page_on_add() throws Exception {\n //given\n final ApplicationCreator creator = new ApplicationCreator(\"app\", \"My application\", \"1.0\");\n ApplicationItem item = new ApplicationItem();\n given(converter.toApplicationCreator(... | {
"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_824 | {
"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 checkConnectorVersionIsMandatory() throws Exception {\n Map<String, String> filters = buildFilters(\"1\", \"aConnectorName\", \"\");\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_127 | {
"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 getProcessDefinitionUUID_should_return_valid_UUID_with_special_characters() throws Exception {\n final ProcessDeploymentInfo processDeploymentInfo = mock(ProcessDeploymentInfo.class);\n when(processDeploymentInfo.getName()).thenReturn(\"process Name/é\");\n when(... | {
"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 String getProcessPath(final APISession apiSession, final long processDefinitionId) throws BonitaException, UnsupportedEncodingException {\n final ProcessDeploymentInfo processDeploymentInfo = getProcessAPI(apiSession).getProcessDeploymentInfo(processDefinitionId);\n return encodePathSe... | {
"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_577 | {
"fields": [
{
"declarator": "processAPI",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ProcessAPI processAPI;",
"type": "ProcessAPI",
"var_name": "processAPI"
},
{
"declarator": "datastore",
"modifier": "private",
"original_stri... | {
"body": "@Test(expected = APIException.class)\n @SuppressWarnings(\"unchecked\")\n public void searchThrowExceptionIfProcessIdIsUnknown() throws Exception {\n when(this.processAPI.getConnectorImplementation(anyLong(), anyString(), anyString())).thenThrow(\n new ConnectorNotFoundException... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/bpm/process/ProcessConnectorDependencyDatastore.java",
"identifier": "ProcessConnectorDependencyDatastore",
"interfaces": "implements\n DatastoreHasSearch<ProcessConnectorDependencyItem>",
"methods": [
{
"c... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public ItemSearchResult<ProcessConnectorDependencyItem> search(final int page, final int resultsByPage, \n final String search, final String orders, final Map<String, String> filters) {\n\n try {\n final Long processId = MapU... | {
"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_465 | {
"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_applicationId_on_convert_attribute_applicationId() throws Exception {\n //when\n final String convertedValue = converter.convert(ApplicationMenuItem.ATTRIBUTE_APPLICATION_ID);\n\n //then\n assertThat(convertedV... | {
"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_71 | {
"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 testANullCookieResultsWithBrowserLocale() throws Exception {\n doReturn(Locale.CANADA_FRENCH).when(request).getLocale();\n\n String locale = LocaleUtils.getUserLocaleAsString(request);\n\n assertEquals(Locale.FRENCH.toString(), locale);\n }",
"class_method_s... | {
"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_520 | {
"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(expected = APIException.class)\n public void should_throw_APIException_when_engine_throws_CreationException_on_add() throws Exception {\n //given\n given(applicationAPI.createApplicationPage(anyLong(), anyLong(), anyString())).willThrow(new CreationException(\"\"));\n\n //when... | {
"fields": [
{
"declarator": "applicationAPI",
"modifier": "private final",
"original_string": "private final ApplicationAPI applicationAPI;",
"type": "ApplicationAPI",
"var_name": "applicationAPI"
},
{
"declarator": "pageAPI",
"modifier": "private final",
... | {
"body": "@Override\n public ApplicationPageItem add(final ApplicationPageItem item) {\n try {\n final ApplicationPage applicationPage = applicationAPI.createApplicationPage(item.getApplicationId().toLong(), item.getPageId().toLong(),\n item.getToken());\n return co... | {
"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_170 | {
"fields": [
{
"declarator": "requestAccessor",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private HttpServletRequestAccessor requestAccessor;",
"type": "HttpServletRequestAccessor",
"var_name": "requestAccessor"
},
{
"declarator": "tenantIdAccess... | {
"body": "@Test\n public void should_retrieve_tenant_id_from_request_when_set_in_request_parameters() throws Exception {\n request.setCookies(new Cookie(\"bonita.tenant\", \"123\"));\n doReturn(\"5\").when(requestAccessor).getTenantId();\n\n long tenantId = tenantIdAccessor.getTenantIdFromReq... | {
"fields": [
{
"declarator": "request",
"modifier": "private",
"original_string": "private HttpServletRequestAccessor request;",
"type": "HttpServletRequestAccessor",
"var_name": "request"
},
{
"declarator": "portalCookies = new PortalCookies()",
"modifier": "pri... | {
"body": "public long getTenantIdFromRequestOrCookie() throws ServletException {\n String tenantId = request.getTenantId();\n if (tenantId == null) {\n tenantId = portalCookies.getTenantCookieFromRequest(request.asHttpServletRequest());\n }\n if (tenantId == null) {\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_873 | {
"fields": [
{
"declarator": "httpServletRequest",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private HttpServletRequest httpServletRequest;",
"type": "HttpServletRequest",
"var_name": "httpServletRequest"
},
{
"declarator": "restRequestParser",
... | {
"body": "@Test(expected = APIMalformedUrlException.class)\n public void should_parsePath_with_bad_request() {\n doReturn(\"API/bpm\").when(httpServletRequest).getPathInfo();\n doReturn(\"/API\").when(httpServletRequest).getServletPath();\n\n restRequestParser.invoke();\n }",
"class_meth... | {
"fields": [
{
"declarator": "request",
"modifier": "private final",
"original_string": "private final HttpServletRequest request;",
"type": "HttpServletRequest",
"var_name": "request"
},
{
"declarator": "apiName",
"modifier": "private",
"original_string": ... | {
"body": "public RestRequestParser invoke() {\n String pathInfo = request.getPathInfo();\n if (pathInfo == null || pathInfo.split(\"/\").length < 3) {\n // it's not an URL like API/bpm/...\n pathInfo = request.getServletPath();\n }\n final String[] path = pathInfo.sp... | {
"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_259 | {
"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_get_Bad_Request_when_invalid_parameters() throws Exception {\n when(hsRequest.getPathInfo()).thenReturn(\"\");\n when(hsRequest.getParameter(anyString())).thenReturn(null);\n pageServlet.service(hsRequest, hsResponse);\n verify(hsResponse, times(1))... | {
"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_609 | {
"fields": [
{
"declarator": "TENANT_ID = 67534L",
"modifier": "private static final",
"original_string": "private static final long TENANT_ID = 67534L;",
"type": "long",
"var_name": "TENANT_ID"
},
{
"declarator": "roleDatastore",
"modifier": "@InjectMocks\n @... | {
"body": "@Test\n public void should_get_retrieve_role_without_icon() throws Exception {\n //given\n RoleImpl myRole = new RoleImpl(12L, \"myRole\");\n doReturn(myRole).when(identityAPI).getRole(12L);\n //when\n RoleItem roleItem = roleDatastore.get(APIID.makeAPIID(12L));\n ... | {
"fields": [],
"file": "server/src/main/java/org/bonitasoft/web/rest/server/datastore/organization/RoleDatastore.java",
"identifier": "RoleDatastore",
"interfaces": "implements\n DatastoreHasGet<RoleItem>,\n DatastoreHasSearch<RoleItem>,\n DatastoreHasAdd<RoleItem>,\n DatastoreHasUp... | {
"body": "@Override\n public RoleItem get(final APIID id) {\n try {\n return convertEngineToConsoleItem(getIdentityAPI().getRole(id.toLong()));\n } catch (final Exception e) {\n throw new APIException(e);\n }\n }",
"class_method_signature": "RoleDatastore.get(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_67 | {
"fields": [
{
"declarator": "securityProperties",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private SecurityProperties securityProperties;",
"type": "SecurityProperties",
"var_name": "securityProperties"
},
{
"declarator": "platformManagementUti... | {
"body": "@Test\n public void should_reloadPropertiesIfInDebug_reload_properties_when_in_debug() throws Exception {\n //given\n doReturn(true).when(securityProperties).isAPIAuthorizationsCheckInDebugMode();\n //when\n PermissionsBuilderAccessor.reloadPropertiesIfInDebug(securityPropert... | {
"fields": [],
"file": "common/src/main/java/org/bonitasoft/console/common/server/utils/PermissionsBuilderAccessor.java",
"identifier": "PermissionsBuilderAccessor",
"interfaces": "",
"methods": [
{
"class_method_signature": "PermissionsBuilderAccessor.createPermissionBuilder(final APISession sessi... | {
"body": "static void reloadPropertiesIfInDebug(SecurityProperties securityProperties, PlatformManagementUtils platformManagementUtils) throws LoginFailedException {\n if (securityProperties.isAPIAuthorizationsCheckInDebugMode()) {\n try {\n platformManagementUtils.initializePlatform... | {
"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.