id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
31334852_6 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldListSortedBySize() throws Exception {\n // given\n createFile(\"A.log\", \"xx\", now);\n createFile(\"B.log\", \"x\", now);\n createFile(\"C.log\", \"xxx\", now);\n\n // when\n logViewEndpoint.list(model, SortBy.SIZE, false, null);\n\n ... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_21 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldEndpointBeSensitive() {\n assertThat(logViewEndpoint.isSensitive(), is(true));\n }",
"class_method_signature": "LogViewEndpointTest.shouldEndpointBeSensitive()",
"constructor": false,
"full_signature": "@Test public void shouldEndpointBeSensitive()",
"identifi... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@Override\n public boolean isSensitive() {\n return true;\n }",
"class_method_signature": "LogViewEndpoint.isSensitive()",
"constructor": false,
"full_signature": "@Override public boolean isSensitive()",
"identifier": "isSensitive",
"invocations": [],
"modifiers": "@Override publi... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_5 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldListReverseSortedByFilename() throws Exception {\n // given\n createFile(\"B.log\", \"x\", now);\n createFile(\"A.log\", \"x\", now);\n createFile(\"C.log\", \"x\", now);\n\n // when\n logViewEndpoint.list(model, SortBy.FILENAME, true, ... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_22 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldReturnContextPath() {\n assertThat(logViewEndpoint.getPath(), is(\"/log\"));\n }",
"class_method_signature": "LogViewEndpointTest.shouldReturnContextPath()",
"constructor": false,
"full_signature": "@Test public void shouldReturnContextPath()",
"identifier": "... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@Override\n public String getPath() {\n return \"/log\";\n }",
"class_method_signature": "LogViewEndpoint.getPath()",
"constructor": false,
"full_signature": "@Override public String getPath()",
"identifier": "getPath",
"invocations": [],
"modifiers": "@Override public",
"paramet... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_18 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldViewTarGzFileContent() throws Exception {\n // given\n createTarGzArchive(\"file.tar.gz\", \"A.log\", \"content\");\n ByteArrayServletOutputStream outputStream = mockResponseOutputStream();\n\n // when\n logViewEndpoint.view(\"A.log\", \"file.... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/view\")\n public void view(@RequestParam String filename,\n @RequestParam(required = false) String base,\n @RequestParam(required = false) Integer tailLines,\n HttpServletResponse response) throws IOException {\n secur... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_9 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldSetFileTypeForArchive() throws Exception {\n // given\n createFile(\"A.log.tar.gz\", \"x\", now);\n\n // when\n logViewEndpoint.list(model, SortBy.FILENAME, false, null);\n\n // then\n assertThat(getFileEntries().get(0).getFileType(), i... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_14 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldListZipContent() throws Exception {\n // given\n createZipArchive(\"file.zip\", \"A.log\", \"content\");\n\n // when\n logViewEndpoint.list(model, SortBy.FILENAME, false, \"file.zip\");\n\n // then\n List<FileEntry> fileEntries = getFil... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_15 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldViewZipFileContent() throws Exception {\n // given\n createZipArchive(\"file.zip\", \"A.log\", \"content\");\n ByteArrayServletOutputStream outputStream = mockResponseOutputStream();\n\n // when\n logViewEndpoint.view(\"A.log\", \"file.zip\", ... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/view\")\n public void view(@RequestParam String filename,\n @RequestParam(required = false) String base,\n @RequestParam(required = false) Integer tailLines,\n HttpServletResponse response) throws IOException {\n secur... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_8 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldSetFileTypeForFile() throws Exception {\n // given\n createFile(\"A.log\", \"x\", now);\n\n // when\n logViewEndpoint.list(model, SortBy.FILENAME, false, null);\n\n // then\n assertThat(getFileEntries().get(0).getFileType(), is(FileType... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_19 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test(expected = UnsupportedOperationException.class)\n public void shouldThrowExceptionWhenCallingTailForTarGz() throws Exception {\n // given\n createTarGzArchive(\"file.tar.gz\", \"A.log\", \"content\");\n\n // when\n logViewEndpoint.view(\"A.log\", \"file.tar.gz\", 1, res... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/view\")\n public void view(@RequestParam String filename,\n @RequestParam(required = false) String base,\n @RequestParam(required = false) Integer tailLines,\n HttpServletResponse response) throws IOException {\n secur... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_23 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldReturnNullEndpointType() {\n assertThat(logViewEndpoint.getEndpointType(), is(nullValue()));\n }",
"class_method_signature": "LogViewEndpointTest.shouldReturnNullEndpointType()",
"constructor": false,
"full_signature": "@Test public void shouldReturnNullEndpoint... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@Override\n public Class<? extends Endpoint> getEndpointType() {\n return null;\n }",
"class_method_signature": "LogViewEndpoint.getEndpointType()",
"constructor": false,
"full_signature": "@Override public Class<? extends Endpoint> getEndpointType()",
"identifier": "getEndpointType",
... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_4 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldListSortedByFilename() throws Exception {\n // given\n createFile(\"B.log\", \"x\", now);\n createFile(\"A.log\", \"x\", now);\n createFile(\"C.log\", \"x\", now);\n\n // when\n logViewEndpoint.list(model, SortBy.FILENAME, false, null);... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_12 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldContainEmptyParentLinkInNestedSubfolder() throws Exception {\n // given\n temporaryFolder.newFolder(\"subfolder\");\n temporaryFolder.newFolder(\"subfolder\", \"nested\");\n\n // when\n logViewEndpoint.list(model, SortBy.FILENAME, false, \"sub... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_3 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldReturnEmptyFileListForEmptyDirectory() throws Exception {\n // when\n logViewEndpoint.list(model, SortBy.FILENAME, false, null);\n\n // then\n assertThat(model.containsAttribute(\"files\"), is(true));\n assertThat(getFileEntries(), hasSize(0))... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_24 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldNotAllowToListFileOutsideRoot() throws Exception {\n // given\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(containsString(\"this String argument must not contain the substring [..]\"));\n\n // when\n ... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/view\")\n public void view(@RequestParam String filename,\n @RequestParam(required = false) String base,\n @RequestParam(required = false) Integer tailLines,\n HttpServletResponse response) throws IOException {\n secur... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_25 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldViewFile() throws Exception {\n // given\n createFile(\"file.log\", \"abc\", now);\n ByteArrayServletOutputStream outputStream = mockResponseOutputStream();\n\n // when\n logViewEndpoint.view(\"file.log\", null, null, response);\n\n // ... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/view\")\n public void view(@RequestParam String filename,\n @RequestParam(required = false) String base,\n @RequestParam(required = false) Integer tailLines,\n HttpServletResponse response) throws IOException {\n secur... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_2 | {
"fields": [
{
"declarator": "environment",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Environment environment;",
"type": "Environment",
"var_name": "environment"
},
{
"declarator": "configuration",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void shouldCreateBeanForDeviatingPath() {\n assertThat(new LogViewEndpointAutoconfig().logViewEndpointWithDeviatingPath(environment, configuration), notNullValue());\n }",
"class_method_signature": "LogViewEndpointAutoconfigTest.shouldCreateBeanForDeviatingPath()",
"construc... | {
"fields": [
{
"declarator": "LOGGING_FILE = \"logging.file\"",
"modifier": "public static final",
"original_string": "public static final String LOGGING_FILE = \"logging.file\";",
"type": "String",
"var_name": "LOGGING_FILE"
},
{
"declarator": "LOGGING_PATH = \"loggin... | {
"body": "@ConditionalOnProperty(ENDPOINTS_LOGVIEW_PATH)\n @ConditionalOnMissingBean(LogViewEndpoint.class)\n @Bean\n public LogViewEndpoint logViewEndpointWithDeviatingPath(Environment environment, EndpointConfiguration configuration) {\n return new LogViewEndpoint(configuration.getPath(), configura... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
31334852_13 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
"decl... | {
"body": "@Test\n public void shouldIncludeSubfolderEntry() throws Exception {\n // given\n temporaryFolder.newFolder(\"subfolder\");\n\n // when\n logViewEndpoint.list(model, SortBy.FILENAME, false, null);\n\n // then\n List<FileEntry> fileEntries = getFileEntries();\n ... | {
"fields": [
{
"declarator": "fileProviders",
"modifier": "private final",
"original_string": "private final List<FileProvider> fileProviders;",
"type": "List<FileProvider>",
"var_name": "fileProviders"
},
{
"declarator": "freemarkerConfig",
"modifier": "private ... | {
"body": "@RequestMapping(\"/\")\n @ResponseBody\n public String list(Model model, // TODO model should no longer be injected\n @RequestParam(required = false, defaultValue = \"FILENAME\") SortBy sortBy,\n @RequestParam(required = false, defaultValue = \"false\") boo... | {
"created": null,
"fork": null,
"fork_count": 16,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31334852,
"size": 158,
"stargazer_count": 32,
"stars": null,
"updates": null,
"url": "https://github.com/lukashinsch/spring-boot-actuator-logview"
} |
18830102_283 | {
"fields": [],
"file": "odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/datasource/AnnotationValueAccessTest.java",
"identifier": "AnnotationValueAccessTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getPropertyValueNull() throws ODataException {\n AnnotationValueAccess ava = new AnnotationValueAccess();\n SimpleEntity data = new SimpleEntity();\n EdmProperty property = mockProperty(\"Name\");\n\n Object value = ava.getPropertyValue(data, property);\n\n Assert.assert... | {
"fields": [
{
"declarator": "annotationHelper = new AnnotationHelper()",
"modifier": "private final",
"original_string": "private final AnnotationHelper annotationHelper = new AnnotationHelper();",
"type": "AnnotationHelper",
"var_name": "annotationHelper"
}
],
"file": "oda... | {
"body": "@Override\n public <T> Object getPropertyValue(final T data, final EdmProperty property) throws ODataException {\n if (data == null) {\n return null;\n } else if (annotationHelper.isEdmAnnotated(data)) {\n return annotationHelper.getValueForProperty(data, property.getName());\n }\n t... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_779 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonLinkConsumerTest.java",
"identifier": "JsonLinkConsumerTest",
"interfaces": "",
"superclass": "extends AbstractConsumerTest"
} | {
"body": "@Test(expected = EntityProviderException.class)\n public void wrongTagName() throws Exception {\n final String link = \"{\\\"URI\\\":\\\"http://somelink\\\"}\";\n JsonReader reader = new JsonReader(new InputStreamReader(createContentAsStream(link)));\n new JsonLinkConsumer().readLink(reader, null... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/JsonLinkConsumer.java",
"identifier": "JsonLinkConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonLinkConsumer.readLink(final JsonReader reader, final EdmEntitySet entitySet... | {
"body": "public String readLink(final JsonReader reader, final EdmEntitySet entitySet) throws EntityProviderException {\n try {\n String result;\n reader.beginObject();\n String nextName = reader.nextName();\n final boolean wrapped = FormatJson.D.equals(nextName);\n if (wrapped) {\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_329 | {
"fields": [
{
"declarator": "listsProcessor",
"modifier": "private",
"original_string": "private ListsProcessor listsProcessor;",
"type": "ListsProcessor",
"var_name": "listsProcessor"
}
],
"file": "odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/processor/L... | {
"body": "@Test\n public void testSkipOnly() {\n String url = \"Rooms?$orderby=Seats%20desc&$skip=000000&$top=200\";\n String result = listsProcessor.percentEncodeNextLink(url);\n Assert.assertEquals(\"Rooms?$orderby=Seats%20desc&$top=200\", result);\n\n String url2 = \"Rooms?$orderby=Seats%20desc&$skip... | {
"fields": [
{
"declarator": "SERVER_PAGING_SIZE = 100",
"modifier": "private static final",
"original_string": "private static final int SERVER_PAGING_SIZE = 100;",
"type": "int",
"var_name": "SERVER_PAGING_SIZE"
},
{
"declarator": "valueAccess",
"modifier": "pr... | {
"body": "String percentEncodeNextLink(final String link) {\n if (link == null) {\n return null;\n }\n\n return link.replaceAll(\"\\\\$skiptoken=.+?(?:&|$)\", \"\")\n .replaceAll(\"\\\\$skip=.+?(?:&|$)\", \"\")\n .replaceFirst(\"(?:\\\\?|&)$\", \"\"); // Remove potentially trailing \"?\" ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_796 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/XmlFeedConsumerTest.java",
"identifier": "XmlFeedConsumerTest",
"interfaces": "",
"superclass": "extends AbstractXmlConsumerTest"
} | {
"body": "@Test\n public void readEmployeesFeedWithInlineCountValid() throws Exception {\n // prepare\n String content = readFile(\"feed_employees_full.xml\");\n assertNotNull(content);\n\n EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Employees\");\n Inp... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlFeedConsumer.java",
"identifier": "XmlFeedConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "XmlFeedConsumer.readFeed(final XMLStreamReader reader, final EntityInfoAggregator... | {
"body": "public ODataDeltaFeed readFeed(final XMLStreamReader reader, final EntityInfoAggregator eia,\n final EntityProviderReadProperties readProperties) throws EntityProviderException {\n try {\n // read xml tag\n reader.require(XMLStreamConstants.START_DOCUMENT, null, null);\n reader.nextT... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_846 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(XmlEntityConsumerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(XmlEntityConsumerTest.class.getName());",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testReadFeedWithInlineCountAndNextLink() throws Exception {\n // prepare\n EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Employees\");\n String content = readFile(\"feed_employees_full.xml\");\n ... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlEntityConsumer.java",
"identifier": "XmlEntityConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "XmlEntityConsumer.XmlEntityConsumer()",
"constructor": true,
"ful... | {
"body": "public ODataDeltaFeed readFeed(final EdmEntitySet entitySet, final InputStream content,\n final EntityProviderReadProperties properties) throws EntityProviderException {\n XMLStreamReader reader = null;\n EntityProviderException cachedException = null;\n\n try {\n reader = XmlHelper.crea... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_145 | {
"fields": [
{
"declarator": "objJPAEdmSchemaTest",
"modifier": "private",
"original_string": "private JPAEdmSchemaTest objJPAEdmSchemaTest;",
"type": "JPAEdmSchemaTest",
"var_name": "objJPAEdmSchemaTest"
},
{
"declarator": "objJPAEdmSchema",
"modifier": "private... | {
"body": "@Test\n public void testGetJPAEdmComplexTypeView() {\n assertNull(objJPAEdmSchema.getJPAEdmComplexTypeView());\n }",
"class_method_signature": "JPAEdmSchemaTest.testGetJPAEdmComplexTypeView()",
"constructor": false,
"full_signature": "@Test public void testGetJPAEdmComplexTypeView()",
"identif... | {
"fields": [
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schema;",
"type": "Schema",
"var_name": "schema"
},
{
"declarator": "complexTypeView",
"modifier": "private",
"original_string": "private JPAEdmComplexTypeView ... | {
"body": "@Override\n public JPAEdmComplexTypeView getJPAEdmComplexTypeView() {\n return complexTypeView;\n }",
"class_method_signature": "JPAEdmSchema.getJPAEdmComplexTypeView()",
"constructor": false,
"full_signature": "@Override public JPAEdmComplexTypeView getJPAEdmComplexTypeView()",
"identifier": ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_515 | {
"fields": [
{
"declarator": "exceptionMapper",
"modifier": "",
"original_string": "ODataExceptionMapperImpl exceptionMapper;",
"type": "ODataExceptionMapperImpl",
"var_name": "exceptionMapper"
},
{
"declarator": "uri",
"modifier": "",
"original_string": "U... | {
"body": "@Test\n public void dollarFormatUnknown() throws Exception {\n MultivaluedMap<String, String> queryParameters = new MultivaluedHashMap<String, String>();\n queryParameters.putSingle(\"$format\", \"someFormat\");\n when(exceptionMapper.uriInfo.getQueryParameters()).thenReturn(queryParameters);\n\n... | {
"fields": [
{
"declarator": "DOLLAR_FORMAT = \"$format\"",
"modifier": "private static final",
"original_string": "private static final String DOLLAR_FORMAT = \"$format\";",
"type": "String",
"var_name": "DOLLAR_FORMAT"
},
{
"declarator": "DOLLAR_FORMAT_JSON = \"json\... | {
"body": "@Override\n public Response toResponse(final Exception exception) {\n ODataResponse response;\n try {\n if (exception instanceof WebApplicationException) {\n response = handleWebApplicationException(exception);\n } else {\n response = handleException(exception);\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_450 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(XmlEntityDeserializerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(XmlEntityDeserializerTest.class.getName());",
"type": "Logger",
"var_name": "L... | {
"body": "@Test\n public void readContentOnlyRoom() throws Exception {\n // prepare\n String content = readFile(\"RoomContentOnly.xml\");\n EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Rooms\");\n InputStream contentBody = createContentAsStream(content);\n\... | {
"fields": [],
"file": "odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/XmlEntityDeserializer.java",
"identifier": "XmlEntityDeserializer",
"interfaces": "",
"methods": [
{
"class_method_signature": "XmlEntityDeserializer.XmlEntityDeserializer()",
... | {
"body": "public ODataEntry readEntry(final EdmEntitySet entitySet, final EntityStream entity)\n throws EntityProviderException {\n XMLStreamReader reader = null;\n EntityProviderException cachedException = null;\n\n try {\n reader = XmlHelper.createStreamReader(entity.getContent());\n Entity... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_43 | {
"fields": [
{
"declarator": "STR_LOCAL_URI = \"http://localhost:8080/org.apache.olingo.odata2.processor.ref.web/\"",
"modifier": "private static final",
"original_string": "private static final String STR_LOCAL_URI = \"http://localhost:8080/org.apache.olingo.odata2.processor.ref.web/\";",
... | {
"body": "@Test(expected = ODataJPARuntimeException.class)\n public void testProcessFunctionImportUriInfo() throws ODataJPARuntimeException {\n try {\n objJPAProcessorImpl.process(getFunctionImportUriInfo());\n } catch (ODataJPAModelException e) {\n fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e... | {
"fields": [
{
"declarator": "DELTATOKEN = \"!deltatoken\"",
"modifier": "private static final",
"original_string": "private static final String DELTATOKEN = \"!deltatoken\";",
"type": "String",
"var_name": "DELTATOKEN"
},
{
"declarator": "oDataJPAContext",
"modi... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Override\n public List<Object> process(final GetFunctionImportUriInfo uriParserResultView)\n throws ODataJPAModelException, ODataJPARuntimeException {\n\n JPAMethodContext jpaMethodContext = JPAMethodContext.createBuilder(\n JPQLContextType.FUNCTION, uri... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_903 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonFeedConsumerTest.java",
"identifier": "JsonFeedConsumerTest",
"interfaces": "",
"superclass": "extends AbstractConsumerTest"
} | {
"body": "@Test(expected = EntityProviderException.class)\n public void wrongCountType() throws Exception {\n final EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Teams\");\n InputStream contentBody = createContentAsStream(\"{\\\"d\\\":{\\\"__count\\\":1,\\\"result... | {
"fields": [
{
"declarator": "reader",
"modifier": "private",
"original_string": "private JsonReader reader;",
"type": "JsonReader",
"var_name": "reader"
},
{
"declarator": "eia",
"modifier": "private",
"original_string": "private EntityInfoAggregator eia;"... | {
"body": "private void readFeed() throws IOException, EdmException, EntityProviderException {\n JsonToken peek = reader.peek();\n if (peek == JsonToken.BEGIN_ARRAY) {\n readArrayContent();\n } else {\n reader.beginObject();\n final String nextName = reader.nextName();\n if (FormatJson.D.... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_684 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/commons/ContentTypeTest.java",
"identifier": "ContentTypeTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testFormatParserInvalidParameterWithSpaces() {\n ContentType.create(\"aaa/bbb;x= y;a\");\n }",
"class_method_signature": "ContentTypeTest.testFormatParserInvalidParameterWithSpaces()",
"constructor": false,
"full_signature": "@Test(e... | {
"fields": [
{
"declarator": "KNOWN_MIME_TYPES = new HashSet<String>()",
"modifier": "private static final",
"original_string": "private static final Set<String> KNOWN_MIME_TYPES = new HashSet<String>();",
"type": "Set<String>",
"var_name": "KNOWN_MIME_TYPES"
},
{
"dec... | {
"body": "public static ContentType create(final String type, final String subtype) {\n return new ContentType(type, subtype, mapToODataFormat(type, subtype), null);\n }",
"class_method_signature": "ContentType.create(final String type, final String subtype)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_391 | {
"fields": [
{
"declarator": "expectedEx = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedEx = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedEx"
}
],
"file": "odata2-lib/... | {
"body": "@Test\n public void simplePropertyWithStringToNullMappingStandalone() throws Exception {\n String simplePropertyJson = \"{\\\"d\\\":{\\\"Age\\\":67}}\";\n JsonReader reader = prepareReader(simplePropertyJson);\n final EdmProperty edmProperty =\n (EdmProperty) MockFacade.getMockEdm().getEnt... | {
"fields": [],
"file": "odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/JsonPropertyDeserializer.java",
"identifier": "JsonPropertyDeserializer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonPropertyDeserializer.readPropertyStandalo... | {
"body": "public Map<String, Object> readPropertyStandalone(JsonReader reader, final EdmProperty edmProperty,\n final DeserializerProperties readProperties) throws EntityProviderException {\n return readPropertyStandalone(reader, EntityInfoAggregator.create(edmProperty), readProperties);\n }",
"class_meth... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_112 | {
"fields": [],
"file": "odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/callback/JPATombstoneCallBackTest.java",
"identifier": "JPATombstoneCallBackTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void TestNull() {\n\n JPATombstoneCallBack tombStoneCallBack = new JPATombstoneCallBack(null, null, null);\n\n TombstoneCallbackResult result = tombStoneCallBack.getTombstoneCallbackResult();\n assertEquals(\"?!deltatoken=\", result.getDeltaLink());\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "DELTA_TOKEN_STRING = \"?!deltatoken=\"",
"modifier": "private static final",
"original_string": "private static final String DELTA_TOKEN_STRING = \"?!deltatoken=\";",
"type": "String",
"var_name": "DELTA_TOKEN_STRING"
},
{
"declarator": "b... | {
"body": "@Override\n public TombstoneCallbackResult getTombstoneCallbackResult() {\n TombstoneCallbackResult jpaTombstoneCallBackResult = new TombstoneCallbackResult();\n\n jpaTombstoneCallBackResult.setDeltaLink(buildToken());\n return jpaTombstoneCallBackResult;\n }",
"class_method_signature": "JPATo... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_811 | {
"fields": [
{
"declarator": "XML_ERROR_DOCUMENT_SIMPLE =\n \"<?xml version='1.0' encoding='UTF-8'?>\\n\" +\n \"<error xmlns=\\\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\\\">\\n\" +\n \"\\t<code>ErrorCode</code>\\n\" +\n \"\\t<message xml:lang=\\\"en-US... | {
"body": "@Test(expected = EntityProviderException.class)\n public void invalidErrorDocumentMissingError() throws EntityProviderException {\n InputStream in = StringHelper.encapsulate(XML_ERROR_DOCUMENT_MISSING_ERROR);\n try {\n xedc.readError(in);\n fail(\"Expected exception was not thrown\");\n ... | {
"fields": [
{
"declarator": "AVAILABLE_LOCALES = new HashMap<String, Locale>()",
"modifier": "private final static",
"original_string": "private final static Map<String, Locale> AVAILABLE_LOCALES = new HashMap<String, Locale>();",
"type": "Map<String, Locale>",
"var_name": "AVAILAB... | {
"body": "public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException {\n XMLStreamReader reader = null;\n EntityProviderException cachedException = null;\n\n try {\n reader = XmlHelper.createStreamReader(errorDocument);\n return parserError(reader);\n } c... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_954 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonPropertyConsumerTest.java",
"identifier": "JsonPropertyConsumerTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test(expected = EntityProviderException.class)\n public void collectionWithWrongInnerTag() throws Exception {\n final EntityPropertyInfo info = EntityInfoAggregator.create(\n MockFacade.getMockEdm().getDefaultEntityContainer().getFunctionImport(\"AllUsedRoomIds\"));\n new JsonPropertyConsume... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/JsonPropertyConsumer.java",
"identifier": "JsonPropertyConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonPropertyConsumer.readPropertyStandalone(JsonReader reader, final Ed... | {
"body": "public List<?> readCollection(JsonReader reader, final EntityPropertyInfo propertyInfo,\n final EntityProviderReadProperties readProperties) throws EntityProviderException {\n final Object typeMapping = readProperties == null ? null :\n readProperties.getTypeMappings().get(propertyInfo.getNa... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_14 | {
"fields": [
{
"declarator": "builder = null",
"modifier": "",
"original_string": "JPAQueryBuilder builder = null;",
"type": "JPAQueryBuilder",
"var_name": "builder"
}
],
"file": "odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/... | {
"body": "@Test\n public void buildQueryGetEntityTest() {\n EdmMapping mapping = (EdmMapping) mockMapping();\n try {\n assertNotNull(builder.build((GetEntityUriInfo) mockURIInfo(mapping)));\n } catch (ODataException e) {\n fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJP... | {
"fields": [
{
"declarator": "em = null",
"modifier": "private",
"original_string": "private EntityManager em = null;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "pageSize = 0",
"modifier": "private",
"original_string": "private int pageS... | {
"body": "public JPAQueryInfo build(GetEntitySetUriInfo uriInfo) throws ODataJPARuntimeException {\n JPAQueryInfo queryInfo = new JPAQueryInfo();\n Query query = null;\n try {\n ODataJPATombstoneEntityListener listener = getODataJPATombstoneEntityListener((UriInfo) uriInfo);\n if (listener != null... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_407 | {
"fields": [
{
"declarator": "expectedEx = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedEx = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedEx"
}
],
"file": "odata2-lib/... | {
"body": "@Test\n public void complexPropertyNullValueNotAllowedButNotValidated() throws Exception {\n final EdmProperty property = (EdmProperty) MockFacade.getMockEdm().getDefaultEntityContainer()\n .getEntitySet(\"Employees\").getEntityType().getProperty(\"Location\");\n EdmFacets facets = mock(EdmFa... | {
"fields": [],
"file": "odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/JsonPropertyDeserializer.java",
"identifier": "JsonPropertyDeserializer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonPropertyDeserializer.readPropertyStandalo... | {
"body": "public Map<String, Object> readPropertyStandalone(JsonReader reader, final EdmProperty edmProperty,\n final DeserializerProperties readProperties) throws EntityProviderException {\n return readPropertyStandalone(reader, EntityInfoAggregator.create(edmProperty), readProperties);\n }",
"class_meth... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_738 | {
"fields": [
{
"declarator": "JSON_ERROR_DOCUMENT_SIMPLE = \"{\\\"error\\\":{\\\"code\\\":\\\"ErrorCode\\\",\" +\n \"\\\"message\\\":{\\\"lang\\\":\\\"en-US\\\",\\\"value\\\":\\\"Message\\\"}}}\"",
"modifier": "private static final",
"original_string": "private static final String JSON_ERR... | {
"body": "@Test(expected = EntityProviderException.class)\n public void invalidErrorDocument() throws EntityProviderException {\n InputStream in = StringHelper.encapsulate(JSON_ERROR_DOCUMENT_INVALID_CONTENT);\n try {\n jedc.readError(in);\n fail(\"Expected exception was not thrown\");\n } catch ... | {
"fields": [
{
"declarator": "DEFAULT_CHARSET = \"UTF-8\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_CHARSET = \"UTF-8\";",
"type": "String",
"var_name": "DEFAULT_CHARSET"
},
{
"declarator": "AVAILABLE_LOCALES = new Ha... | {
"body": "public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException {\n JsonReader reader = createJsonReader(errorDocument);\n try {\n return parseJson(reader);\n } catch (IOException e) {\n throw new EntityProviderException(\n EntityProviderExcept... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_692 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/commons/ContentTypeTest.java",
"identifier": "ContentTypeTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void testIsWildcard() {\n assertFalse(ContentType.create(\"aaa/bbb;x=y;a\").isWildcard());\n assertFalse(ContentType.create(\"aaa/*;x=y;a\").isWildcard());\n assertTrue(ContentType.create(\"*/*;x=y;a\").isWildcard());\n assertTrue(ContentType.create(\"*/*\").isWildcard());\n }"... | {
"fields": [
{
"declarator": "KNOWN_MIME_TYPES = new HashSet<String>()",
"modifier": "private static final",
"original_string": "private static final Set<String> KNOWN_MIME_TYPES = new HashSet<String>();",
"type": "Set<String>",
"var_name": "KNOWN_MIME_TYPES"
},
{
"dec... | {
"body": "public boolean isWildcard() {\n return (MEDIA_TYPE_WILDCARD.equals(type) && MEDIA_TYPE_WILDCARD.equals(subtype));\n }",
"class_method_signature": "ContentType.isWildcard()",
"constructor": false,
"full_signature": "public boolean isWildcard()",
"identifier": "isWildcard",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_368 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = \"Photo\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_VALUE = \"Photo\";",
"type": "String",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "FC_TARGET_PATH = \"Содержание\";... | {
"body": "@Test(expected = EntityProviderException.class)\n public void testMissingAssociation() throws Exception {\n final String xmlWithAssociation =\n \"<edmx:Edmx Version=\\\"1.0\\\" xmlns:edmx=\\\"\"\n + Edm.NAMESPACE_EDMX_2007_06\n + \"\\\">\"\n + \"<edmx:DataService... | {
"fields": [
{
"declarator": "inscopeMap = new HashMap<String, Set<String>>()",
"modifier": "private",
"original_string": "private Map<String, Set<String>> inscopeMap = new HashMap<String, Set<String>>();",
"type": "Map<String, Set<String>>",
"var_name": "inscopeMap"
},
{
... | {
"body": "public EdmDataServices readMetadata(final InputStream content, final boolean validate)//NOSONAR\n throws EntityProviderException, EdmException { \n try {\n initialize();\n EdmDataServices dataServices = new EdmDataServices();\n List<EdmSchema> schemas = new ArrayList<EdmSchema>();\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_387 | {
"fields": [
{
"declarator": "expectedEx = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedEx = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedEx"
}
],
"file": "odata2-lib/... | {
"body": "@Test\n public void simplePropertyWithNullMappingStandalone() throws Exception {\n String simplePropertyJson = \"{\\\"d\\\":{\\\"Age\\\":67}}\";\n JsonReader reader = prepareReader(simplePropertyJson);\n final EdmProperty edmProperty =\n (EdmProperty) MockFacade.getMockEdm().getEntityType(... | {
"fields": [],
"file": "odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/JsonPropertyDeserializer.java",
"identifier": "JsonPropertyDeserializer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonPropertyDeserializer.readPropertyStandalo... | {
"body": "public Map<String, Object> readPropertyStandalone(JsonReader reader, final EdmProperty edmProperty,\n final DeserializerProperties readProperties) throws EntityProviderException {\n return readPropertyStandalone(reader, EntityInfoAggregator.create(edmProperty), readProperties);\n }",
"class_meth... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_807 | {
"fields": [
{
"declarator": "XML_ERROR_DOCUMENT_SIMPLE =\n \"<?xml version='1.0' encoding='UTF-8'?>\\n\" +\n \"<error xmlns=\\\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\\\">\\n\" +\n \"\\t<code>ErrorCode</code>\\n\" +\n \"\\t<message xml:lang=\\\"en-US... | {
"body": "@Test(expected = EntityProviderException.class)\n public void invalidJson() throws EntityProviderException {\n InputStream in = StringHelper.encapsulate(XML_ERROR_DOCUMENT_INVALID_XML);\n try {\n xedc.readError(in);\n fail(\"Expected exception was not thrown\");\n } catch (EntityProvide... | {
"fields": [
{
"declarator": "AVAILABLE_LOCALES = new HashMap<String, Locale>()",
"modifier": "private final static",
"original_string": "private final static Map<String, Locale> AVAILABLE_LOCALES = new HashMap<String, Locale>();",
"type": "Map<String, Locale>",
"var_name": "AVAILAB... | {
"body": "public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException {\n XMLStreamReader reader = null;\n EntityProviderException cachedException = null;\n\n try {\n reader = XmlHelper.createStreamReader(errorDocument);\n return parserError(reader);\n } c... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_104 | {
"fields": [
{
"declarator": "edmProvider",
"modifier": "private static",
"original_string": "private static ODataJPAEdmProvider edmProvider;",
"type": "ODataJPAEdmProvider",
"var_name": "edmProvider"
}
],
"file": "odata2-jpa-processor/jpa-core/src/test/java/org/apache/oling... | {
"body": "@Test\n public void testGetAssociationSet() {\n AssociationSet associationSet = null;\n\n try {\n associationSet =\n edmProvider.getAssociationSet(\"salesorderprocessingContainer\", new FullQualifiedName(\"salesorderprocessing\",\n \"SalesOrderHeader_SalesOrderItem\"), \"S... | {
"fields": [
{
"declarator": "oDataJPAContext",
"modifier": "private",
"original_string": "private ODataJPAContext oDataJPAContext;",
"type": "ODataJPAContext",
"var_name": "oDataJPAContext"
},
{
"declarator": "jpaEdmModel",
"modifier": "private",
"original... | {
"body": "@Override\n public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association,\n final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException {\n\n EntityContainer container = null;\n if (!entityContainerInfos.containsKey(enti... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_554 | {
"fields": [
{
"declarator": "POST = \"POST\"",
"modifier": "private static final",
"original_string": "private static final String POST = \"POST\";",
"type": "String",
"var_name": "POST"
},
{
"declarator": "GET = \"GET\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void testBatchWithTwoChangeSets() throws BatchException, IOException {\n List<BatchPart> batch = new ArrayList<BatchPart>();\n\n Map<String, String> changeSetHeaders = new HashMap<String, String>();\n changeSetHeaders.put(\"content-type\", \"application/json\");\n changeSetHeade... | {
"fields": [
{
"declarator": "REG_EX_BOUNDARY =\n \"([a-zA-Z0-9_\\\\-\\\\.'\\\\+]{1,70})|\\\"([a-zA-Z0-9_\\\\-\\\\.'\\\\+\\\\s\\\\\" +\n \"(\\\\),/:=\\\\?]{1,69}[a-zA-Z0-9_\\\\-\\\\.'\\\\+\\\\(\\\\),/:=\\\\?])\\\"\"",
"modifier": "private static final",
"original_string": "private... | {
"body": "public InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) {\n if (boundary.matches(REG_EX_BOUNDARY)) {\n batchBoundary = boundary;\n } else {\n throw new IllegalArgumentException();\n }\n for (BatchPart batchPart : batchParts) {\n writer.append... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_411 | {
"fields": [
{
"declarator": "expectedEx = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedEx = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedEx"
}
],
"file": "odata2-lib/... | {
"body": "@Test(expected = EntityProviderException.class)\n public void invalidDoubleClosingBrackets() throws Exception {\n String simplePropertyJson = \"{\\\"d\\\":{\\\"Name\\\":\\\"Team 1\\\"}}}\";\n EdmProperty edmProperty =\n (EdmProperty) MockFacade.getMockEdm().getDefaultEntityContainer().getEnti... | {
"fields": [],
"file": "odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/JsonPropertyDeserializer.java",
"identifier": "JsonPropertyDeserializer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonPropertyDeserializer.readPropertyStandalo... | {
"body": "public Map<String, Object> readPropertyStandalone(JsonReader reader, final EdmProperty edmProperty,\n final DeserializerProperties readProperties) throws EntityProviderException {\n return readPropertyStandalone(reader, EntityInfoAggregator.create(edmProperty), readProperties);\n }",
"class_meth... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_942 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonPropertyConsumerTest.java",
"identifier": "JsonPropertyConsumerTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test(expected = EntityProviderException.class)\n public void complexPropertyMetadataInvalidTag() throws Exception {\n String complexPropertyJson =\n \"{\\\"__metadata\\\":{\\\"invalid\\\":\\\"RefScenario.c_City\\\"},\\\"PostalCode\\\":\\\"69124\\\",\\\"CityName\\\":\\\"Heidelberg\\\"}\";\n J... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/JsonPropertyConsumer.java",
"identifier": "JsonPropertyConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonPropertyConsumer.readPropertyStandalone(JsonReader reader, final Ed... | {
"body": "protected Object readPropertyValue(final JsonReader reader, final EntityPropertyInfo entityPropertyInfo,\n final Object typeMapping, final EntityProviderReadProperties readProperties) throws EntityProviderException {\n try {\n return entityPropertyInfo.isComplex() ?\n readComplexPrope... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_295 | {
"fields": [],
"file": "odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/datasource/AnnotationValueAccessTest.java",
"identifier": "AnnotationValueAccessTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setMappingValueNullMapping() throws Exception {\n AnnotationValueAccess ava = new AnnotationValueAccess();\n SimpleEntity data = new SimpleEntity();\n data.myMappedProperty = \"mapped property value\";\n EdmMapping mapping = null;\n\n Object value = null;\n ava.setMap... | {
"fields": [
{
"declarator": "annotationHelper = new AnnotationHelper()",
"modifier": "private final",
"original_string": "private final AnnotationHelper annotationHelper = new AnnotationHelper();",
"type": "AnnotationHelper",
"var_name": "annotationHelper"
}
],
"file": "oda... | {
"body": "@Override\n public <T, V> void setMappingValue(final T data, final EdmMapping mapping, final V value) throws ODataException {\n if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) {\n annotationHelper.setValueForProperty(data, mapping.getMediaResourceMimeTypeKey(), value);\n }... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_780 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonLinkConsumerTest.java",
"identifier": "JsonLinkConsumerTest",
"interfaces": "",
"superclass": "extends AbstractConsumerTest"
} | {
"body": "@Test(expected = EntityProviderException.class)\n public void wrongValueType() throws Exception {\n final String link = \"{\\\"uri\\\":false}\";\n JsonReader reader = new JsonReader(new InputStreamReader(createContentAsStream(link)));\n new JsonLinkConsumer().readLink(reader, null);\n }",
"cla... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/JsonLinkConsumer.java",
"identifier": "JsonLinkConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonLinkConsumer.readLink(final JsonReader reader, final EdmEntitySet entitySet... | {
"body": "public String readLink(final JsonReader reader, final EdmEntitySet entitySet) throws EntityProviderException {\n try {\n String result;\n reader.beginObject();\n String nextName = reader.nextName();\n final boolean wrapped = FormatJson.D.equals(nextName);\n if (wrapped) {\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_503 | {
"fields": [
{
"declarator": "JSON_ERROR_DOCUMENT_SIMPLE = \"{\\\"error\\\":{\\\"code\\\":\\\"ErrorCode\\\",\" +\n \"\\\"message\\\":{\\\"lang\\\":\\\"en-US\\\",\\\"value\\\":\\\"Message\\\"}}}\"",
"modifier": "private static final",
"original_string": "private static final String JSON_ERR... | {
"body": "@Test(expected = EntityProviderException.class)\n public void invalidEmptyDocument() throws EntityProviderException {\n InputStream in = StringHelper.encapsulate(\"\");\n try {\n jedc.readError(in);\n fail(\"Expected exception was not thrown\");\n } catch (EntityProviderException e) {\n... | {
"fields": [
{
"declarator": "DEFAULT_CHARSET = \"UTF-8\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_CHARSET = \"UTF-8\";",
"type": "String",
"var_name": "DEFAULT_CHARSET"
},
{
"declarator": "FOUND = \"' found.\"",
... | {
"body": "public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException {\n JsonReader reader = createJsonReader(errorDocument);\n try {\n return parseJson(reader);\n } catch (IOException e) {\n throw new EntityProviderException(\n EntityProviderExcept... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_153 | {
"fields": [
{
"declarator": "objJPAEdmEntitySet",
"modifier": "private static",
"original_string": "private static JPAEdmEntitySet objJPAEdmEntitySet;",
"type": "JPAEdmEntitySet",
"var_name": "objJPAEdmEntitySet"
},
{
"declarator": "objJPAEdmEntitySetTest",
"mod... | {
"body": "@Test\n public void testGetJPAEdmEntityTypeView() {\n assertNotNull(objJPAEdmEntitySet.getJPAEdmEntityTypeView());\n assertEquals(\"salesorderprocessing\", objJPAEdmEntitySet.getJPAEdmEntityTypeView().getpUnitName());\n }",
"class_method_signature": "JPAEdmEntitySetTest.testGetJPAEdmEntityTypeVie... | {
"fields": [
{
"declarator": "currentEntitySet = null",
"modifier": "private",
"original_string": "private EntitySet currentEntitySet = null;",
"type": "EntitySet",
"var_name": "currentEntitySet"
},
{
"declarator": "consistentEntitySetList = null",
"modifier": "p... | {
"body": "@Override\n public JPAEdmEntityTypeView getJPAEdmEntityTypeView() {\n return entityTypeView;\n }",
"class_method_signature": "JPAEdmEntitySet.getJPAEdmEntityTypeView()",
"constructor": false,
"full_signature": "@Override public JPAEdmEntityTypeView getJPAEdmEntityTypeView()",
"identifier": "ge... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_850 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(XmlEntityConsumerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(XmlEntityConsumerTest.class.getName());",
"type": "Logger",
"var_name": "LOG"
... | {
"body": "@Test\n public void readEntryNullProperty() throws Exception {\n final EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Employees\");\n final String content = EMPLOYEE_1_XML.replace(\"<d:EntryDate>1999-01-01T00:00:00</d:EntryDate>\",\n \"<d:EntryDate... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlEntityConsumer.java",
"identifier": "XmlEntityConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "XmlEntityConsumer.XmlEntityConsumer()",
"constructor": true,
"ful... | {
"body": "public ODataEntry readEntry(final EdmEntitySet entitySet, final InputStream content,\n final EntityProviderReadProperties properties) throws EntityProviderException {\n XMLStreamReader reader = null;\n EntityProviderException cachedException = null;\n\n try {\n reader = XmlHelper.createS... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_915 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonPropertyConsumerTest.java",
"identifier": "JsonPropertyConsumerTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void veryLongStringStandalone() throws Exception {\n char[] chars = new char[32768];\n Arrays.fill(chars, 0, 32768, 'a');\n String propertyValue = new String(chars);\n String simplePropertyJson = \"{\\\"d\\\":{\\\"Name\\\":\\\"\" + propertyValue + \"\\\"}}\";\n JsonReader rea... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/JsonPropertyConsumer.java",
"identifier": "JsonPropertyConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonPropertyConsumer.readPropertyStandalone(JsonReader reader, final Ed... | {
"body": "public Map<String, Object> readPropertyStandalone(JsonReader reader, final EdmProperty edmProperty,\n final EntityProviderReadProperties readProperties) throws EntityProviderException {\n return readPropertyStandalone(reader, EntityInfoAggregator.create(edmProperty), readProperties);\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_55 | {
"fields": [
{
"declarator": "edm",
"modifier": "private static",
"original_string": "private static Edm edm;",
"type": "Edm",
"var_name": "edm"
},
{
"declarator": "header",
"modifier": "private static",
"original_string": "private static SalesOrderHeader h... | {
"body": "@Test\n public void testCreateLink() {\n testCase = 0;\n try {\n ODataJPAContext context = mockODataJPAContext(false);\n JPALink link = new JPALink(context);\n Field processor = JPALink.class.\n getDeclaredField(\"jpaProcessor\");\n processor.setAccessible(true);\n ... | {
"fields": [
{
"declarator": "SPACE = \" \"",
"modifier": "private static final",
"original_string": "private static final String SPACE = \" \";",
"type": "String",
"var_name": "SPACE"
},
{
"declarator": "ODATA_COMMAND_FILTER = \"$filter\"",
"modifier": "private ... | {
"body": "public void create(final PostUriInfo uriInfo, final InputStream content, final String requestContentType,\n final String contentType) throws ODataJPARuntimeException, ODataJPAModelException {\n modifyLink((UriInfo) uriInfo, content, requestContentType);\n }",
"class_method_signature": "JPALink.c... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_446 | {
"fields": [],
"file": "odata2-lib/odata-client-core/src/test/java/org/apache/olingo/odata2/client/core/ep/deserializer/JsonFeedDeserializerTest.java",
"identifier": "JsonFeedDeserializerTest",
"interfaces": "",
"superclass": "extends AbstractDeserializerTest"
} | {
"body": "@Test\n public void feedWithTeamAndNextAndDelta() throws Exception {\n EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Teams\");\n String content =\n \"{\\\"d\\\":{\\\"results\\\":[{\" +\n \"\\\"__metadata\\\":{\\\"id\\\":\\\"http://local... | {
"fields": [
{
"declarator": "reader",
"modifier": "private",
"original_string": "private JsonReader reader;",
"type": "JsonReader",
"var_name": "reader"
},
{
"declarator": "eia",
"modifier": "private",
"original_string": "private EntityInfoAggregator eia;"... | {
"body": "private void readFeed() throws IOException, EdmException, EntityProviderException {\n JsonToken peek = reader.peek();\n if (peek == JsonToken.BEGIN_ARRAY) {\n readArrayContent();\n } else {\n reader.beginObject();\n final String nextName = reader.nextName();\n if (FormatJson.D.... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_1020 | {
"fields": [
{
"declarator": "edm",
"modifier": "private",
"original_string": "private Edm edm;",
"type": "Edm",
"var_name": "edm"
},
{
"declarator": "schemas",
"modifier": "private",
"original_string": "private List<Schema> schemas;",
"type": "List<S... | {
"body": "@Test\n public void writeServiceDocumentWithOneEnitySetTwoContainersTwoSchemas() throws Exception {\n List<EntitySet> entitySets = new ArrayList<EntitySet>();\n entitySets.add(new EntitySet().setName(\"Employees\"));\n\n List<EntityContainer> entityContainers = new ArrayList<EntityContainer>();\n... | {
"fields": [
{
"declarator": "DEFAULT_CHARSET = ContentType.CHARSET_UTF_8",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_CHARSET = ContentType.CHARSET_UTF_8;",
"type": "String",
"var_name": "DEFAULT_CHARSET"
},
{
"declarat... | {
"body": "public void writeServiceDocument(final Writer writer) throws EntityProviderException {\n\n EdmServiceMetadata serviceMetadata = edm.getServiceMetadata();\n\n try {\n XMLStreamWriter xmlStreamWriter = XmlHelper.getXMLOutputFactory().createXMLStreamWriter(writer);\n\n xmlStreamWriter.writeSta... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_201 | {
"fields": [
{
"declarator": "objJPAEdmReferentialConstraintRole = null",
"modifier": "private static",
"original_string": "private static JPAEdmReferentialConstraintRole objJPAEdmReferentialConstraintRole = null;",
"type": "JPAEdmReferentialConstraintRole",
"var_name": "objJPAEdmRe... | {
"body": "@Test\n public void testGetEdmReferentialConstraintRole() {\n try {\n objJPAEdmReferentialConstraintRole.getBuilder().build();\n } catch (ODataJPAModelException e) {\n fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2);\n } cat... | {
"fields": [
{
"declarator": "firstBuild = true",
"modifier": "private",
"original_string": "private boolean firstBuild = true;",
"type": "boolean",
"var_name": "firstBuild"
},
{
"declarator": "entityTypeView",
"modifier": "private",
"original_string": "pri... | {
"body": "@Override\n public ReferentialConstraintRole getEdmReferentialConstraintRole() {\n return currentRole;\n }",
"class_method_signature": "JPAEdmReferentialConstraintRole.getEdmReferentialConstraintRole()",
"constructor": false,
"full_signature": "@Override public ReferentialConstraintRole getEdmRe... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_651 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/edm/provider/EdmxProviderTest.java",
"identifier": "EdmxProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void nullAnnotationsAtNavigationProperty() throws Exception {\n Edm edm = createEdm();\n assertNotNull(edm);\n EdmNavigationProperty property =\n (EdmNavigationProperty) edm.getEntityType(\"Self\", \"Employee\").getProperty(\"ne_Manager\");\n EdmAnnotations annotations = ... | {
"fields": [
{
"declarator": "dataServices",
"modifier": "private",
"original_string": "private DataServices dataServices;",
"type": "DataServices",
"var_name": "dataServices"
}
],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/provider/EdmxPr... | {
"body": "@Override\n public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException {\n for (Schema schema : dataServices.getSchemas()) {\n if (schema.getNamespace().equals(edmFQName.getNamespace())) {\n for (EntityType entityType : schema.getEntityTypes()) {\n if ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_344 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = \"Photo\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_VALUE = \"Photo\";",
"type": "String",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "FC_TARGET_PATH = \"Содержание\";... | {
"body": "@Test\n public void test() throws XMLStreamException, \n EntityProviderException, EdmException, UnsupportedEncodingException {\n int i = 0;\n XmlMetadataDeserializer parser = new XmlMetadataDeserializer();\n InputStream reader = createStreamReader(xml);\n EdmDataServices result = parser.readM... | {
"fields": [
{
"declarator": "inscopeMap = new HashMap<String, Set<String>>()",
"modifier": "private",
"original_string": "private Map<String, Set<String>> inscopeMap = new HashMap<String, Set<String>>();",
"type": "Map<String, Set<String>>",
"var_name": "inscopeMap"
},
{
... | {
"body": "public EdmDataServices readMetadata(final InputStream content, final boolean validate)//NOSONAR\n throws EntityProviderException, EdmException { \n try {\n initialize();\n EdmDataServices dataServices = new EdmDataServices();\n List<EdmSchema> schemas = new ArrayList<EdmSchema>();\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_714 | {
"fields": [
{
"declarator": "EXPECTED = \"{\"\n + \"\\\"request\\\":{\\\"method\\\":\\\"GET\\\",\\\"uri\\\":\\\"http://test/entity\\\",\\\"protocol\\\":null},\"\n + \"\\\"response\\\":{\\\"status\\\":{\\\"code\\\":200,\\\"info\\\":\\\"OK\\\"}},\"\n + \"\\\"server\\\":{\\\"version\\\":null}}... | {
"body": "@Test\n public void exception() throws Exception {\n final ODataContext context = mockContext(ODataHttpMethod.GET);\n final ODataResponse wrappedResponse = mockResponse(HttpStatusCodes.BAD_REQUEST, null, null);\n\n ODataMessageException exception = mock(ODataMessageException.class);\n when(exc... | {
"fields": [
{
"declarator": "ODATA_DEBUG_QUERY_PARAMETER = \"odata-debug\"",
"modifier": "public static final",
"original_string": "public static final String ODATA_DEBUG_QUERY_PARAMETER = \"odata-debug\";",
"type": "String",
"var_name": "ODATA_DEBUG_QUERY_PARAMETER"
},
{
... | {
"body": "public ODataResponse wrapResponse() {\n try {\n final List<DebugInfo> parts = createParts();\n ODataResponseBuilder builder = ODataResponse.status(HttpStatusCodes.OK)\n .entity(isJson ? wrapInJson(parts) : wrapInHtml(parts))\n .contentHeader(isJson ? HttpContentType.APPLICATI... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_597 | {
"fields": [
{
"declarator": "annotationsProvider",
"modifier": "private",
"original_string": "private EdmAnnotationsImplProv annotationsProvider;",
"type": "EdmAnnotationsImplProv",
"var_name": "annotationsProvider"
},
{
"declarator": "annotationsProviderWithNullEemen... | {
"body": "@Test\n public void testElements() {\n List<? extends EdmAnnotationElement> annotations = annotationsProvider.getAnnotationElements();\n assertEquals(1, annotations.size());\n\n Iterator<? extends EdmAnnotationElement> iterator = annotations.iterator();\n while (iterator.hasNext()) {\n Ed... | {
"fields": [
{
"declarator": "annotationAttributes",
"modifier": "private",
"original_string": "private List<EdmAnnotationAttribute> annotationAttributes;",
"type": "List<EdmAnnotationAttribute>",
"var_name": "annotationAttributes"
},
{
"declarator": "annotationElement... | {
"body": "@Override\n public List<EdmAnnotationElement> getAnnotationElements() {\n return annotationElements;\n }",
"class_method_signature": "EdmAnnotationsImplProv.getAnnotationElements()",
"constructor": false,
"full_signature": "@Override public List<EdmAnnotationElement> getAnnotationElements()",
... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_578 | {
"fields": [
{
"declarator": "BASE64_ENCODING = \"BASE64\"",
"modifier": "private static final",
"original_string": "private static final String BASE64_ENCODING = \"BASE64\";",
"type": "String",
"var_name": "BASE64_ENCODING"
}
],
"file": "odata2-lib/odata-core/src/test/java/... | {
"body": "@Test\n public void testValidateContentTypeApplicationHTTP() throws BatchException {\n List<String> contentTypeValues = Arrays.asList(new String[] { HttpContentType.APPLICATION_HTTP });\n final Header headers = makeHeaders(HttpHeaders.CONTENT_TYPE, contentTypeValues);\n\n BatchTransformatorCommon... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/v2/BatchTransformatorCommon.java",
"identifier": "BatchTransformatorCommon",
"interfaces": "",
"methods": [
{
"class_method_signature": "BatchTransformatorCommon.validateContentType(final Header headers)... | {
"body": "public static void validateContentType(final Header headers) throws BatchException {\n List<String> contentTypes = headers.getHeaders(HttpHeaders.CONTENT_TYPE);\n\n if (contentTypes.isEmpty()) {\n throw new BatchException(BatchException.MISSING_CONTENT_TYPE);\n }\n if (!headers.isHeaderMat... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_128 | {
"fields": [
{
"declarator": "parser",
"modifier": "private",
"original_string": "private ODataEntityParser parser;",
"type": "ODataEntityParser",
"var_name": "parser"
}
],
"file": "odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/OData... | {
"body": "@Test\n public void testParseURISegmentInvalidIndex02() {\n try {\n parser = new ODataEntityParser(mock(\"JPATypeMock(2)\"));\n UriInfo uriInfo = parser.parseURISegment(3, -1);\n assertNull(uriInfo);\n } catch (ODataJPARuntimeException e) {\n fail(ODataJPATestConstants.EXCEPTION_... | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private ODataJPAContext context;",
"type": "ODataJPAContext",
"var_name": "context"
},
{
"declarator": "edm",
"modifier": "private",
"original_string": "private Edm edm;",
... | {
"body": "public final UriInfo parseURISegment(final int segmentFromIndex, final int segmentToIndex)\n throws ODataJPARuntimeException {\n UriInfo uriInfo = null;\n if (segmentFromIndex == segmentToIndex || segmentFromIndex > segmentToIndex || segmentFromIndex < 0) {\n return uriInfo;\n }\n try... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_981 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = \"Photo\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_VALUE = \"Photo\";",
"type": "String",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "FC_TARGET_PATH = \"Содержание\";... | {
"body": "@Test\n public void testFunctionImportEntityWithoutEntitySet() throws XMLStreamException, EntityProviderException {\n final String xmWithEntityContainer =\n \"<edmx:Edmx Version=\\\"1.0\\\" xmlns:edmx=\\\"\"\n + Edm.NAMESPACE_EDMX_2007_06\n + \"\\\">\"\n + \"<edm... | {
"fields": [
{
"declarator": "inscopeMap = new HashMap<String, Set<String>>()",
"modifier": "private",
"original_string": "private Map<String, Set<String>> inscopeMap = new HashMap<String, Set<String>>();",
"type": "Map<String, Set<String>>",
"var_name": "inscopeMap"
},
{
... | {
"body": "public DataServices readMetadata(final XMLStreamReader reader, final boolean validate)\n throws EntityProviderException {\n try {\n initialize();\n DataServices dataServices = new DataServices();\n List<Schema> schemas = new ArrayList<Schema>();\n\n while (reader.hasNext()\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_606 | {
"fields": [
{
"declarator": "metadata",
"modifier": "private static",
"original_string": "private static String metadata;",
"type": "String",
"var_name": "metadata"
}
],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/edm/provider/EdmServiceMetada... | {
"body": "@Test(expected = ODataException.class)\n public void errorEdmProvider() throws Exception {\n EdmServiceMetadata serviceMetadata = new EdmServiceMetadataImplProv(null);\n serviceMetadata.getMetadata();\n }",
"class_method_signature": "EdmServiceMetadataImplProvTest.errorEdmProvider()",
"construc... | {
"fields": [
{
"declarator": "EDM_PROVIDER_EXEPTION = \"EdmProvider is not set.\"",
"modifier": "private static final",
"original_string": "private static final String EDM_PROVIDER_EXEPTION = \"EdmProvider is not set.\";",
"type": "String",
"var_name": "EDM_PROVIDER_EXEPTION"
},... | {
"body": "@Override\n public InputStream getMetadata() throws ODataException {\n if(edmProvider == null){\n throw new ODataException(EDM_PROVIDER_EXEPTION);\n }\n if (schemas == null) {\n schemas = edmProvider.getSchemas();\n }\n OutputStreamWriter writer = null;\n CircleStreamBuffer cs... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_256 | {
"fields": [
{
"declarator": "annotationHelper",
"modifier": "private final",
"original_string": "private final AnnotationHelper annotationHelper;",
"type": "AnnotationHelper",
"var_name": "annotationHelper"
}
],
"file": "odata2-annotation-processor/annotation-processor-core... | {
"body": "@Test\n public void extractEntityTypeNameViaNavigation() throws Exception {\n Field field = NavigationAnnotated.class.getDeclaredField(\"navigationPropertySimpleEntity\");\n EdmNavigationProperty enp = field.getAnnotation(EdmNavigationProperty.class);\n\n String name = annotationHelper.extractEnt... | {
"fields": [
{
"declarator": "DEFAULT_CONTAINER_NAME = \"DefaultContainer\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CONTAINER_NAME = \"DefaultContainer\";",
"type": "String",
"var_name": "DEFAULT_CONTAINER_NAME"
}
],
"file"... | {
"body": "public String extractEntityTypeName(final EdmNavigationProperty enp, final Class<?> fallbackClass) {\n Class<?> entityTypeClass = enp.toType();\n return extractEntityTypeName(entityTypeClass == Object.class ? fallbackClass : entityTypeClass);\n }",
"class_method_signature": "AnnotationHelper.extra... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_743 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/XmlPropertyConsumerTest.java",
"identifier": "XmlPropertyConsumerTest",
"interfaces": "",
"superclass": "extends AbstractXmlConsumerTest"
} | {
"body": "@Test\n public void readIntegerPropertyAsLong() throws Exception {\n String xml = \"<Age xmlns=\\\"\" + Edm.NAMESPACE_D_2007_08 + \"\\\">67</Age>\";\n XMLStreamReader reader = createReaderForTest(xml, true);\n final EdmProperty property =\n (EdmProperty) MockFacade.getMockEdm().getEntityTy... | {
"fields": [
{
"declarator": "TRUE = \"true\"",
"modifier": "protected static final",
"original_string": "protected static final String TRUE = \"true\";",
"type": "String",
"var_name": "TRUE"
},
{
"declarator": "FALSE = \"false\"",
"modifier": "protected static f... | {
"body": "public Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property,\n final EntityProviderReadProperties readProperties) throws EntityProviderException {\n return readProperty(reader, EntityInfoAggregator.create(property), readProperties);\n }",
"class_method_signat... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_190 | {
"fields": [
{
"declarator": "VARIANT1 = 1",
"modifier": "private final static",
"original_string": "private final static int VARIANT1 = 1;",
"type": "int",
"var_name": "VARIANT1"
},
{
"declarator": "VARIANT2 = 2",
"modifier": "private final static",
"origi... | {
"body": "@Test\n public void testBuildAssociationEnd() {\n assertEquals(\"SOID\", objJPAEdmAssociationEnd.getEdmAssociationEnd1().getType().getName());\n assertEquals(new FullQualifiedName(\"salesorderprocessing\", \"SOID\"), objJPAEdmAssociationEnd.getEdmAssociationEnd1()\n .getType());\n assertTr... | {
"fields": [
{
"declarator": "entityTypeView = null",
"modifier": "private",
"original_string": "private JPAEdmEntityTypeView entityTypeView = null;",
"type": "JPAEdmEntityTypeView",
"var_name": "entityTypeView"
},
{
"declarator": "propertyView = null",
"modifier... | {
"body": "@Override\n public AssociationEnd getEdmAssociationEnd1() {\n return currentAssociationEnd1;\n }",
"class_method_signature": "JPAEdmAssociationEnd.getEdmAssociationEnd1()",
"constructor": false,
"full_signature": "@Override public AssociationEnd getEdmAssociationEnd1()",
"identifier": "getEdmA... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_79 | {
"fields": [
{
"declarator": "objJPAEdmMappingModelServiceTest",
"modifier": "private static",
"original_string": "private static JPAEdmMappingModelServiceTest objJPAEdmMappingModelServiceTest;",
"type": "JPAEdmMappingModelServiceTest",
"var_name": "objJPAEdmMappingModelServiceTest"... | {
"body": "@Test\n public void testMapJPAPersistenceUnit() {\n assertEquals(PERSISTENCE_UNIT_NAME_EDM, objJPAEdmMappingModelServiceTest\n .mapJPAPersistenceUnit(PERSISTENCE_UNIT_NAME_JPA));\n }",
"class_method_signature": "JPAEdmMappingModelServiceTest.testMapJPAPersistenceUnit()",
"constructor": fals... | {
"fields": [
{
"declarator": "mappingModelExists = true",
"modifier": "",
"original_string": "boolean mappingModelExists = true;",
"type": "boolean",
"var_name": "mappingModelExists"
},
{
"declarator": "mappingModel",
"modifier": "private",
"original_string... | {
"body": "@Override\n public String mapJPAPersistenceUnit(final String persistenceUnitName) {\n\n JPAPersistenceUnitMapType persistenceUnit = mappingModel.getPersistenceUnit();\n if (persistenceUnit.getName().equals(persistenceUnitName)) {\n return persistenceUnit.getEDMSchemaNamespace();\n }\n\n r... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_939 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonPropertyConsumerTest.java",
"identifier": "JsonPropertyConsumerTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test(expected = EntityProviderException.class)\n public void complexPropertyNullValueNotAllowed() throws Exception {\n final String locationProperty = \"{\\\"Location\\\":null}\";\n JsonReader reader = prepareReader(locationProperty);\n EdmProperty property =\n (EdmProperty) MockFacade.ge... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/JsonPropertyConsumer.java",
"identifier": "JsonPropertyConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonPropertyConsumer.readPropertyStandalone(JsonReader reader, final Ed... | {
"body": "public Map<String, Object> readPropertyStandalone(JsonReader reader, final EdmProperty edmProperty,\n final EntityProviderReadProperties readProperties) throws EntityProviderException {\n return readPropertyStandalone(reader, EntityInfoAggregator.create(edmProperty), readProperties);\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_893 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonServiceDocumentConsumerTest.java",
"identifier": "JsonServiceDocumentConsumerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws EntityProviderException {\n JsonServiceDocumentConsumer parser = new JsonServiceDocumentConsumer();\n InputStream in = ClassLoader.class.getResourceAsStream(\"/svcDocJson.json\");\n ServiceDocument serviceDoc = parser.parseJson(in);\n List<EdmEntitySetInfo> en... | {
"fields": [
{
"declarator": "DEFAULT_CHARSET = \"UTF-8\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_CHARSET = \"UTF-8\";",
"type": "String",
"var_name": "DEFAULT_CHARSET"
},
{
"declarator": "entitySets = new ArrayList... | {
"body": "public ServiceDocumentImpl parseJson(final InputStream in) throws EntityProviderException {\n return readServiceDocument(createJsonReader(in));\n }",
"class_method_signature": "JsonServiceDocumentConsumer.parseJson(final InputStream in)",
"constructor": false,
"full_signature": "public ServiceDoc... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_96 | {
"fields": [
{
"declarator": "objJPAEdmMappingModelServiceTest",
"modifier": "private static",
"original_string": "private static JPAEdmMappingModelServiceTest objJPAEdmMappingModelServiceTest;",
"type": "JPAEdmMappingModelServiceTest",
"var_name": "objJPAEdmMappingModelServiceTest"... | {
"body": "@Test\n public void testCheckExclusionOfJPAEmbeddableAttributeType() {\n assertTrue(!objJPAEdmMappingModelServiceTest.checkExclusionOfJPAEmbeddableAttributeType(EMBEDDABLE_TYPE_NAME_JPA,\n EMBEDDABLE_ATTRIBUTE_NAME_JPA));\n }",
"class_method_signature": "JPAEdmMappingModelServiceTest.testChec... | {
"fields": [
{
"declarator": "mappingModelExists = true",
"modifier": "",
"original_string": "boolean mappingModelExists = true;",
"type": "boolean",
"var_name": "mappingModelExists"
},
{
"declarator": "mappingModel",
"modifier": "private",
"original_string... | {
"body": "@Override\n public boolean checkExclusionOfJPAEmbeddableAttributeType(final String jpaEmbeddableTypeName,\n final String jpaAttributeName) {\n JPAEmbeddableTypeMapType type = searchJPAEmbeddableTypeMapType(jpaEmbeddableTypeName);\n if (type != null && type.getJPAAttributes() != null) {\n f... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_485 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(XmlEntityDeserializerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(XmlEntityDeserializerTest.class.getName());",
"type": "Logger",
"var_name": "L... | {
"body": "@Test(expected = EntityProviderException.class)\n public void readEntryTooManyValues() throws Exception {\n // prepare\n EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Employees\");\n String content =\n EMPLOYEE_1_XML.replace(\"<d:Age>52</d:Age>... | {
"fields": [],
"file": "odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/XmlEntityDeserializer.java",
"identifier": "XmlEntityDeserializer",
"interfaces": "",
"methods": [
{
"class_method_signature": "XmlEntityDeserializer.XmlEntityDeserializer()",
... | {
"body": "public ODataEntry readEntry(final EdmEntitySet entitySet, final EntityStream entity)\n throws EntityProviderException {\n XMLStreamReader reader = null;\n EntityProviderException cachedException = null;\n\n try {\n reader = XmlHelper.createStreamReader(entity.getContent());\n Entity... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_240 | {
"fields": [
{
"declarator": "keyView",
"modifier": "private static",
"original_string": "private static JPAEdmKeyView keyView;",
"type": "JPAEdmKeyView",
"var_name": "keyView"
},
{
"declarator": "objJpaEdmKeyTest",
"modifier": "private static",
"original_s... | {
"body": "@Test\n public void testGetBuilderIdempotent() {\n JPAEdmBuilder builder1 = keyView.getBuilder();\n JPAEdmBuilder builder2 = keyView.getBuilder();\n\n assertEquals(builder1.hashCode(), builder2.hashCode());\n }",
"class_method_signature": "JPAEdmKeyTest.testGetBuilderIdempotent()",
"construc... | {
"fields": [
{
"declarator": "propertyView",
"modifier": "private",
"original_string": "private JPAEdmPropertyView propertyView;",
"type": "JPAEdmPropertyView",
"var_name": "propertyView"
},
{
"declarator": "complexTypeView = null",
"modifier": "private",
"... | {
"body": "@Override\n public JPAEdmBuilder getBuilder() {\n if (builder == null) {\n builder = new JPAEdmKeyBuider();\n }\n\n return builder;\n }",
"class_method_signature": "JPAEdmKey.getBuilder()",
"constructor": false,
"full_signature": "@Override public JPAEdmBuilder getBuilder()",
"ident... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_610 | {
"fields": [
{
"declarator": "metadata",
"modifier": "private static",
"original_string": "private static String metadata;",
"type": "String",
"var_name": "metadata"
}
],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/edm/provider/EdmServiceMetada... | {
"body": "@Test\n public void twoEntitySetsOneContainerForInfo() throws Exception {\n List<EntitySet> entitySets = new ArrayList<EntitySet>();\n EntitySet entitySet = new EntitySet().setName(\"Employees\");\n entitySets.add(entitySet);\n entitySets.add(entitySet);\n\n List<EntityContainer> entityCont... | {
"fields": [
{
"declarator": "EDM_PROVIDER_EXEPTION = \"EdmProvider is not set.\"",
"modifier": "private static final",
"original_string": "private static final String EDM_PROVIDER_EXEPTION = \"EdmProvider is not set.\";",
"type": "String",
"var_name": "EDM_PROVIDER_EXEPTION"
},... | {
"body": "@Override\n public List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException {\n if(edmProvider == null){\n throw new ODataException(EDM_PROVIDER_EXEPTION);\n }\n if (entitySetInfos == null) {\n entitySetInfos = new ArrayList<EdmEntitySetInfo>();\n\n if (schemas == null) {\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_305 | {
"fields": [
{
"declarator": "ava",
"modifier": "private final",
"original_string": "private final BeanPropertyAccess ava;",
"type": "BeanPropertyAccess",
"var_name": "ava"
}
],
"file": "odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/od... | {
"body": "@Test\n public void getMappingValueNullMapping() throws Exception {\n\n SimpleEntity data = new SimpleEntity();\n data.myMappedProperty = \"property\";\n EdmMapping mapping = null;\n\n Object value = ava.getMappingValue(data, mapping);\n\n Assert.assertNull(value);\n }",
"class_method_si... | {
"fields": [],
"file": "odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/datasource/BeanPropertyAccess.java",
"identifier": "BeanPropertyAccess",
"interfaces": "implements ValueAccess",
"methods": [
{
"class_method_signature": "B... | {
"body": "@Override\n public <T> Object getMappingValue(final T data, final EdmMapping mapping) throws ODataException {\n if (mapping != null && mapping.getMediaResourceMimeTypeKey() != null) {\n return getValue(data, mapping.getMediaResourceMimeTypeKey());\n }\n return null;\n }",
"class_method_si... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_755 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/XmlPropertyConsumerTest.java",
"identifier": "XmlPropertyConsumerTest",
"interfaces": "",
"superclass": "extends AbstractXmlConsumerTest"
} | {
"body": "@Test\n @SuppressWarnings(\"unchecked\")\n public void readComplexProperty() throws Exception {\n String xml =\n \"<Location xmlns=\\\"\" + Edm.NAMESPACE_D_2007_08 + \"\\\"\"\n + \" xmlns:m=\\\"\" + Edm.NAMESPACE_M_2007_08 + \"\\\" m:type=\\\"RefScenario.c_Location\\\">\" +\n ... | {
"fields": [
{
"declarator": "TRUE = \"true\"",
"modifier": "protected static final",
"original_string": "protected static final String TRUE = \"true\";",
"type": "String",
"var_name": "TRUE"
},
{
"declarator": "FALSE = \"false\"",
"modifier": "protected static f... | {
"body": "public Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property,\n final EntityProviderReadProperties readProperties) throws EntityProviderException {\n return readProperty(reader, EntityInfoAggregator.create(property), readProperties);\n }",
"class_method_signat... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_885 | {
"fields": [
{
"declarator": "NAMESPACE = \"http://www.foo.bar/Data\"",
"modifier": "private static final",
"original_string": "private static final String NAMESPACE = \"http://www.foo.bar/Data\";",
"type": "String",
"var_name": "NAMESPACE"
},
{
"declarator": "PREFIX =... | {
"body": "@Test\n public void testServiceDocument() throws IOException, EntityProviderException {\n AtomServiceDocumentConsumer svcDocumentParser = new AtomServiceDocumentConsumer();\n ServiceDocument svcDocument = svcDocumentParser.readServiceDokument(createStreamReader(\"/svcExample.xml\"));\n assertNotN... | {
"fields": [
{
"declarator": "currentHandledStartTagName",
"modifier": "private",
"original_string": "private String currentHandledStartTagName;",
"type": "String",
"var_name": "currentHandledStartTagName"
},
{
"declarator": "DEFAULT_PREFIX = \"\"",
"modifier": "... | {
"body": "public ServiceDocumentImpl readServiceDokument(final XMLStreamReader reader) throws EntityProviderException {\n AtomInfoImpl atomInfo = new AtomInfoImpl();\n ServiceDocumentImpl serviceDocument = new ServiceDocumentImpl();\n List<Workspace> workspaces = new ArrayList<Workspace>();\n List<Extens... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_186 | {
"fields": [
{
"declarator": "VARIANT1 = 1",
"modifier": "private final static",
"original_string": "private final static int VARIANT1 = 1;",
"type": "int",
"var_name": "VARIANT1"
},
{
"declarator": "VARIANT2 = 2",
"modifier": "private final static",
"origi... | {
"body": "@Test\n public void testGetBuilderIdempotent() {\n JPAEdmBuilder builder1 = objJPAEdmAssociationEnd.getBuilder();\n JPAEdmBuilder builder2 = objJPAEdmAssociationEnd.getBuilder();\n\n assertEquals(builder1.hashCode(), builder2.hashCode());\n }",
"class_method_signature": "JPAEdmAssociationEndTe... | {
"fields": [
{
"declarator": "entityTypeView = null",
"modifier": "private",
"original_string": "private JPAEdmEntityTypeView entityTypeView = null;",
"type": "JPAEdmEntityTypeView",
"var_name": "entityTypeView"
},
{
"declarator": "propertyView = null",
"modifier... | {
"body": "@Override\n public JPAEdmBuilder getBuilder() {\n if (builder == null) {\n builder = new JPAEdmAssociationEndBuilder();\n }\n\n return builder;\n }",
"class_method_signature": "JPAEdmAssociationEnd.getBuilder()",
"constructor": false,
"full_signature": "@Override public JPAEdmBuilder ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_493 | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(XmlEntityDeserializerTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(XmlEntityDeserializerTest.class.getName());",
"type": "Logger",
"var_name": "L... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testReadEntryRequestWithMapping() throws Exception {\n XmlEntityDeserializer xec = new XmlEntityDeserializer();\n\n EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Employees\");\n InputStream conte... | {
"fields": [],
"file": "odata2-lib/odata-client-core/src/main/java/org/apache/olingo/odata2/client/core/ep/deserializer/XmlEntityDeserializer.java",
"identifier": "XmlEntityDeserializer",
"interfaces": "",
"methods": [
{
"class_method_signature": "XmlEntityDeserializer.XmlEntityDeserializer()",
... | {
"body": "public ODataEntry readEntry(final EdmEntitySet entitySet, final EntityStream entity)\n throws EntityProviderException {\n XMLStreamReader reader = null;\n EntityProviderException cachedException = null;\n\n try {\n reader = XmlHelper.createStreamReader(entity.getContent());\n Entity... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_169 | {
"fields": [
{
"declarator": "objJPAEdmBaseViewImplTest",
"modifier": "private",
"original_string": "private JPAEdmBaseViewImplTest objJPAEdmBaseViewImplTest;",
"type": "JPAEdmBaseViewImplTest",
"var_name": "objJPAEdmBaseViewImplTest"
},
{
"declarator": "objJPAEdmBaseV... | {
"body": "@Test\n public void testIsConsistent() {\n assertTrue(objJPAEdmBaseViewImpl.isConsistent());\n }",
"class_method_signature": "JPAEdmBaseViewImplTest.testIsConsistent()",
"constructor": false,
"full_signature": "@Test public void testIsConsistent()",
"identifier": "testIsConsistent",
"invocat... | {
"fields": [
{
"declarator": "skipDefaultNaming = false",
"modifier": "protected",
"original_string": "protected boolean skipDefaultNaming = false;",
"type": "boolean",
"var_name": "skipDefaultNaming"
},
{
"declarator": "pUnitName = null",
"modifier": "protected"... | {
"body": "@Override\n public boolean isConsistent() {\n return isConsistent;\n }",
"class_method_signature": "JPAEdmBaseViewImpl.isConsistent()",
"constructor": false,
"full_signature": "@Override public boolean isConsistent()",
"identifier": "isConsistent",
"invocations": [],
"modifiers": "@Overrid... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_80 | {
"fields": [
{
"declarator": "objJPAEdmMappingModelServiceTest",
"modifier": "private static",
"original_string": "private static JPAEdmMappingModelServiceTest objJPAEdmMappingModelServiceTest;",
"type": "JPAEdmMappingModelServiceTest",
"var_name": "objJPAEdmMappingModelServiceTest"... | {
"body": "@Test\n public void testMapJPAPersistenceUnitNegative() {\n assertNull(objJPAEdmMappingModelServiceTest.mapJPAPersistenceUnit(PERSISTENCE_UNIT_NAME_EDM));// Wrong value to\n // bring null\n }",
"class_me... | {
"fields": [
{
"declarator": "mappingModelExists = true",
"modifier": "",
"original_string": "boolean mappingModelExists = true;",
"type": "boolean",
"var_name": "mappingModelExists"
},
{
"declarator": "mappingModel",
"modifier": "private",
"original_string... | {
"body": "@Override\n public String mapJPAPersistenceUnit(final String persistenceUnitName) {\n\n JPAPersistenceUnitMapType persistenceUnit = mappingModel.getPersistenceUnit();\n if (persistenceUnit.getName().equals(persistenceUnitName)) {\n return persistenceUnit.getEDMSchemaNamespace();\n }\n\n r... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_647 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/edm/provider/EdmxProviderTest.java",
"identifier": "EdmxProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void nullAnnotationsAtComplexProperty() throws Exception {\n Edm edm = createEdm();\n assertNotNull(edm);\n EdmProperty property = (EdmProperty) edm.getEntityType(\"Self\", \"Employee\").getProperty(\"Location\");\n EdmAnnotations annotations = property.getAnnotations();\n ch... | {
"fields": [
{
"declarator": "dataServices",
"modifier": "private",
"original_string": "private DataServices dataServices;",
"type": "DataServices",
"var_name": "dataServices"
}
],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/provider/EdmxPr... | {
"body": "@Override\n public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException {\n for (Schema schema : dataServices.getSchemas()) {\n if (schema.getNamespace().equals(edmFQName.getNamespace())) {\n for (EntityType entityType : schema.getEntityTypes()) {\n if ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_217 | {
"fields": [
{
"declarator": "METHOD_COUNT = 7",
"modifier": "private static final",
"original_string": "private static final int METHOD_COUNT = 7;",
"type": "int",
"var_name": "METHOD_COUNT"
},
{
"declarator": "VARIANT = 0",
"modifier": "private static",
"... | {
"body": "@Test\n public void testNoReturnTypeButAnnotated() {\n VARIANT = 6;\n\n try {\n jpaEdmfunctionImport.getBuilder().build();\n fail(\"Exception Expected\");\n } catch (ODataJPAModelException e) {\n assertEquals(ODataJPAModelException.FUNC_RETURN_TYPE_EXP.getKey(), e.getMessageReferen... | {
"fields": [
{
"declarator": "consistentFunctionImportList = new ArrayList<FunctionImport>()",
"modifier": "private",
"original_string": "private List<FunctionImport> consistentFunctionImportList = new ArrayList<FunctionImport>();",
"type": "List<FunctionImport>",
"var_name": "consi... | {
"body": "@Override\n public JPAEdmBuilder getBuilder() {\n if (builder == null) {\n builder = new JPAEdmFunctionImportBuilder();\n }\n return builder;\n }",
"class_method_signature": "JPAEdmFunctionImport.getBuilder()",
"constructor": false,
"full_signature": "@Override public JPAEdmBuilder ge... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_1036 | {
"fields": [
{
"declarator": "EMPLOYEE_1_XML =\n \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" +\n \"<entry xmlns=\\\"\" + Edm.NAMESPACE_ATOM_2005 + \"\\\"\" +\n \" xmlns:m=\\\"\" + Edm.NAMESPACE_M_2007_08 + \"\\\"\" +\n \" xmlns:d=\\\"\" + Edm.NAMESPACE_D_2007_08 +... | {
"body": "@Test\n public void writeLink() throws Exception {\n final EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet(\"Rooms\");\n Map<String, Object> properties = new HashMap<String, Object>();\n properties.put(\"Id\", \"42\");\n final ODataResponse result =\n ... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/ProviderFacadeImpl.java",
"identifier": "ProviderFacadeImpl",
"interfaces": "implements EntityProviderInterface",
"methods": [
{
"class_method_signature": "ProviderFacadeImpl.create()",
"constructor":... | {
"body": "@Override\n public ODataResponse writeLink(final String contentType, final EdmEntitySet entitySet,\n final Map<String, Object> data, final EntityProviderWriteProperties properties) throws EntityProviderException {\n return create(contentType).writeLink(entitySet, data, properties);\n }",
"class... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_352 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = \"Photo\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_VALUE = \"Photo\";",
"type": "String",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "FC_TARGET_PATH = \"Содержание\";... | {
"body": "@Test\n public void testAssociation() throws XMLStreamException, \n EntityProviderException, EdmException, UnsupportedEncodingException {\n XmlMetadataDeserializer parser = new XmlMetadataDeserializer();\n InputStream reader = createStreamReader(xmlWithAssociation);\n EdmDataServices result = pa... | {
"fields": [
{
"declarator": "inscopeMap = new HashMap<String, Set<String>>()",
"modifier": "private",
"original_string": "private Map<String, Set<String>> inscopeMap = new HashMap<String, Set<String>>();",
"type": "Map<String, Set<String>>",
"var_name": "inscopeMap"
},
{
... | {
"body": "public EdmDataServices readMetadata(final InputStream content, final boolean validate)//NOSONAR\n throws EntityProviderException, EdmException { \n try {\n initialize();\n EdmDataServices dataServices = new EdmDataServices();\n List<EdmSchema> schemas = new ArrayList<EdmSchema>();\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_581 | {
"fields": [
{
"declarator": "BASE64_ENCODING = \"BASE64\"",
"modifier": "private static final",
"original_string": "private static final String BASE64_ENCODING = \"BASE64\";",
"type": "String",
"var_name": "BASE64_ENCODING"
}
],
"file": "odata2-lib/odata-core/src/test/java/... | {
"body": "@Test(expected = BatchException.class)\n public void testValidateContentTypeNoValue() throws BatchException {\n List<String> contentTypeValues = Arrays.asList(new String[] {});\n final Header headers = makeHeaders(HttpHeaders.CONTENT_TYPE, contentTypeValues);\n\n BatchTransformatorCommon.validate... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/batch/v2/BatchTransformatorCommon.java",
"identifier": "BatchTransformatorCommon",
"interfaces": "",
"methods": [
{
"class_method_signature": "BatchTransformatorCommon.validateContentType(final Header headers)... | {
"body": "public static void validateContentType(final Header headers) throws BatchException {\n List<String> contentTypes = headers.getHeaders(HttpHeaders.CONTENT_TYPE);\n\n if (contentTypes.isEmpty()) {\n throw new BatchException(BatchException.MISSING_CONTENT_TYPE);\n }\n if (!headers.isHeaderMat... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_7 | {
"fields": [
{
"declarator": "builder = null",
"modifier": "",
"original_string": "JPAQueryBuilder builder = null;",
"type": "JPAQueryBuilder",
"var_name": "builder"
}
],
"file": "odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/... | {
"body": "@Test\n public void buildPutMergePatchTest() {\n try {\n assertNotNull(builder.build((PutMergePatchUriInfo) mockURIInfoWithListener(false)));\n } catch (ODataException e) {\n fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2);\n ... | {
"fields": [
{
"declarator": "em = null",
"modifier": "private",
"original_string": "private EntityManager em = null;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "pageSize = 0",
"modifier": "private",
"original_string": "private int pageS... | {
"body": "public JPAQueryInfo build(GetEntitySetUriInfo uriInfo) throws ODataJPARuntimeException {\n JPAQueryInfo queryInfo = new JPAQueryInfo();\n Query query = null;\n try {\n ODataJPATombstoneEntityListener listener = getODataJPATombstoneEntityListener((UriInfo) uriInfo);\n if (listener != null... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_38 | {
"fields": [
{
"declarator": "STR_LOCAL_URI = \"http://localhost:8080/org.apache.olingo.odata2.processor.ref.web/\"",
"modifier": "private static final",
"original_string": "private static final String STR_LOCAL_URI = \"http://localhost:8080/org.apache.olingo.odata2.processor.ref.web/\";",
... | {
"body": "@Test\n public void testProcessGetEntityCountUriInfo() {\n try {\n Assert.assertEquals(11, objJPAProcessorImpl.process(getEntityCountUriInfo()));\n } catch (ODataJPAModelException e) {\n fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_... | {
"fields": [
{
"declarator": "DELTATOKEN = \"!deltatoken\"",
"modifier": "private static final",
"original_string": "private static final String DELTATOKEN = \"!deltatoken\";",
"type": "String",
"var_name": "DELTATOKEN"
},
{
"declarator": "oDataJPAContext",
"modi... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Override\n public List<Object> process(final GetFunctionImportUriInfo uriParserResultView)\n throws ODataJPAModelException, ODataJPARuntimeException {\n\n JPAMethodContext jpaMethodContext = JPAMethodContext.createBuilder(\n JPQLContextType.FUNCTION, uri... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_978 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = \"Photo\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_VALUE = \"Photo\";",
"type": "String",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "FC_TARGET_PATH = \"Содержание\";... | {
"body": "@Test\n public void testFunctionImport() throws XMLStreamException, EntityProviderException {\n final String xmWithEntityContainer =\n \"<edmx:Edmx Version=\\\"1.0\\\" xmlns:edmx=\\\"\"\n + Edm.NAMESPACE_EDMX_2007_06\n + \"\\\">\"\n + \"<edmx:DataServices m:DataS... | {
"fields": [
{
"declarator": "inscopeMap = new HashMap<String, Set<String>>()",
"modifier": "private",
"original_string": "private Map<String, Set<String>> inscopeMap = new HashMap<String, Set<String>>();",
"type": "Map<String, Set<String>>",
"var_name": "inscopeMap"
},
{
... | {
"body": "public DataServices readMetadata(final XMLStreamReader reader, final boolean validate)\n throws EntityProviderException {\n try {\n initialize();\n DataServices dataServices = new DataServices();\n List<Schema> schemas = new ArrayList<Schema>();\n\n while (reader.hasNext()\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_997 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = \"Photo\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_VALUE = \"Photo\";",
"type": "String",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "FC_TARGET_PATH = \"Содержание\";... | {
"body": "@Test(expected = EntityProviderException.class)\n public void testInvalidAssociation() throws XMLStreamException, EntityProviderException {\n final String xmlWithInvalidAssociationSet =\n \"<edmx:Edmx Version=\\\"1.0\\\" xmlns:edmx=\\\"\"\n + Edm.NAMESPACE_EDMX_2007_06\n + ... | {
"fields": [
{
"declarator": "inscopeMap = new HashMap<String, Set<String>>()",
"modifier": "private",
"original_string": "private Map<String, Set<String>> inscopeMap = new HashMap<String, Set<String>>();",
"type": "Map<String, Set<String>>",
"var_name": "inscopeMap"
},
{
... | {
"body": "public DataServices readMetadata(final XMLStreamReader reader, final boolean validate)\n throws EntityProviderException {\n try {\n initialize();\n DataServices dataServices = new DataServices();\n List<Schema> schemas = new ArrayList<Schema>();\n\n while (reader.hasNext()\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_149 | {
"fields": [
{
"declarator": "objJPAEdmSchemaTest",
"modifier": "private",
"original_string": "private JPAEdmSchemaTest objJPAEdmSchemaTest;",
"type": "JPAEdmSchemaTest",
"var_name": "objJPAEdmSchemaTest"
},
{
"declarator": "objJPAEdmSchema",
"modifier": "private... | {
"body": "@Test\n public void testIsConsistent() {\n assertTrue(objJPAEdmSchema.isConsistent());\n objJPAEdmSchema.clean();\n assertFalse(objJPAEdmSchema.isConsistent());\n }",
"class_method_signature": "JPAEdmSchemaTest.testIsConsistent()",
"constructor": false,
"full_signature": "@Test public void... | {
"fields": [
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schema;",
"type": "Schema",
"var_name": "schema"
},
{
"declarator": "complexTypeView",
"modifier": "private",
"original_string": "private JPAEdmComplexTypeView ... | {
"body": "@Override\n public void clean() {\n super.clean();\n schema = null;\n }",
"class_method_signature": "JPAEdmSchema.clean()",
"constructor": false,
"full_signature": "@Override public void clean()",
"identifier": "clean",
"invocations": [
"clean"
],
"modifiers": "@Override public",
... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_775 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/consumer/JsonLinkConsumerTest.java",
"identifier": "JsonLinkConsumerTest",
"interfaces": "",
"superclass": "extends AbstractConsumerTest"
} | {
"body": "@Test\n public void linkWithD() throws Exception {\n final String link = \"{\\\"d\\\":{\\\"uri\\\":\\\"http://somelink\\\"}}\";\n JsonReader reader = new JsonReader(new InputStreamReader(createContentAsStream(link)));\n assertEquals(\"http://somelink\", new JsonLinkConsumer().readLink(reader, nul... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/JsonLinkConsumer.java",
"identifier": "JsonLinkConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonLinkConsumer.readLink(final JsonReader reader, final EdmEntitySet entitySet... | {
"body": "public String readLink(final JsonReader reader, final EdmEntitySet entitySet) throws EntityProviderException {\n try {\n String result;\n reader.beginObject();\n String nextName = reader.nextName();\n final boolean wrapped = FormatJson.D.equals(nextName);\n if (wrapped) {\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_260 | {
"fields": [
{
"declarator": "annotationHelper",
"modifier": "private final",
"original_string": "private final AnnotationHelper annotationHelper;",
"type": "AnnotationHelper",
"var_name": "annotationHelper"
}
],
"file": "odata2-annotation-processor/annotation-processor-core... | {
"body": "@Test\n public void getValueForPropertyNullInstance() throws Exception {\n Object result = annotationHelper.getValueForProperty(null, \"\");\n Assert.assertNull(result);\n }",
"class_method_signature": "AnnotationHelperTest.getValueForPropertyNullInstance()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "DEFAULT_CONTAINER_NAME = \"DefaultContainer\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CONTAINER_NAME = \"DefaultContainer\";",
"type": "String",
"var_name": "DEFAULT_CONTAINER_NAME"
}
],
"file"... | {
"body": "public Object getValueForProperty(final Object instance, final String propertyName) throws ODataAnnotationException {\n if (instance == null) {\n return null;\n }\n\n Field field = getFieldForPropertyName(propertyName, instance.getClass(), true);\n if (field == null) {\n throw new ODa... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_1041 | {
"fields": [
{
"declarator": "EMPLOYEE_1_XML =\n \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" +\n \"<entry xmlns=\\\"\" + Edm.NAMESPACE_ATOM_2005 + \"\\\"\" +\n \" xmlns:m=\\\"\" + Edm.NAMESPACE_M_2007_08 + \"\\\"\" +\n \" xmlns:d=\\\"\" + Edm.NAMESPACE_D_2007_08 +... | {
"body": "@Test\n public void writeBinary() throws Exception {\n final ODataResponse result =\n new ProviderFacadeImpl().writeBinary(HttpContentType.APPLICATION_OCTET_STREAM, new byte[] { 102, 111, 111 });\n assertEquals(HttpContentType.APPLICATION_OCTET_STREAM, result.getContentHeader());\n assertE... | {
"fields": [],
"file": "odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/ProviderFacadeImpl.java",
"identifier": "ProviderFacadeImpl",
"interfaces": "implements EntityProviderInterface",
"methods": [
{
"class_method_signature": "ProviderFacadeImpl.create()",
"constructor":... | {
"body": "@Override\n public ODataResponse writeBinary(final String mimeType, final byte[] data) throws EntityProviderException {\n return create().writeBinary(mimeType, data);\n }",
"class_method_signature": "ProviderFacadeImpl.writeBinary(final String mimeType, final byte[] data)",
"constructor": false,
... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_630 | {
"fields": [
{
"declarator": "edmFunctionImport",
"modifier": "private static",
"original_string": "private static EdmFunctionImportImplProv edmFunctionImport;",
"type": "EdmFunctionImportImplProv",
"var_name": "edmFunctionImport"
},
{
"declarator": "edmFunctionImportW... | {
"body": "@Test\n public void entitySet() throws Exception {\n EdmEntitySet entitySet = edmFunctionImport.getEntitySet();\n assertNotNull(entitySet);\n assertEquals(\"fooEntitySet\", entitySet.getName());\n assertEquals(edmEntityContainer.getEntitySet(\"fooEntitySet\"), entitySet);\n }",
"class_metho... | {
"fields": [
{
"declarator": "functionImport",
"modifier": "private",
"original_string": "private FunctionImport functionImport;",
"type": "FunctionImport",
"var_name": "functionImport"
},
{
"declarator": "edmEntityContainer",
"modifier": "private",
"origin... | {
"body": "@Override\n public EdmEntitySet getEntitySet() throws EdmException {\n return edmEntityContainer.getEntitySet(functionImport.getEntitySet());\n }",
"class_method_signature": "EdmFunctionImportImplProv.getEntitySet()",
"constructor": false,
"full_signature": "@Override public EdmEntitySet getEnti... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_18 | {
"fields": [
{
"declarator": "builder = null",
"modifier": "",
"original_string": "JPAQueryBuilder builder = null;",
"type": "JPAQueryBuilder",
"var_name": "builder"
}
],
"file": "odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/... | {
"body": "@Test\n public void buildQueryGetEntitySetTestWithNoNormalizationWithStartsWith() {\n EdmMapping mapping = (EdmMapping) mockNormalizedValueMapping();\n try {\n assertNotNull(builder.build((GetEntitySetUriInfo) mockURIInfoForEntitySet(mapping, \"startsWith\")));\n } catch (ODataException e) {... | {
"fields": [
{
"declarator": "em = null",
"modifier": "private",
"original_string": "private EntityManager em = null;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "pageSize = 0",
"modifier": "private",
"original_string": "private int pageS... | {
"body": "public JPAQueryInfo build(GetEntitySetUriInfo uriInfo) throws ODataJPARuntimeException {\n JPAQueryInfo queryInfo = new JPAQueryInfo();\n Query query = null;\n try {\n ODataJPATombstoneEntityListener listener = getODataJPATombstoneEntityListener((UriInfo) uriInfo);\n if (listener != null... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_958 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = \"Photo\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_VALUE = \"Photo\";",
"type": "String",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "FC_TARGET_PATH = \"Содержание\";... | {
"body": "@Test\n public void testMetadataDokumentWithWhitepaces() throws Exception {\n final String metadata = \"\"\n + \"<edmx:Edmx Version=\\\"1.0\\\" xmlns:edmx=\\\"\" + Edm.NAMESPACE_EDMX_2007_06 + \"\\\">\"\n + \" <edmx:DataServices m:DataServiceVersion=\\\"2.0\\\" xmlns:m=\\\"\" + Edm.NAME... | {
"fields": [
{
"declarator": "inscopeMap = new HashMap<String, Set<String>>()",
"modifier": "private",
"original_string": "private Map<String, Set<String>> inscopeMap = new HashMap<String, Set<String>>();",
"type": "Map<String, Set<String>>",
"var_name": "inscopeMap"
},
{
... | {
"body": "public DataServices readMetadata(final XMLStreamReader reader, final boolean validate)\n throws EntityProviderException {\n try {\n initialize();\n DataServices dataServices = new DataServices();\n List<Schema> schemas = new ArrayList<Schema>();\n\n while (reader.hasNext()\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_722 | {
"fields": [
{
"declarator": "reqMock",
"modifier": "private",
"original_string": "private HttpServletRequest reqMock;",
"type": "HttpServletRequest",
"var_name": "reqMock"
},
{
"declarator": "respMock",
"modifier": "private",
"original_string": "private Ht... | {
"body": "@Test\n public void testInputStreamResponse() throws Exception {\n ODataServlet servlet = new ODataServlet();\n prepareServlet(servlet);\n\n final ByteArrayOutputStream bout = new ByteArrayOutputStream();\n final ServletOutputStream out = new ServletOutputStream() {\n @Override\n pub... | {
"fields": [
{
"declarator": "HTTP_METHOD_OPTIONS = \"OPTIONS\"",
"modifier": "private static final",
"original_string": "private static final String HTTP_METHOD_OPTIONS = \"OPTIONS\";",
"type": "String",
"var_name": "HTTP_METHOD_OPTIONS"
},
{
"declarator": "HTTP_METHO... | {
"body": "protected void createResponse(final HttpServletResponse resp, final ODataResponse response) throws IOException {\n createResponse(resp, response, false);\n }",
"class_method_signature": "ODataServlet.createResponse(final HttpServletResponse resp, final ODataResponse response)",
"constructor": false... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_688 | {
"fields": [],
"file": "odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/commons/ContentTypeTest.java",
"identifier": "ContentTypeTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testFormatParserInvalidParameterWithAllLws() {\n ContentType.create(\"aaa/bbb;x=\\t \\n \\ry;a\");\n }",
"class_method_signature": "ContentTypeTest.testFormatParserInvalidParameterWithAllLws()",
"constructor": false,
"full_signature"... | {
"fields": [
{
"declarator": "KNOWN_MIME_TYPES = new HashSet<String>()",
"modifier": "private static final",
"original_string": "private static final Set<String> KNOWN_MIME_TYPES = new HashSet<String>();",
"type": "Set<String>",
"var_name": "KNOWN_MIME_TYPES"
},
{
"dec... | {
"body": "public static ContentType create(final String type, final String subtype) {\n return new ContentType(type, subtype, mapToODataFormat(type, subtype), null);\n }",
"class_method_signature": "ContentType.create(final String type, final String subtype)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_372 | {
"fields": [
{
"declarator": "DEFAULT_VALUE = \"Photo\"",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_VALUE = \"Photo\";",
"type": "String",
"var_name": "DEFAULT_VALUE"
},
{
"declarator": "FC_TARGET_PATH = \"Содержание\";... | {
"body": "@Test(expected = EntityProviderException.class)\n public void testInvalidEntitySet() throws XMLStreamException, \n EntityProviderException, EdmException, UnsupportedEncodingException {\n final String xmWithEntityContainer =\n \"<edmx:Edmx Version=\\\"1.0\\\" xmlns:edmx=\\\"\" + Edm.NAMESPACE_ED... | {
"fields": [
{
"declarator": "inscopeMap = new HashMap<String, Set<String>>()",
"modifier": "private",
"original_string": "private Map<String, Set<String>> inscopeMap = new HashMap<String, Set<String>>();",
"type": "Map<String, Set<String>>",
"var_name": "inscopeMap"
},
{
... | {
"body": "public EdmDataServices readMetadata(final InputStream content, final boolean validate)//NOSONAR\n throws EntityProviderException, EdmException { \n try {\n initialize();\n EdmDataServices dataServices = new EdmDataServices();\n List<EdmSchema> schemas = new ArrayList<EdmSchema>();\n ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_237 | {
"fields": [
{
"declarator": "objJPAEdmPropertyTest",
"modifier": "private",
"original_string": "private JPAEdmPropertyTest objJPAEdmPropertyTest;",
"type": "JPAEdmPropertyTest",
"var_name": "objJPAEdmPropertyTest"
},
{
"declarator": "objJPAEdmProperty",
"modifie... | {
"body": "@Test\n public void testGetJPAAttribute() {\n setUp();\n assertNotNull(objJPAEdmProperty.getJPAAttribute());\n }",
"class_method_signature": "JPAEdmPropertyTest.testGetJPAAttribute()",
"constructor": false,
"full_signature": "@Test public void testGetJPAAttribute()",
"identifier": "testGetJ... | {
"fields": [
{
"declarator": "schemaView",
"modifier": "private",
"original_string": "private JPAEdmSchemaView schemaView;",
"type": "JPAEdmSchemaView",
"var_name": "schemaView"
},
{
"declarator": "entityTypeView",
"modifier": "private",
"original_string": ... | {
"body": "@Override\n public Attribute<?, ?> getJPAAttribute() {\n return currentAttribute;\n }",
"class_method_signature": "JPAEdmProperty.getJPAAttribute()",
"constructor": false,
"full_signature": "@Override public Attribute<?, ?> getJPAAttribute()",
"identifier": "getJPAAttribute",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
18830102_1016 | {
"fields": [
{
"declarator": "edm",
"modifier": "private",
"original_string": "private Edm edm;",
"type": "Edm",
"var_name": "edm"
},
{
"declarator": "schemas",
"modifier": "private",
"original_string": "private List<Schema> schemas;",
"type": "List<S... | {
"body": "@Test\n public void writeEmptyServiceDocumentOverRuntimeDelegate() throws Exception {\n ODataResponse response =\n EntityProvider.writeServiceDocument(HttpContentType.APPLICATION_ATOM_XML, edm, \"http://localhost\");\n String xmlString = verifyResponse(response);\n\n assertXpathExists(\"/a... | {
"fields": [
{
"declarator": "DEFAULT_CHARSET = ContentType.CHARSET_UTF_8",
"modifier": "private static final",
"original_string": "private static final String DEFAULT_CHARSET = ContentType.CHARSET_UTF_8;",
"type": "String",
"var_name": "DEFAULT_CHARSET"
},
{
"declarat... | {
"body": "public void writeServiceDocument(final Writer writer) throws EntityProviderException {\n\n EdmServiceMetadata serviceMetadata = edm.getServiceMetadata();\n\n try {\n XMLStreamWriter xmlStreamWriter = XmlHelper.getXMLOutputFactory().createXMLStreamWriter(writer);\n\n xmlStreamWriter.writeSta... | {
"created": null,
"fork": null,
"fork_count": 68,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 18830102,
"size": 6647,
"stargazer_count": 30,
"stars": null,
"updates": null,
"url": "https://github.com/apache/olingo-odata2"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.