id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
75735839_33
{ "fields": [ { "declarator": "controller", "modifier": "", "original_string": "OASearchController controller;", "type": "OASearchController", "var_name": "controller" }, { "declarator": "oaAnnotationSearchService", "modifier": "private", "original_string": ...
{ "body": "@Test\n public void testSearchGet() throws UnsupportedEncodingException {\n\tString queryNotFound = \"not found\";\n\tString motivation = null;\n\tString date = null;\n\tString user = null;\n\tString page = null;\n\tServiceResponse notFoundResponse = new ServiceResponse(Status.NOT_FOUND, null);\n\n\n\tP...
{ "fields": [ { "declarator": "CONTROLLER_NAME = \"oaSearchController\"", "modifier": "public static final", "original_string": "public static final String CONTROLLER_NAME = \"oaSearchController\";", "type": "String", "var_name": "CONTROLLER_NAME" }, { "declarator": "oa...
{ "body": "@CrossOrigin\n\t@RequestMapping(value = OA_MIXED_SEARCH_REQUEST_PATH, method = RequestMethod.GET)\n\tpublic ResponseEntity<Map<String, Object>> searchOAMixedGet(\n\t\t\t@RequestParam(value = AnnotationSearchConstants.PARAM_FIELD_QUERY, required = false) String query,\n\t\t\t@RequestParam(value = Annotation...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_25
{ "fields": [ { "declarator": "controller", "modifier": "", "original_string": "W3CSearchController controller;", "type": "W3CSearchController", "var_name": "controller" }, { "declarator": "w3cAnnotationSearchService", "modifier": "private", "original_string...
{ "body": "@Test\n public void testSearchGet() throws UnsupportedEncodingException {\n\tString queryNotFound = \"not found\";\n\tString motivation = null;\n\tString date = null;\n\tString user = null;\n\tString page = null;\n\tServiceResponse notFoundResponse = new ServiceResponse(Status.NOT_FOUND, null);\n\n\tPar...
{ "fields": [ { "declarator": "CONTROLLER_NAME = \"w3cSearchController\"", "modifier": "public static final", "original_string": "public static final String CONTROLLER_NAME = \"w3cSearchController\";", "type": "String", "var_name": "CONTROLLER_NAME" }, { "declarator": "...
{ "body": "@CrossOrigin\n\t@RequestMapping(value = W3C_MIXED_SEARCH_REQUEST_PATH, method = RequestMethod.GET)\n\tpublic ResponseEntity<Map<String, Object>> searchW3CGet(\n\t\t\t@RequestParam(value = AnnotationSearchConstants.PARAM_FIELD_QUERY, required = false) String query,\n\t\t\t@RequestParam(value = AnnotationSea...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_8
{ "fields": [ { "declarator": "getPayloadServiceImpl", "modifier": "private", "original_string": "private GetPayloadServiceImpl getPayloadServiceImpl;", "type": "GetPayloadServiceImpl", "var_name": "getPayloadServiceImpl" }, { "declarator": "LOG = Logger.getLogger(GetPa...
{ "body": "@Test\n public void testGetJsonPayload() {\n\n\n\n\tString payload = \"\";\n\tString url = \"https://jsonplaceholder.typicode.com/posts\";\n\tString returnedPayload = getPayloadServiceImpl.getJsonPayload(url, payload);\n\n\tassertEquals(returnedPayload, \"\");\n\n\turl = \"http://code.jsontest.com\";\n\...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(GetPayloadServiceImpl.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(GetPayloadServiceImpl.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@Override\n public String getJsonPayload(String url, String payload){\n\n try {\n HttpPost request = new HttpPost(url);\n\n StringEntity params = new StringEntity(payload);\n LOG.info(payload);\n request.addHeader(\"content-type\", \"application/json; c...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_29
{ "fields": [ { "declarator": "controller", "modifier": "", "original_string": "W3CTextSearchController controller;", "type": "W3CTextSearchController", "var_name": "controller" }, { "declarator": "textSearchService", "modifier": "private", "original_string"...
{ "body": "@Test\n public void testSearchGet() throws UnsupportedEncodingException {\n\tString queryNotFound = \"not found\";\n\tString motivation = null;\n\tString date = null;\n\tString user = null;\n\tString page = null;\n\tServiceResponse notFoundResponse = new ServiceResponse(Status.NOT_FOUND, null);\n\n\twhe...
{ "fields": [ { "declarator": "CONTROLLER_NAME = \"w3CTextSearchController\"", "modifier": "public static final", "original_string": "public static final String CONTROLLER_NAME = \"w3CTextSearchController\";", "type": "String", "var_name": "CONTROLLER_NAME" }, { "declar...
{ "body": "@CrossOrigin\n\t@RequestMapping(value = TEXT_SEARCH_REQUEST_PATH, method = RequestMethod.GET)\n\tpublic ResponseEntity<Map<String, Object>> searchTextGet(\n\t\t\t@RequestParam(value = AnnotationSearchConstants.PARAM_FIELD_QUERY, required = true) String query,\n\t\t\t@RequestParam(value = AnnotationSearchCo...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_4
{ "fields": [ { "declarator": "annotationUtils", "modifier": "private", "original_string": "private AnnotationUtils annotationUtils;", "type": "AnnotationUtils", "var_name": "annotationUtils" }, { "declarator": "LOG = Logger.getLogger(AnnotationUtilsTest.class)", ...
{ "body": "@Test\n public void testCreateAutocompleteList() {\n\n\tString w3cContext = \"http://iiif.io/api/search/1/context.json\";\n\n\tList <SuggestOption> options = new ArrayList<SuggestOption>();\n\tSuggestOption suggestOption = new SuggestOption(\"tested\");\n\toptions.add(suggestOption);\n\tboolean isW3c = ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(AnnotationUtils.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(AnnotationUtils.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "SE...
{ "body": "public Map<String, Object> createAutocompleteList(List<SuggestOption> options, boolean isW3c, String queryString,\n\t String motivation, String date, String user) {\n\n\tif (null == options || options.isEmpty()) {\n\t return null;\n\t}\n\ttry {\n\n\t Map<String, Object> root = this.buildAutoComple...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_13
{ "fields": [ { "declarator": "impl", "modifier": "private", "original_string": "private OAAnnotationSearchServiceImpl impl;", "type": "OAAnnotationSearchServiceImpl", "var_name": "impl" }, { "declarator": "annotationUtils", "modifier": "", "original_string"...
{ "body": "@Test\n public void testGetAnnotationPage() {\n\n\tString query = \"comment\";\n\tString motivation = null;\n\tString date = null;\n\tString user = null;\n\tString queryString = \"http://www.example.com/search?q=comment\";\n\tString page = null;\n\twhen(template.getClient()).thenReturn(client);\n\tlong ...
{ "fields": [ { "declarator": "OA_ANNOTATION_SERVICE_NAME = \"oaAnnotationSearchServiceImpl\"", "modifier": "public static final", "original_string": "public static final String OA_ANNOTATION_SERVICE_NAME = \"oaAnnotationSearchServiceImpl\";", "type": "String", "var_name": "OA_ANNOTA...
{ "body": "@Override\n @Transactional(readOnly = true, isolation = Isolation.SERIALIZABLE)\n @Cacheable(value=\"oaAnnotationSearchPagingCache\", key=\"#queryString\" )\n\n public ServiceResponse<Map<String, Object>> getAnnotationPage(Parameters parameters, String queryString, String page, String within, Stri...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_12
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TextSearchServiceImplTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TextSearchServiceImplTest.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Test\n public void testGetTextPositions() throws IOException {\n\n\tString query = \"comment\";\n\tString queryString = \"http://www.example.com/search?q=comment\";\n\tboolean isW3c = true;\n\tString page = null;\n\tboolean isMixedSearch = false;\n\tlong totalHits = 10;\n\n\n\n\tSearchHits searchHits =...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TextSearchServiceImpl.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TextSearchServiceImpl.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@Override\n @Transactional(readOnly = true, isolation = Isolation.SERIALIZABLE)\n public ServiceResponse<Map<String, Object>> getTextPositions(String query, String queryString, boolean isW3c,\n\t String page, boolean isMixedSearch, String within, String widthHeight) {\n\n\ttotalHits = 0;\n\tString...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_5
{ "fields": [ { "declarator": "annotationUtils", "modifier": "private", "original_string": "private AnnotationUtils annotationUtils;", "type": "AnnotationUtils", "var_name": "annotationUtils" }, { "declarator": "LOG = Logger.getLogger(AnnotationUtilsTest.class)", ...
{ "body": "@Test\n public void testConvertSpecialCharacters() {\n\tString input = \"http://www.emaple.com/ferd/lgg/\";\n\tString output = annotationUtils.convertSpecialCharacters(input);\n\tLOG.info(input);\n\tLOG.info(output);\n\tassertEquals(output, \"(\\\"http://www.emaple.com/ferd/lgg/\\\")\");\n\n\tinput = \"...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(AnnotationUtils.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(AnnotationUtils.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "SE...
{ "body": "public String convertSpecialCharacters(String input) {\n\n\tString returnInput = input;\n\tif (null != input && input.contains(\":\")) {\n\n\t List<String> inputList = getListFromSpaceSeparatedTerms(input);\n\t for (String replacement : inputList) {\n\t\tif (replacement.contains(\":\")) {\n\t\t St...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_28
{ "fields": [ { "declarator": "controller", "modifier": "", "original_string": "W3CSearchController controller;", "type": "W3CSearchController", "var_name": "controller" }, { "declarator": "w3cAnnotationSearchService", "modifier": "private", "original_string...
{ "body": "@Test\n public void testAutocompleteWithinGet() throws UnsupportedEncodingException {\n\tString queryNotFound = \"not found\";\n\tString motivation = null;\n\tString date = null;\n\tString user = null;\n\tString min = null;\n\tServiceResponse notFoundResponse = new ServiceResponse(Status.NOT_FOUND, null...
{ "fields": [ { "declarator": "CONTROLLER_NAME = \"w3cSearchController\"", "modifier": "public static final", "original_string": "public static final String CONTROLLER_NAME = \"w3cSearchController\";", "type": "String", "var_name": "CONTROLLER_NAME" }, { "declarator": "...
{ "body": "@CrossOrigin\n\t@RequestMapping(value = WITHIN_W3C_MIXED_AUTOCOMPLETE_REQUEST_PATH, method = RequestMethod.GET)\n\tpublic ResponseEntity<Map<String, Object>> autocompleteW3CWithinMixedGet(@PathVariable String withinId,\n\t\t\t@RequestParam(value = AnnotationSearchConstants.PARAM_FIELD_QUERY, required = tru...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_9
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TextSearchServiceImplTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TextSearchServiceImplTest.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Test\n public void testTextSearchServiceImpl() {\n\tassertNotNull(textSearchServiceImpl);\n\n }", "class_method_signature": "TextSearchServiceImplTest.testTextSearchServiceImpl()", "constructor": false, "full_signature": "@Test public void testTextSearchServiceImpl()", "identifier": "testTex...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(TextSearchServiceImpl.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(TextSearchServiceImpl.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@Autowired\n public TextSearchServiceImpl(TextUtils textUtils, ElasticsearchTemplate template,\n\t @Value(\"${text.server.coordinate.url}\") String coordinateServerUrl, GetPayloadService coordinateService,\n\t CacheManager cacheManager) {\n\tthis.textUtils = textUtils;\n\tthis.client = template.ge...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_24
{ "fields": [ { "declarator": "controller", "modifier": "", "original_string": "W3CAnnotationSearchController controller;", "type": "W3CAnnotationSearchController", "var_name": "controller" }, { "declarator": "w3cAnnotationSearchService", "modifier": "private", ...
{ "body": "@Test\n public void testAutocompleteWithinGet() throws UnsupportedEncodingException {\n\tString queryNotFound = \"not found\";\n\tString motivation = null;\n\tString date = null;\n\tString user = null;\n\tString min = null;\n\tServiceResponse notFoundResponse = new ServiceResponse(Status.NOT_FOUND, null...
{ "fields": [ { "declarator": "CONTROLLER_NAME = \"w3cAnnotationSearchController\"", "modifier": "public static final", "original_string": "public static final String CONTROLLER_NAME = \"w3cAnnotationSearchController\";", "type": "String", "var_name": "CONTROLLER_NAME" }, { ...
{ "body": "@CrossOrigin\n\t@RequestMapping(value = WITHIN_W3C_AUTOCOMPLETE_REQUEST_PATH, method = RequestMethod.GET)\n\tpublic ResponseEntity<Map<String, Object>> autocompleteWithinGet(@PathVariable String withinId,\n\t\t\t@RequestParam(value = AnnotationSearchConstants.PARAM_FIELD_QUERY, required = true) String quer...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
75735839_32
{ "fields": [ { "declarator": "controller", "modifier": "", "original_string": "W3CTextSearchController controller;", "type": "W3CTextSearchController", "var_name": "controller" }, { "declarator": "textSearchService", "modifier": "private", "original_string"...
{ "body": "@Test\n public void testAutocompleteWithinGet() throws UnsupportedEncodingException {\n\tString queryNotFound = \"not found\";\n\tString motivation = null;\n\tString date = null;\n\tString user = null;\n\tString min = null;\n\tServiceResponse notFoundResponse = new ServiceResponse(Status.NOT_FOUND, null...
{ "fields": [ { "declarator": "CONTROLLER_NAME = \"w3CTextSearchController\"", "modifier": "public static final", "original_string": "public static final String CONTROLLER_NAME = \"w3CTextSearchController\";", "type": "String", "var_name": "CONTROLLER_NAME" }, { "declar...
{ "body": "@CrossOrigin\n\t@RequestMapping(value = WITHIN_W3C_TEXT_AUTOCOMPLETE_REQUEST_PATH, method = RequestMethod.GET)\n\tpublic ResponseEntity<Map<String, Object>> autocompleteTextWithinW3CGet(@PathVariable String withinId,\n\t\t\t@RequestParam(value = AnnotationSearchConstants.PARAM_FIELD_QUERY, required = true)...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 75735839, "size": 412, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/dlcs/the-mathmos-server" }
178064729_8
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findWhenAllowedThenNotFound() {\n\t\tString url = \"http://example.com\";\n\t\twhen(this.allow.test(url)).thenReturn(true);\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(url);\n\t\tassertThat(results).isEmpty();\n\t}", "class_method_signature": "RegexHttpMatcherTest.find...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_39
{ "fields": [ { "declarator": "SOURCES_DIR = new File(\"src/test/resources/file/gradlehttpdslscanner\")", "modifier": "private static final", "original_string": "private static final File SOURCES_DIR = new File(\"src/test/resources/file/gradlehttpdslscanner\");", "type": "File", "var...
{ "body": "@Test\n\tpublic void createWhenNotDirThenIllegalArgumentException() throws IOException {\n\t\tFile file = this.temp.newFile();\n\t\tassertThatCode(() -> PreGradle21Scanner.create(file))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(file + \" is not a directory\");\n\t}", "cl...
{ "fields": [ { "declarator": "dir", "modifier": "private final", "original_string": "private final File dir;", "type": "File", "var_name": "dir" } ], "file": "nohttp/src/main/java/io/spring/nohttp/file/PreGradle21Scanner.java", "identifier": "PreGradle21Scanner", "interf...
{ "body": "public static PreGradle21Scanner create(File dir) {\n\t\treturn new PreGradle21Scanner(dir);\n\t}", "class_method_signature": "PreGradle21Scanner.create(File dir)", "constructor": false, "full_signature": "public static PreGradle21Scanner create(File dir)", "identifier": "create", "invocations": ...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_15
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenOneHttpAndSingleLineThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc http://example.com def\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http://example.co...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_4
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void setReplacerWhenNullThenIllegalArgumentException() {\n\t\tFunction<String, String> replacer = null;\n\t\tassertThatCode(() -> this.matcher.setHttpReplacer(replacer))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"httpReplacer cannot be null\");\n\t}", "c...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public void setHttpReplacer(Function<String, String> httpReplacer) {\n\t\tif (httpReplacer == null) {\n\t\t\tthrow new IllegalArgumentException(\"httpReplacer cannot be null\");\n\t\t}\n\t\tthis.httpReplacer = httpReplacer;\n\t}", "class_method_signature": "RegexHttpMatcher.setHttpReplacer(Function<Strin...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_35
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "text = \"This is the text...
{ "body": "@Test\n\tpublic void writeTextToWhenNullThenIllegalArgumentException() {\n\t\tassertThatCode(() -> FileUtils.writeTextTo(this.text, null))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"file cannot be null\");\n\t}", "class_method_signature": "FileUtilsTest.writeTextToWhenN...
{ "fields": [], "file": "nohttp/src/main/java/io/spring/nohttp/file/FileUtils.java", "identifier": "FileUtils", "interfaces": "", "methods": [ { "class_method_signature": "FileUtils.readTextFrom(File file)", "constructor": false, "full_signature": "static String readTextFrom(File file)",...
{ "body": "static void writeTextTo(String text, File file) {\n\t\tif (text == null) {\n\t\t\tthrow new IllegalArgumentException(\"text cannot be null\");\n\t\t}\n\t\tassertValidFile(file);\n\t\ttry (Writer writer = new OutputStreamWriter(new FileOutputStream(file))) {\n\t\t\twriter.write(text);\n\t\t} catch (IOExcept...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_23
{ "fields": [ { "declarator": "allowlist = RegexPredicate.createDefaultUrlAllowlist()", "modifier": "private", "original_string": "private Predicate<String> allowlist = RegexPredicate.createDefaultUrlAllowlist();", "type": "Predicate<String>", "var_name": "allowlist" } ], "fi...
{ "body": "@Test\n\tpublic void testWhenNotMatchAndMatchThenNoMatch() {\n\t\tRegexPredicate test = new RegexPredicate(Arrays.asList(Pattern.compile(\"^$\"), Pattern.compile(\".*\")));\n\n\t\tassertThat(test.test(\"foo\")).isTrue();\n\t}", "class_method_signature": "RegexPredicateTest.testWhenNotMatchAndMatchThenNoM...
{ "fields": [ { "declarator": "patterns", "modifier": "private final", "original_string": "private final List<Pattern> patterns;", "type": "List<Pattern>", "var_name": "patterns" } ], "file": "nohttp/src/main/java/io/spring/nohttp/RegexPredicate.java", "identifier": "RegexP...
{ "body": "@Override\n\tpublic boolean test(String httpText) {\n\t\treturn this.patterns.stream()\n\t\t\t\t.anyMatch(p -> p.matcher(httpText).matches());\n\t}", "class_method_signature": "RegexPredicate.test(String httpText)", "constructor": false, "full_signature": "@Override public boolean test(String httpTex...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_19
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenHttpsThenNotFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc https://example.com def\");\n\t\tassertThat(results).isEmpty();\n\t}", "class_method_signature": "RegexHttpMatcherTest.findHttpWhenHttpsThenNotFound()", "constructor": false, "full_...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_18
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenMultipleHttpAndSingleLineThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc http://example.com def http://example.org xyz\");\n\t\tassertThat(results).hasSize(2);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).i...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_22
{ "fields": [ { "declarator": "allowlist = RegexPredicate.createDefaultUrlAllowlist()", "modifier": "private", "original_string": "private Predicate<String> allowlist = RegexPredicate.createDefaultUrlAllowlist();", "type": "Predicate<String>", "var_name": "allowlist" } ], "fi...
{ "body": "@Test\n\tpublic void testWhenNotMatchThenNoMatch() {\n\t\tRegexPredicate test = new RegexPredicate(Arrays.asList(Pattern.compile(\"^$\")));\n\n\t\tassertThat(test.test(\"foo\")).isFalse();\n\t}", "class_method_signature": "RegexPredicateTest.testWhenNotMatchThenNoMatch()", "constructor": false, "full...
{ "fields": [ { "declarator": "patterns", "modifier": "private final", "original_string": "private final List<Pattern> patterns;", "type": "List<Pattern>", "var_name": "patterns" } ], "file": "nohttp/src/main/java/io/spring/nohttp/RegexPredicate.java", "identifier": "RegexP...
{ "body": "@Override\n\tpublic boolean test(String httpText) {\n\t\treturn this.patterns.stream()\n\t\t\t\t.anyMatch(p -> p.matcher(httpText).matches());\n\t}", "class_method_signature": "RegexPredicate.test(String httpText)", "constructor": false, "full_signature": "@Override public boolean test(String httpTex...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_34
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "text = \"This is the text...
{ "body": "@Test\n\tpublic void readTextFromWhenDirThenIllegalArgumentException() {\n\t\tassertThatCode(() -> FileUtils.readTextFrom(this.temp.newFolder()))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasCauseInstanceOf(IOException.class);\n\t}", "class_method_signature": "FileUtilsTest.readTex...
{ "fields": [], "file": "nohttp/src/main/java/io/spring/nohttp/file/FileUtils.java", "identifier": "FileUtils", "interfaces": "", "methods": [ { "class_method_signature": "FileUtils.readTextFrom(File file)", "constructor": false, "full_signature": "static String readTextFrom(File file)",...
{ "body": "static String readTextFrom(File file) {\n\t\tassertValidFile(file);\n\t\ttry {\n\t\t\treturn new String(Files.readAllBytes(file.toPath()));\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Could not read \" + file, e);\n\t\t}\n\t}", "class_method_signature": "FileUtils.readTextF...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_5
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void addHttpUrlAllowlistWhenNullThenIllegalArgumentException() {\n\t\tPredicate<String> allow = null;\n\t\tassertThatCode(() -> this.matcher.addHttpAllow(allow))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"allow cannot be null\");\n\t}", "class_method_sig...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public void addHttpAllow(Predicate<String> allow) {\n\t\tif (allow == null) {\n\t\t\tthrow new IllegalArgumentException(\"allow cannot be null\");\n\t\t}\n\t\tthis.allow = this.allow.or(allow);\n\t}", "class_method_signature": "RegexHttpMatcher.addHttpAllow(Predicate<String> allow)", "constructor": fal...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_14
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenSingleQuotesSurroundThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc 'http://example.com' def\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http://example....
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_38
{ "fields": [ { "declarator": "SOURCES_DIR = new File(\"src/test/resources/file/gradlehttpdslscanner\")", "modifier": "private static final", "original_string": "private static final File SOURCES_DIR = new File(\"src/test/resources/file/gradlehttpdslscanner\");", "type": "File", "var...
{ "body": "@Test\n\tpublic void createWhenNullThenIllegalArgumentException() {\n\t\tassertThatCode(() -> PreGradle21Scanner.create(null))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"dir cannot be null\");\n\t}", "class_method_signature": "PreGradle21ScannerTest.createWhenNullThenIl...
{ "fields": [ { "declarator": "dir", "modifier": "private final", "original_string": "private final File dir;", "type": "File", "var_name": "dir" } ], "file": "nohttp/src/main/java/io/spring/nohttp/file/PreGradle21Scanner.java", "identifier": "PreGradle21Scanner", "interf...
{ "body": "public static PreGradle21Scanner create(File dir) {\n\t\treturn new PreGradle21Scanner(dir);\n\t}", "class_method_signature": "PreGradle21Scanner.create(File dir)", "constructor": false, "full_signature": "public static PreGradle21Scanner create(File dir)", "identifier": "create", "invocations": ...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_9
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenJustUrlThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"http://example.com\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http://example.com\");\n\t\tassertThat...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_2
{ "fields": [ { "declarator": "check = new NoHttpCheck()", "modifier": "private", "original_string": "private NoHttpCheck check = new NoHttpCheck();", "type": "NoHttpCheck", "var_name": "check" } ], "file": "nohttp-checkstyle/src/test/java/io/spring/nohttp/checkstyle/check/No...
{ "body": "@Test\n\tpublic void getExternalResourceLocationsWhenNoAllowlistlistThenEmpty() {\n\t\tassertThat(this.check.getExternalResourceLocations()).isEmpty();\n\t}", "class_method_signature": "NoHttpCheckTest.getExternalResourceLocationsWhenNoAllowlistlistThenEmpty()", "constructor": false, "full_signature"...
{ "fields": [ { "declarator": "matcher", "modifier": "private", "original_string": "private HttpMatcher matcher;", "type": "HttpMatcher", "var_name": "matcher" }, { "declarator": "allowlistFileName = \"\"", "modifier": "private", "original_string": "private ...
{ "body": "@Override\n\tpublic Set<String> getExternalResourceLocations() {\n\t\tSet<String> result = new HashSet<>();\n\t\tif (isAllowlistFileSet()) {\n\t\t\tresult.add(this.allowlistFileName);\n\t\t}\n\t\treturn result;\n\t}", "class_method_signature": "NoHttpCheck.getExternalResourceLocations()", "constructor"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_33
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "text = \"This is the text...
{ "body": "@Test\n\tpublic void readTextFromWhenNullThenIllegalArgumentException() {\n\t\tassertThatCode(() -> FileUtils.readTextFrom(null))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"file cannot be null\");\n\t}", "class_method_signature": "FileUtilsTest.readTextFromWhenNullThenI...
{ "fields": [], "file": "nohttp/src/main/java/io/spring/nohttp/file/FileUtils.java", "identifier": "FileUtils", "interfaces": "", "methods": [ { "class_method_signature": "FileUtils.readTextFrom(File file)", "constructor": false, "full_signature": "static String readTextFrom(File file)",...
{ "body": "static String readTextFrom(File file) {\n\t\tassertValidFile(file);\n\t\ttry {\n\t\t\treturn new String(Files.readAllBytes(file.toPath()));\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Could not read \" + file, e);\n\t\t}\n\t}", "class_method_signature": "FileUtils.readTextF...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_25
{ "fields": [ { "declarator": "allowlist = RegexPredicate.createDefaultUrlAllowlist()", "modifier": "private", "original_string": "private Predicate<String> allowlist = RegexPredicate.createDefaultUrlAllowlist();", "type": "Predicate<String>", "var_name": "allowlist" } ], "fi...
{ "body": "@Test\n\tpublic void testWhenNoDotThenAllowlisted() {\n\t\tassertThat(this.allowlist.test(\"http://foo\")).isTrue();\n\t}", "class_method_signature": "RegexPredicateTest.testWhenNoDotThenAllowlisted()", "constructor": false, "full_signature": "@Test public void testWhenNoDotThenAllowlisted()", "ide...
{ "fields": [ { "declarator": "patterns", "modifier": "private final", "original_string": "private final List<Pattern> patterns;", "type": "List<Pattern>", "var_name": "patterns" } ], "file": "nohttp/src/main/java/io/spring/nohttp/RegexPredicate.java", "identifier": "RegexP...
{ "body": "@Override\n\tpublic boolean test(String httpText) {\n\t\treturn this.patterns.stream()\n\t\t\t\t.anyMatch(p -> p.matcher(httpText).matches());\n\t}", "class_method_signature": "RegexPredicate.test(String httpText)", "constructor": false, "full_signature": "@Override public boolean test(String httpTex...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_29
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "processor = new MockHttpPro...
{ "body": "@Test\n\tpublic void processFileWhenNullThenIllegalArgumentException() {\n\t\tassertThatCode(() -> this.processor.processFile(null))\n\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t.hasMessage(\"file cannot be null\");\n\t}", "class_method_signature": "HttpProcessorTest.processFileWhenNullThe...
{ "fields": [ { "declarator": "httpMatches = new TreeSet<String>()", "modifier": "private", "original_string": "private Set<String> httpMatches = new TreeSet<String>();", "type": "Set<String>", "var_name": "httpMatches" } ], "file": "nohttp/src/main/java/io/spring/nohttp/file...
{ "body": "public List<HttpMatchResult> processFile(File file) {\n\t\tif (file == null) {\n\t\t\tthrow new IllegalArgumentException(\"file cannot be null\");\n\t\t}\n\t\tif (!file.exists()) {\n\t\t\tthrow new IllegalArgumentException(file + \" does not exist\");\n\t\t}\n\t\tif (!file.isFile()) {\n\t\t\tthrow new Ille...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_13
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenDoubleQuotesSurroundThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc \\\"http://example.com\\\" def\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http://ex...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_12
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenEndsWithUrlThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc http://example.com\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http://example.com\");\n\t\tas...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_28
{ "fields": [ { "declarator": "SOURCES_DIR = new File(\"src/test/resources/file/dirscanner\")", "modifier": "private static final", "original_string": "private static final File SOURCES_DIR = new File(\"src/test/resources/file/dirscanner\");", "type": "File", "var_name": "SOURCES_DIR...
{ "body": "@Test\n\tpublic void scanWhenNotDirThenIllegalArgumentException() throws IOException {\n\t\tFile file = this.temp.newFile();\n\t\tassertThatCode(() -> DirScanner.create(file))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(file + \" is not a directory\");\n\t}", "class_method...
{ "fields": [ { "declarator": "dir", "modifier": "private final", "original_string": "private final File dir;", "type": "File", "var_name": "dir" }, { "declarator": "excludeDirs = new ArrayList<>()", "modifier": "private", "original_string": "private List<Pr...
{ "body": "public static DirScanner create(File dir) {\n\t\treturn new DirScanner(dir);\n\t}", "class_method_signature": "DirScanner.create(File dir)", "constructor": false, "full_signature": "public static DirScanner create(File dir)", "identifier": "create", "invocations": [], "modifiers": "public stati...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_24
{ "fields": [ { "declarator": "allowlist = RegexPredicate.createDefaultUrlAllowlist()", "modifier": "private", "original_string": "private Predicate<String> allowlist = RegexPredicate.createDefaultUrlAllowlist();", "type": "Predicate<String>", "var_name": "allowlist" } ], "fi...
{ "body": "@Test\n\tpublic void createAllowlistFromPatternsWhenInvalidRegexThenUsefulException() {\n\t\t// the first line is an invalid regular expression invalid repetition\n\t\tassertThatCode(() -> RegexPredicate.createAllowlistFromPatterns(inputStream(\"{v}\")))\n\t\t\t.isInstanceOf(PatternSyntaxException.class);\...
{ "fields": [ { "declarator": "patterns", "modifier": "private final", "original_string": "private final List<Pattern> patterns;", "type": "List<Pattern>", "var_name": "patterns" } ], "file": "nohttp/src/main/java/io/spring/nohttp/RegexPredicate.java", "identifier": "RegexP...
{ "body": "public static Predicate<String> createAllowlistFromPatterns(InputStream resource) {\n\t\tList<Pattern> patterns = createPatternsFromInputStream(resource);\n\t\treturn new RegexPredicate(patterns);\n\t}", "class_method_signature": "RegexPredicate.createAllowlistFromPatterns(InputStream resource)", "cons...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_32
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "processor = new MockHttpPro...
{ "body": "@Test\n\tpublic void processFileWhenEmptyResultsThenWorks() throws IOException {\n\t\tFile file = this.temp.newFile();\n\n\t\tassertThat(this.processor.processFile(file)).isEmpty();\n\t\tassertThat(this.processor.files).containsOnly(file);\n\t}", "class_method_signature": "HttpProcessorTest.processFileWh...
{ "fields": [ { "declarator": "httpMatches = new TreeSet<String>()", "modifier": "private", "original_string": "private Set<String> httpMatches = new TreeSet<String>();", "type": "Set<String>", "var_name": "httpMatches" } ], "file": "nohttp/src/main/java/io/spring/nohttp/file...
{ "body": "public List<HttpMatchResult> processFile(File file) {\n\t\tif (file == null) {\n\t\t\tthrow new IllegalArgumentException(\"file cannot be null\");\n\t\t}\n\t\tif (!file.exists()) {\n\t\t\tthrow new IllegalArgumentException(file + \" does not exist\");\n\t\t}\n\t\tif (!file.isFile()) {\n\t\t\tthrow new Ille...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_3
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void setPatternWhenNullThenIllegalArgumentException() {\n\t\tPattern pattern = null;\n\t\tassertThatCode(() -> this.matcher.setPattern(pattern))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"pattern cannot be null\");\n\t}", "class_method_signature": "Regex...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public void setPattern(Pattern pattern) {\n\t\tif (pattern == null) {\n\t\t\tthrow new IllegalArgumentException(\"pattern cannot be null\");\n\t\t}\n\t\tthis.pattern = pattern;\n\t}", "class_method_signature": "RegexHttpMatcher.setPattern(Pattern pattern)", "constructor": false, "full_signature": "pu...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_27
{ "fields": [ { "declarator": "SOURCES_DIR = new File(\"src/test/resources/file/dirscanner\")", "modifier": "private static final", "original_string": "private static final File SOURCES_DIR = new File(\"src/test/resources/file/dirscanner\");", "type": "File", "var_name": "SOURCES_DIR...
{ "body": "@Test\n\tpublic void createWhenNotDirThenIllegalArgumentException() throws IOException {\n\t\tFile file = this.temp.newFile();\n\t\tassertThatCode(() -> DirScanner.create(file))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(file + \" is not a directory\");\n\t}", "class_meth...
{ "fields": [ { "declarator": "dir", "modifier": "private final", "original_string": "private final File dir;", "type": "File", "var_name": "dir" }, { "declarator": "excludeDirs = new ArrayList<>()", "modifier": "private", "original_string": "private List<Pr...
{ "body": "public static DirScanner create(File dir) {\n\t\treturn new DirScanner(dir);\n\t}", "class_method_signature": "DirScanner.create(File dir)", "constructor": false, "full_signature": "public static DirScanner create(File dir)", "identifier": "create", "invocations": [], "modifiers": "public stati...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_31
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "processor = new MockHttpPro...
{ "body": "@Test\n\tpublic void processFileWhenDoesNotExistIllegalArgumentException() throws IOException {\n\t\tFile notExists = new File(\"doesnotexist\");\n\t\tassertThatCode(() -> this.processor.processFile(notExists))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(notExists + \" does ...
{ "fields": [ { "declarator": "httpMatches = new TreeSet<String>()", "modifier": "private", "original_string": "private Set<String> httpMatches = new TreeSet<String>();", "type": "Set<String>", "var_name": "httpMatches" } ], "file": "nohttp/src/main/java/io/spring/nohttp/file...
{ "body": "public List<HttpMatchResult> processFile(File file) {\n\t\tif (file == null) {\n\t\t\tthrow new IllegalArgumentException(\"file cannot be null\");\n\t\t}\n\t\tif (!file.exists()) {\n\t\t\tthrow new IllegalArgumentException(file + \" does not exist\");\n\t\t}\n\t\tif (!file.isFile()) {\n\t\t\tthrow new Ille...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_0
{ "fields": [ { "declarator": "check = new NoHttpCheck()", "modifier": "private", "original_string": "private NoHttpCheck check = new NoHttpCheck();", "type": "NoHttpCheck", "var_name": "check" } ], "file": "nohttp-checkstyle/src/test/java/io/spring/nohttp/checkstyle/check/No...
{ "body": "@Test\n\tpublic void setAllowlistFilenameWhenNullThenIllegalArgumentException() {\n\t\tassertThatCode(() -> this.check.setAllowlistFileName(null))\n\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t.hasMessage(\"allowlistFileName cannot be null\");\n\t}", "class_method_signature": "NoHttpCheckTe...
{ "fields": [ { "declarator": "matcher", "modifier": "private", "original_string": "private HttpMatcher matcher;", "type": "HttpMatcher", "var_name": "matcher" }, { "declarator": "allowlistFileName = \"\"", "modifier": "private", "original_string": "private ...
{ "body": "public void setAllowlistFileName(String allowlistFileName) {\n\t\tif (allowlistFileName == null) {\n\t\t\tthrow new IllegalArgumentException(\"allowlistFileName cannot be null\");\n\t\t}\n\t\tthis.allowlistFileName = allowlistFileName;\n\t}", "class_method_signature": "NoHttpCheck.setAllowlistFileName(St...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_11
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenStartsWithUrlThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"http://example.com def\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http://example.com\");\n\t\t...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_10
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenUsernameAndPasswordThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc http://rob:password@example.com\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http://ro...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_1
{ "fields": [ { "declarator": "check = new NoHttpCheck()", "modifier": "private", "original_string": "private NoHttpCheck check = new NoHttpCheck();", "type": "NoHttpCheck", "var_name": "check" } ], "file": "nohttp-checkstyle/src/test/java/io/spring/nohttp/checkstyle/check/No...
{ "body": "@Test\n\tpublic void setAllowlistWhenNullThenIllegalArgumentException() {\n\t\tassertThatCode(() -> this.check.setAllowlist(null))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"allowlist cannot be null\");\n\t}", "class_method_signature": "NoHttpCheckTest.setAllowlistWhenN...
{ "fields": [ { "declarator": "matcher", "modifier": "private", "original_string": "private HttpMatcher matcher;", "type": "HttpMatcher", "var_name": "matcher" }, { "declarator": "allowlistFileName = \"\"", "modifier": "private", "original_string": "private ...
{ "body": "public void setAllowlist(String allowlist) {\n\t\tif (allowlist == null) {\n\t\t\tthrow new IllegalArgumentException(\"allowlist cannot be null\");\n\t\t}\n\t\tthis.allowlist = allowlist;\n\t}", "class_method_signature": "NoHttpCheck.setAllowlist(String allowlist)", "constructor": false, "full_signat...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_30
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "processor = new MockHttpPro...
{ "body": "@Test\n\tpublic void processFileWhenFolderThenIllegalArgumentException() throws IOException {\n\t\tFile dir = this.temp.newFolder();\n\t\tassertThatCode(() -> this.processor.processFile(dir))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(dir + \" must be a valid file (i.e. not...
{ "fields": [ { "declarator": "httpMatches = new TreeSet<String>()", "modifier": "private", "original_string": "private Set<String> httpMatches = new TreeSet<String>();", "type": "Set<String>", "var_name": "httpMatches" } ], "file": "nohttp/src/main/java/io/spring/nohttp/file...
{ "body": "public List<HttpMatchResult> processFile(File file) {\n\t\tif (file == null) {\n\t\t\tthrow new IllegalArgumentException(\"file cannot be null\");\n\t\t}\n\t\tif (!file.exists()) {\n\t\t\tthrow new IllegalArgumentException(file + \" does not exist\");\n\t\t}\n\t\tif (!file.isFile()) {\n\t\t\tthrow new Ille...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_26
{ "fields": [ { "declarator": "SOURCES_DIR = new File(\"src/test/resources/file/dirscanner\")", "modifier": "private static final", "original_string": "private static final File SOURCES_DIR = new File(\"src/test/resources/file/dirscanner\");", "type": "File", "var_name": "SOURCES_DIR...
{ "body": "@Test\n\tpublic void createWhenNullThenIllegalArgumentException() {\n\t\tassertThatCode(() -> DirScanner.create(null))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"dir cannot be null\");\n\t}", "class_method_signature": "DirScannerTest.createWhenNullThenIllegalArgumentExc...
{ "fields": [ { "declarator": "dir", "modifier": "private final", "original_string": "private final File dir;", "type": "File", "var_name": "dir" }, { "declarator": "excludeDirs = new ArrayList<>()", "modifier": "private", "original_string": "private List<Pr...
{ "body": "public static DirScanner create(File dir) {\n\t\treturn new DirScanner(dir);\n\t}", "class_method_signature": "DirScanner.create(File dir)", "constructor": false, "full_signature": "public static DirScanner create(File dir)", "identifier": "create", "invocations": [], "modifiers": "public stati...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_17
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenOneHttpAndMultiLineThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"1223\\nabc http://example.com def\\n5678\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_21
{ "fields": [ { "declarator": "allowlist = RegexPredicate.createDefaultUrlAllowlist()", "modifier": "private", "original_string": "private Predicate<String> allowlist = RegexPredicate.createDefaultUrlAllowlist();", "type": "Predicate<String>", "var_name": "allowlist" } ], "fi...
{ "body": "@Test\n\tpublic void testWhenMatchAllThenMatch() {\n\t\tRegexPredicate test = new RegexPredicate(Arrays.asList(Pattern.compile(\".*\")));\n\n\t\tassertThat(test.test(\"foo\")).isTrue();\n\t}", "class_method_signature": "RegexPredicateTest.testWhenMatchAllThenMatch()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "patterns", "modifier": "private final", "original_string": "private final List<Pattern> patterns;", "type": "List<Pattern>", "var_name": "patterns" } ], "file": "nohttp/src/main/java/io/spring/nohttp/RegexPredicate.java", "identifier": "RegexP...
{ "body": "@Override\n\tpublic boolean test(String httpText) {\n\t\treturn this.patterns.stream()\n\t\t\t\t.anyMatch(p -> p.matcher(httpText).matches());\n\t}", "class_method_signature": "RegexPredicate.test(String httpText)", "constructor": false, "full_signature": "@Override public boolean test(String httpTex...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_37
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "text = \"This is the text...
{ "body": "@Test\n\tpublic void writeTextFromWhenTextNullIllegalArgumentException() {\n\t\tassertThatCode(() -> FileUtils.writeTextTo(null, this.temp.newFile()))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasMessage(\"text cannot be null\");\n\t}", "class_method_signature": "FileUtilsTest.writ...
{ "fields": [], "file": "nohttp/src/main/java/io/spring/nohttp/file/FileUtils.java", "identifier": "FileUtils", "interfaces": "", "methods": [ { "class_method_signature": "FileUtils.readTextFrom(File file)", "constructor": false, "full_signature": "static String readTextFrom(File file)",...
{ "body": "static void writeTextTo(String text, File file) {\n\t\tif (text == null) {\n\t\t\tthrow new IllegalArgumentException(\"text cannot be null\");\n\t\t}\n\t\tassertValidFile(file);\n\t\ttry (Writer writer = new OutputStreamWriter(new FileOutputStream(file))) {\n\t\t\twriter.write(text);\n\t\t} catch (IOExcept...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_6
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findWhenHttpEscapleColonThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"http\\\\://example.com\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http\\\\://example.com\");\n\...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_7
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findWhenHttpsThenNotFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"https://example.com\");\n\t\tassertThat(results).isEmpty();\n\t}", "class_method_signature": "RegexHttpMatcherTest.findWhenHttpsThenNotFound()", "constructor": false, "full_signature": "@Te...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_36
{ "fields": [ { "declarator": "temp = new TemporaryFolder()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic TemporaryFolder temp = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temp" }, { "declarator": "text = \"This is the text...
{ "body": "@Test\n\tpublic void writeTextFromWhenDirThenIllegalArgumentException() {\n\t\tassertThatCode(() -> FileUtils.writeTextTo(this.text, this.temp.newFolder()))\n\t\t\t\t.isInstanceOf(IllegalArgumentException.class)\n\t\t\t\t.hasCauseInstanceOf(IOException.class);\n\t}", "class_method_signature": "FileUtilsT...
{ "fields": [], "file": "nohttp/src/main/java/io/spring/nohttp/file/FileUtils.java", "identifier": "FileUtils", "interfaces": "", "methods": [ { "class_method_signature": "FileUtils.readTextFrom(File file)", "constructor": false, "full_signature": "static String readTextFrom(File file)",...
{ "body": "static void writeTextTo(String text, File file) {\n\t\tif (text == null) {\n\t\t\tthrow new IllegalArgumentException(\"text cannot be null\");\n\t\t}\n\t\tassertValidFile(file);\n\t\ttry (Writer writer = new OutputStreamWriter(new FileOutputStream(file))) {\n\t\t\twriter.write(text);\n\t\t} catch (IOExcept...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_20
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenNoUrlThenNotFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc def\");\n\t\tassertThat(results).isEmpty();\n\t}", "class_method_signature": "RegexHttpMatcherTest.findHttpWhenNoUrlThenNotFound()", "constructor": false, "full_signature": "@Test p...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
178064729_16
{ "fields": [ { "declarator": "allow", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate Predicate<String> allow;", "type": "Predicate<String>", "var_name": "allow" }, { "declarator": "matcher", "modifier": "private", "original_string": "p...
{ "body": "@Test\n\tpublic void findHttpWhenQueryThenFound() {\n\t\tList<HttpMatchResult> results = this.matcher.findHttp(\"abc http://example.com?a=b def\");\n\t\tassertThat(results).hasSize(1);\n\n\t\tHttpMatchResult result = results.get(0);\n\t\tassertThat(result.getHttp()).isEqualTo(\"http://example.com?a=b\");\n...
{ "fields": [ { "declarator": "pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])\")", "modifier": "private", "original_string": "private Pattern pattern = Pattern.compile(\"\\\\b(http\\\\\\\\?://[-a-zA-Z0-9+&@/%?=~_|!:,.;]*[-a-zA-Z0-9+&@/%=~_|])...
{ "body": "public List<HttpMatchResult> findHttp(String text) {\n\t\treturn replaceHttp(text, NoOpWriter.INSTANCE).getMatches();\n\t}", "class_method_signature": "RegexHttpMatcher.findHttp(String text)", "constructor": false, "full_signature": "public List<HttpMatchResult> findHttp(String text)", "identifier"...
{ "created": null, "fork": null, "fork_count": 30, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 178064729, "size": 333, "stargazer_count": 192, "stars": null, "updates": null, "url": "https://github.com/spring-io/nohttp" }
133447770_167
{ "fields": [ { "declarator": "EMPTY_FILE = \"subrip/empty\"", "modifier": "private static final", "original_string": "private static final String EMPTY_FILE = \"subrip/empty\";", "type": "String", "var_name": "EMPTY_FILE" }, { "declarator": "TYPICAL_FILE = \"subrip/typ...
{ "body": "@Test\n public void testDecodeTypicalWithByteOrderMark() throws IOException {\n SubripDecoder decoder = new SubripDecoder();\n byte[] bytes =\n TestUtil.getByteArray(\n ApplicationProvider.getApplicationContext(), TYPICAL_WITH_BYTE_ORDER_MARK);\n SubripSubtitle subtitle = decode...
{ "fields": [ { "declarator": "START_FRACTION = 0.08f", "modifier": "static final", "original_string": "static final float START_FRACTION = 0.08f;", "type": "float", "var_name": "START_FRACTION" }, { "declarator": "END_FRACTION = 1 - START_FRACTION", "modifier": "...
{ "body": "@Override\n protected SubripSubtitle decode(byte[] bytes, int length, boolean reset) {\n ArrayList<Cue> cues = new ArrayList<>();\n LongArray cueTimesUs = new LongArray();\n ParsableByteArray subripData = new ParsableByteArray(bytes, length);\n String currentLine;\n\n while ((currentLine = ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_188
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseWellFormedUnclosedEndAtCueEnd() throws Exception {\n Spanned text = parseCueText(\"An <u some trailing stuff>unclosed u tag with \"\n + \"<i>italic</i> inside\");\n\n assertThat(text.toString()).isEqualTo(\"An unclosed u tag with italic inside\");\n\n Underline...
{ "fields": [ { "declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")", "modifier": "public static final", "original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",...
{ "body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_472
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getBitratesUsingPastInfo_bitratesArrayGiven_returnsTheSameArray() {\n FakeMediaChunk chunk =\n createChunk(\n createFormatWithBitrate(10),\n /* length= */ 10,\n /* startTimeSec= */ 0,\n /* endTimeSec= */ 10);\n\n int[] bitratesAr...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_219
{ "fields": [ { "declarator": "TEST_POSITION_US = 123456789012345678L", "modifier": "private static final", "original_string": "private static final long TEST_POSITION_US = 123456789012345678L;", "type": "long", "var_name": "TEST_POSITION_US" }, { "declarator": "SLEEP_T...
{ "body": "@Test\n public void standaloneResetPosition_shouldNotStartClock() throws Exception {\n mediaClock.resetPosition(TEST_POSITION_US);\n assertClockIsStopped();\n }", "class_method_signature": "DefaultMediaClockTest.standaloneResetPosition_shouldNotStartClock()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "standaloneMediaClock", "modifier": "private final", "original_string": "private final StandaloneMediaClock standaloneMediaClock;", "type": "StandaloneMediaClock", "var_name": "standaloneMediaClock" }, { "declarator": "listener", "mod...
{ "body": "public void resetPosition(long positionUs) {\n standaloneMediaClock.resetPosition(positionUs);\n }", "class_method_signature": "DefaultMediaClock.resetPosition(long positionUs)", "constructor": false, "full_signature": "public void resetPosition(long positionUs)", "identifier": "resetPosition",...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_425
{ "fields": [ { "declarator": "uri1", "modifier": "private", "original_string": "private Uri uri1;", "type": "Uri", "var_name": "uri1" }, { "declarator": "uri2", "modifier": "private", "original_string": "private Uri uri2;", "type": "Uri", "var_n...
{ "body": "@Test\n public void testParcelable() {\n ArrayList<StreamKey> streamKeys = new ArrayList<>();\n streamKeys.add(new StreamKey(1, 2, 3));\n streamKeys.add(new StreamKey(4, 5, 6));\n DownloadRequest requestToParcel =\n new DownloadRequest(\n \"id\",\n \"type\",\n ...
{ "fields": [ { "declarator": "TYPE_PROGRESSIVE = \"progressive\"", "modifier": "public static final", "original_string": "public static final String TYPE_PROGRESSIVE = \"progressive\";", "type": "String", "var_name": "TYPE_PROGRESSIVE" }, { "declarator": "TYPE_DASH = \...
{ "body": "@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(id);\n dest.writeString(type);\n dest.writeString(uri.toString());\n dest.writeInt(streamKeys.size());\n for (int i = 0; i < streamKeys.size(); i++) {\n dest.writeParcelable(streamKeys.get(i), /* parcela...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_433
{ "fields": [ { "declarator": "CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "private static final", "original_string": "private static final long CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "CONTENT_DURATION_US" }, { "de...
{ "body": "@Test\n public void\n updateQueuedPeriods_withDurationChangeInReadingPeriodReadToEnd_doesntHandleChangeAndRemovesPeriodsAfterChangedPeriod() {\n setupTimeline(\n /* initialPositionUs= */ 0,\n /* adGroupTimesUs= */ FIRST_AD_START_TIME_US,\n SECOND_AD_START_TIME_US);\n setAdG...
{ "fields": [ { "declarator": "MAXIMUM_BUFFER_AHEAD_PERIODS = 100", "modifier": "private static final", "original_string": "private static final int MAXIMUM_BUFFER_AHEAD_PERIODS = 100;", "type": "int", "var_name": "MAXIMUM_BUFFER_AHEAD_PERIODS" }, { "declarator": "perio...
{ "body": "public boolean updateQueuedPeriods(long rendererPositionUs, long maxRendererReadPositionUs) {\n // TODO: Merge this into setTimeline so that the queue gets updated as soon as the new timeline\n // is set, once all cases handled by ExoPlayerImplInternal.handleSourceInfoRefreshed can be\n // handled...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_258
{ "fields": [ { "declarator": "mockCache", "modifier": "@Mock(answer = Answers.CALLS_REAL_METHODS) private", "original_string": "@Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache;", "type": "AbstractFakeCache", "var_name": "mockCache" }, { "...
{ "body": "@Test\n public void testDefaultCacheKeyFactory_buildCacheKey() {\n Uri testUri = Uri.parse(\"test\");\n String key = \"key\";\n // If DataSpec.key is present, returns it.\n assertThat(\n CacheUtil.DEFAULT_CACHE_KEY_FACTORY.buildCacheKey(\n new DataSpec(testUri, 0, LEN...
{ "fields": [ { "declarator": "DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024;", "type": "int", "var_name": "DEFAULT_BUFFER_SIZE_BYTES" }, { "declarator": "DE...
{ "body": "private static String buildCacheKey(\n DataSpec dataSpec, @Nullable CacheKeyFactory cacheKeyFactory) {\n return (cacheKeyFactory != null ? cacheKeyFactory : DEFAULT_CACHE_KEY_FACTORY)\n .buildCacheKey(dataSpec);\n }", "class_method_signature": "CacheUtil.buildCacheKey(\n DataSpec dat...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_171
{ "fields": [ { "declarator": "EMPTY_FILE = \"subrip/empty\"", "modifier": "private static final", "original_string": "private static final String EMPTY_FILE = \"subrip/empty\";", "type": "String", "var_name": "EMPTY_FILE" }, { "declarator": "TYPICAL_FILE = \"subrip/typ...
{ "body": "@Test\n public void testDecodeTypicalNegativeTimestamps() throws IOException {\n // Parsing should succeed, parsing the third cue only.\n SubripDecoder decoder = new SubripDecoder();\n byte[] bytes =\n TestUtil.getByteArray(\n ApplicationProvider.getApplicationContext(), TYPICAL...
{ "fields": [ { "declarator": "START_FRACTION = 0.08f", "modifier": "static final", "original_string": "static final float START_FRACTION = 0.08f;", "type": "float", "var_name": "START_FRACTION" }, { "declarator": "END_FRACTION = 1 - START_FRACTION", "modifier": "...
{ "body": "@Override\n protected SubripSubtitle decode(byte[] bytes, int length, boolean reset) {\n ArrayList<Cue> cues = new ArrayList<>();\n LongArray cueTimesUs = new LongArray();\n ParsableByteArray subripData = new ParsableByteArray(bytes, length);\n String currentLine;\n\n while ((currentLine = ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_464
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getBitratesUsingPastInfo_oneChunkFormatNoBitrate_returnsNoValue() {\n Format format = createFormatWithBitrate(Format.NO_VALUE);\n FakeMediaChunk chunk =\n createChunk(format, /* length= */ 10, /* startTimeSec= */ 0, /* endTimeSec= */ 10);\n\n int[] bitrates =\n T...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_223
{ "fields": [ { "declarator": "TEST_POSITION_US = 123456789012345678L", "modifier": "private static final", "original_string": "private static final long TEST_POSITION_US = 123456789012345678L;", "type": "long", "var_name": "TEST_POSITION_US" }, { "declarator": "SLEEP_T...
{ "body": "@Test\n public void standaloneSetPlaybackParameters_shouldTriggerCallback() {\n mediaClock.setPlaybackParameters(TEST_PLAYBACK_PARAMETERS);\n verify(listener).onPlaybackParametersChanged(TEST_PLAYBACK_PARAMETERS);\n }", "class_method_signature": "DefaultMediaClockTest.standaloneSetPlaybackParamet...
{ "fields": [ { "declarator": "standaloneMediaClock", "modifier": "private final", "original_string": "private final StandaloneMediaClock standaloneMediaClock;", "type": "StandaloneMediaClock", "var_name": "standaloneMediaClock" }, { "declarator": "listener", "mod...
{ "body": "@Override\n public PlaybackParameters setPlaybackParameters(PlaybackParameters playbackParameters) {\n if (rendererClock != null) {\n playbackParameters = rendererClock.setPlaybackParameters(playbackParameters);\n }\n standaloneMediaClock.setPlaybackParameters(playbackParameters);\n liste...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_366
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java", "identifier": "CompositeSequenceableLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testContinueLoadingReturnTrueIfFurthestBehindLoaderCanMakeProgress() {\n FakeSequenceableLoader loader1 =\n new FakeSequenceableLoader(/* bufferedPositionUs */ 1000, /* nextLoadPositionUs */ 2000);\n FakeSequenceableLoader loader2 =\n new FakeSequenceableLoader(/* b...
{ "fields": [ { "declarator": "loaders", "modifier": "protected final", "original_string": "protected final SequenceableLoader[] loaders;", "type": "SequenceableLoader[]", "var_name": "loaders" } ], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/source/...
{ "body": "@Override\n public boolean continueLoading(long positionUs) {\n boolean madeProgress = false;\n boolean madeProgressThisIteration;\n do {\n madeProgressThisIteration = false;\n long nextLoadPositionUs = getNextLoadPositionUs();\n if (nextLoadPositionUs == C.TIME_END_OF_SOURCE) {\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_274
{ "fields": [ { "declarator": "TEST_DATA = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}", "modifier": "private static final", "original_string": "private static final byte[] TEST_DATA = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};", "type": "byte[]", "var_name": "TEST_DATA" }, { ...
{ "body": "@Test\n public void testUnsatisfiableRangeWithCacheKeyFactoryOverridingDataSpecCacheKey()\n throws Exception {\n // Bounded request but the content length is unknown. This forces all data to be cached but not\n // the length.\n assertCacheAndRead(boundedDataSpecWithKey, /* unknownLength= */ ...
{ "fields": [ { "declarator": "FLAG_BLOCK_ON_CACHE = 1", "modifier": "public static final", "original_string": "public static final int FLAG_BLOCK_ON_CACHE = 1;", "type": "int", "var_name": "FLAG_BLOCK_ON_CACHE" }, { "declarator": "FLAG_IGNORE_CACHE_ON_ERROR = 1 << 1", ...
{ "body": "@Override\n public long open(DataSpec dataSpec) throws IOException {\n try {\n key = cacheKeyFactory.buildCacheKey(dataSpec);\n uri = dataSpec.uri;\n actualUri = getRedirectedUriOrDefault(cache, key, /* defaultUri= */ uri);\n httpMethod = dataSpec.httpMethod;\n flags = dataSpec...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_36
{ "fields": [ { "declarator": "TEST_URI = \"http://www.google.com\"", "modifier": "private static final", "original_string": "private static final String TEST_URI = \"http://www.google.com\";", "type": "String", "var_name": "TEST_URI" }, { "declarator": "TEST_DATA = new...
{ "body": "@Test\n public void testPeekFullyAcrossEndOfInputWithAllowEndOfInputFails() throws Exception {\n DefaultExtractorInput input = createDefaultExtractorInput();\n byte[] target = new byte[TEST_DATA.length];\n\n // Check peeking before the end of input with allowEndOfInput succeeds.\n assertThat(i...
{ "fields": [ { "declarator": "PEEK_MIN_FREE_SPACE_AFTER_RESIZE = 64 * 1024", "modifier": "private static final", "original_string": "private static final int PEEK_MIN_FREE_SPACE_AFTER_RESIZE = 64 * 1024;", "type": "int", "var_name": "PEEK_MIN_FREE_SPACE_AFTER_RESIZE" }, { ...
{ "body": "@Override\n public boolean peekFully(byte[] target, int offset, int length, boolean allowEndOfInput)\n throws IOException, InterruptedException {\n if (!advancePeekPosition(length, allowEndOfInput)) {\n return false;\n }\n System.arraycopy(peekBuffer, peekBufferPosition - length, target...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_331
{ "fields": [ { "declarator": "sonicAudioProcessor", "modifier": "private", "original_string": "private SonicAudioProcessor sonicAudioProcessor;", "type": "SonicAudioProcessor", "var_name": "sonicAudioProcessor" } ], "file": "videoplayer-core/src/test/java/com/google/android/...
{ "body": "@Test\n public void testDoesNotSupportNon16BitInput() throws Exception {\n try {\n sonicAudioProcessor.configure(44100, 2, C.ENCODING_PCM_8BIT);\n fail();\n } catch (AudioProcessor.UnhandledFormatException e) {\n // Expected.\n }\n try {\n sonicAudioProcessor.configure(4410...
{ "fields": [ { "declarator": "MAXIMUM_SPEED = 8.0f", "modifier": "public static final", "original_string": "public static final float MAXIMUM_SPEED = 8.0f;", "type": "float", "var_name": "MAXIMUM_SPEED" }, { "declarator": "MINIMUM_SPEED = 0.1f", "modifier": "publ...
{ "body": "@Override\n public boolean configure(int sampleRateHz, int channelCount, @Encoding int encoding)\n throws UnhandledFormatException {\n if (encoding != C.ENCODING_PCM_16BIT) {\n throw new UnhandledFormatException(sampleRateHz, channelCount, encoding);\n }\n int outputSampleRateHz = pendi...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_448
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getAverageBitrate_oneChunk_returnsChunkBitrate() {\n long[] chunkTimeBoundariesSec = {12, 17};\n long[] chunkLengths = {10};\n\n FakeMediaChunkIterator iterator =\n new FakeMediaChunkIterator(chunkTimeBoundariesSec, chunkLengths);\n\n assertThat(TrackSelectionUtil.ge...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "public static int getAverageBitrate(MediaChunkIterator iterator, long maxDurationUs) {\n long totalDurationUs = 0;\n long totalLength = 0;\n while (iterator.next()) {\n long chunkLength = iterator.getDataSpec().length;\n if (chunkLength == C.LENGTH_UNSET) {\n break;\n }\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_262
{ "fields": [ { "declarator": "mockCache", "modifier": "@Mock(answer = Answers.CALLS_REAL_METHODS) private", "original_string": "@Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache;", "type": "AbstractFakeCache", "var_name": "mockCache" }, { "...
{ "body": "@Test\n public void testGetCached() {\n mockCache.contentLength = 1000;\n mockCache.spansAndGaps = new int[] {100, 100, 200};\n Pair<Long, Long> contentLengthAndBytesCached =\n CacheUtil.getCached(\n new DataSpec(Uri.parse(\"test\")), mockCache, /* cacheKeyFactory= */ null);\n\n...
{ "fields": [ { "declarator": "DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024", "modifier": "public static final", "original_string": "public static final int DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024;", "type": "int", "var_name": "DEFAULT_BUFFER_SIZE_BYTES" }, { "declarator": "DE...
{ "body": "public static Pair<Long, Long> getCached(\n DataSpec dataSpec, Cache cache, @Nullable CacheKeyFactory cacheKeyFactory) {\n String key = buildCacheKey(dataSpec, cacheKeyFactory);\n long position = dataSpec.absoluteStreamPosition;\n long requestLength;\n if (dataSpec.length != C.LENGTH_UNSET...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_327
{ "fields": [ { "declarator": "NO_COMMAND_RECEIVED = ~PLAYER_COMMAND_WAIT_FOR_CALLBACK", "modifier": "private static final", "original_string": "private static final int NO_COMMAND_RECEIVED = ~PLAYER_COMMAND_WAIT_FOR_CALLBACK;", "type": "int", "var_name": "NO_COMMAND_RECEIVED" },...
{ "body": "@Test\n public void setAudioAttributes_inStateEnded_requestsAudioFocus() {\n // Ensure setting audio attributes when player is in STATE_ENDED requests audio focus.\n AudioAttributes media = new AudioAttributes.Builder().setUsage(C.USAGE_MEDIA).build();\n Shadows.shadowOf(audioManager)\n .s...
{ "fields": [ { "declarator": "PLAYER_COMMAND_DO_NOT_PLAY = -1", "modifier": "public static final", "original_string": "public static final int PLAYER_COMMAND_DO_NOT_PLAY = -1;", "type": "int", "var_name": "PLAYER_COMMAND_DO_NOT_PLAY" }, { "declarator": "PLAYER_COMMAND_...
{ "body": "@PlayerCommand\n public int setAudioAttributes(\n @Nullable AudioAttributes audioAttributes, boolean playWhenReady, int playerState) {\n if (!Util.areEqual(this.audioAttributes, audioAttributes)) {\n this.audioAttributes = audioAttributes;\n focusGain = convertAudioAttributesToFocusGain(...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_20
{ "fields": [ { "declarator": "OGG_EXTRACTOR_FACTORY = OggExtractor::new", "modifier": "private static final", "original_string": "private static final ExtractorFactory OGG_EXTRACTOR_FACTORY = OggExtractor::new;", "type": "ExtractorFactory", "var_name": "OGG_EXTRACTOR_FACTORY" } ...
{ "body": "@Test\n public void testSniffFailsEOF() throws Exception {\n byte[] data = OggTestData.buildOggHeader(0x02, 0, 1000, 0x00);\n assertThat(sniff(data)).isFalse();\n }", "class_method_signature": "OggExtractorTest.testSniffFailsEOF()", "constructor": false, "full_signature": "@Test public void t...
{ "fields": [ { "declarator": "FACTORY = () -> new Extractor[] {new OggExtractor()}", "modifier": "public static final", "original_string": "public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new OggExtractor()};", "type": "ExtractorsFactory", "var_name": "FACTORY...
{ "body": "@Override\n public boolean sniff(ExtractorInput input) throws IOException, InterruptedException {\n try {\n return sniffInternal(input);\n } catch (ParserException e) {\n return false;\n }\n }", "class_method_signature": "OggExtractor.sniff(ExtractorInput input)", "constructor": fa...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_235
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/metadata/icy/IcyDecoderTest.java", "identifier": "IcyDecoderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void decode_semiColonInTitle() {\n IcyDecoder decoder = new IcyDecoder();\n Metadata metadata = decoder.decode(\"StreamTitle='test; title';StreamURL='test_url';\");\n\n assertThat(metadata.length()).isEqualTo(1);\n IcyInfo streamInfo = (IcyInfo) metadata.get(0);\n assertThat(...
{ "fields": [ { "declarator": "TAG = \"IcyDecoder\"", "modifier": "private static final", "original_string": "private static final String TAG = \"IcyDecoder\";", "type": "String", "var_name": "TAG" }, { "declarator": "METADATA_ELEMENT = Pattern.compile(\"(.+?)='(.+?)';\...
{ "body": "@Override\n @Nullable\n @SuppressWarnings(\"ByteBufferBackingArray\")\n public Metadata decode(MetadataInputBuffer inputBuffer) {\n ByteBuffer buffer = inputBuffer.data;\n byte[] data = buffer.array();\n int length = buffer.limit();\n return decode(Util.fromUtf8Bytes(data, 0, length));\n }"...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_98
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetCodecsOfType() {\n assertThat(getCodecsOfType(null, C.TRACK_TYPE_VIDEO)).isNull();\n assertThat(getCodecsOfType(\"avc1.64001e,vp9.63.1\", C.TRACK_TYPE_AUDIO)).isNull();\n assertThat(getCodecsOfType(\" vp9.63.1, ec-3 \", C.TRACK_TYPE_AUDIO)).isEqualTo(\"ec-3\");\n ass...
{ "fields": [ { "declarator": "SDK_INT = Build.VERSION.SDK_INT", "modifier": "public static final", "original_string": "public static final int SDK_INT = Build.VERSION.SDK_INT;", "type": "int", "var_name": "SDK_INT" }, { "declarator": "DEVICE = Build.DEVICE", "mod...
{ "body": "public static @Nullable String getCodecsOfType(String codecs, int trackType) {\n String[] codecArray = splitCodecs(codecs);\n if (codecArray.length == 0) {\n return null;\n }\n StringBuilder builder = new StringBuilder();\n for (String codec : codecArray) {\n if (trackType == MimeT...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_370
{ "fields": [ { "declarator": "window", "modifier": "private", "original_string": "private Window window;", "type": "Window", "var_name": "window" }, { "declarator": "period", "modifier": "private", "original_string": "private Period period;", "type": ...
{ "body": "@Test\n public void setTag_isUsedForWindowTag() {\n Object tag = new Object();\n SinglePeriodTimeline timeline =\n new SinglePeriodTimeline(\n /* durationUs= */ C.TIME_UNSET, /* isSeekable= */ false, /* isDynamic= */ false, tag);\n\n assertThat(timeline.getWindow(/* windowIndex=...
{ "fields": [ { "declarator": "UID = new Object()", "modifier": "private static final", "original_string": "private static final Object UID = new Object();", "type": "Object", "var_name": "UID" }, { "declarator": "presentationStartTimeMs", "modifier": "private fin...
{ "body": "@Override\n public Window getWindow(\n int windowIndex, Window window, boolean setTag, long defaultPositionProjectionUs) {\n Assertions.checkIndex(windowIndex, 0, 1);\n Object tag = setTag ? this.tag : null;\n long windowDefaultStartPositionUs = this.windowDefaultStartPositionUs;\n if (is...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_409
{ "fields": [ { "declarator": "NOW_MS = 1234", "modifier": "private static final", "original_string": "private static final long NOW_MS = 1234;", "type": "long", "var_name": "NOW_MS" }, { "declarator": "tempFile", "modifier": "private", "original_string": "p...
{ "body": "@Test\n public void mergeRequest_existingDownload_createsMergedDownload() throws IOException {\n StreamKey streamKey1 =\n new StreamKey(/* periodIndex= */ 3, /* groupIndex= */ 4, /* trackIndex= */ 5);\n StreamKey streamKey2 =\n new StreamKey(/* periodIndex= */ 0, /* groupIndex= */ 1, /...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/offline/ActionFileUpgradeUtil.java", "identifier": "ActionFileUpgradeUtil", "interfaces": "", "methods": [ { "class_method_signature": "ActionFileUpgradeUtil.ActionFileUpgradeUtil()", "constructor": true, ...
{ "body": "static void mergeRequest(\n DownloadRequest request,\n DefaultDownloadIndex downloadIndex,\n boolean addNewDownloadAsCompleted,\n long nowMs)\n throws IOException {\n Download download = downloadIndex.getDownload(request.id);\n if (download != null) {\n download = Downlo...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_491
{ "fields": [ { "declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)", "modifier": "private static final", "original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ...
{ "body": "@Test\n public void testSelectTracksPreferHigherNumChannelBeforeSampleRate()\n throws Exception {\n Format higherChannelLowerSampleRateFormat =\n Format.createAudioSampleFormat(\n \"audioFormat\",\n MimeTypes.AUDIO_AAC,\n null,\n Format.NO_VALUE,\...
{ "fields": [ { "declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f", "modifier": "private static final", "original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;", "type": "float", "var_name": "FRACTION_TO_CONSIDER_FULLSCREEN" }, { "de...
{ "body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_184
{ "fields": [ { "declarator": "SINGLE_CUE_SAMPLE = {\n 0x00, 0x00, 0x00, 0x1C, // Size\n 0x76, 0x74, 0x74, 0x63, // \"vttc\" Box type. VTT Cue box begins:\n\n 0x00, 0x00, 0x00, 0x14, // Contained payload box's size\n 0x70, 0x61, 0x79, 0x6c, // Contained payload box's type (payl), Cue...
{ "body": "@Test\n public void testNoCueSample() throws SubtitleDecoderException {\n Mp4WebvttDecoder decoder = new Mp4WebvttDecoder();\n Subtitle result = decoder.decode(NO_CUE_SAMPLE, NO_CUE_SAMPLE.length, false);\n assertMp4WebvttSubtitleEquals(result);\n }", "class_method_signature": "Mp4WebvttDecode...
{ "fields": [ { "declarator": "BOX_HEADER_SIZE = 8", "modifier": "private static final", "original_string": "private static final int BOX_HEADER_SIZE = 8;", "type": "int", "var_name": "BOX_HEADER_SIZE" }, { "declarator": "TYPE_payl = Util.getIntegerCodeForString(\"payl\...
{ "body": "@Override\n protected Mp4WebvttSubtitle decode(byte[] bytes, int length, boolean reset)\n throws SubtitleDecoderException {\n // Webvtt in Mp4 samples have boxes inside of them, so we have to do a traditional box parsing:\n // first 4 bytes size and then 4 bytes type.\n sampleData.reset(byte...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_307
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n public void initialBitrateEstimateOverwrite_forWifi_whileConnectedToWifi_setsInitialEstimate() {\n setActiveNetworkInfo(networkInfoWifi);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext())\n .setInitialB...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_242
{ "fields": [ { "declarator": "TAG_HEADER = new byte[] {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 0}", "modifier": "private static final", "original_string": "private static final byte[] TAG_HEADER = new byte[] {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 0};", "type": "byte[]", "var_name": "TAG_HEADER"...
{ "body": "@Test\n public void testDecodeTextInformationFrame() {\n byte[] rawId3 = buildSingleFrameTag(\"TIT2\", new byte[] {3, 72, 101, 108, 108, 111, 32, 87, 111,\n 114, 108, 100, 0});\n Id3Decoder decoder = new Id3Decoder();\n Metadata metadata = decoder.decode(rawId3, rawId3.length);\n assert...
{ "fields": [ { "declarator": "NO_FRAMES_PREDICATE =\n (majorVersion, id0, id1, id2, id3) -> false", "modifier": "public static final", "original_string": "public static final FramePredicate NO_FRAMES_PREDICATE =\n (majorVersion, id0, id1, id2, id3) -> false;", "type": "FramePred...
{ "body": "private static @Nullable TextInformationFrame decodeTextInformationFrame(\n ParsableByteArray id3Data, int frameSize, String id) throws UnsupportedEncodingException {\n if (frameSize < 1) {\n // Frame is malformed.\n return null;\n }\n\n int encoding = id3Data.readUnsignedByte();\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_429
{ "fields": [ { "declarator": "CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "private static final", "original_string": "private static final long CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "CONTENT_DURATION_US" }, { "de...
{ "body": "@Test\n public void\n updateQueuedPeriods_withDurationChangeAfterReadingPeriod_handlesChangeAndRemovesPeriodsAfterChangedPeriod() {\n setupTimeline(\n /* initialPositionUs= */ 0,\n /* adGroupTimesUs= */ FIRST_AD_START_TIME_US,\n SECOND_AD_START_TIME_US);\n setAdGroupLoaded(...
{ "fields": [ { "declarator": "MAXIMUM_BUFFER_AHEAD_PERIODS = 100", "modifier": "private static final", "original_string": "private static final int MAXIMUM_BUFFER_AHEAD_PERIODS = 100;", "type": "int", "var_name": "MAXIMUM_BUFFER_AHEAD_PERIODS" }, { "declarator": "perio...
{ "body": "public boolean updateQueuedPeriods(long rendererPositionUs, long maxRendererReadPositionUs) {\n // TODO: Merge this into setTimeline so that the queue gets updated as soon as the new timeline\n // is set, once all cases handled by ExoPlayerImplInternal.handleSourceInfoRefreshed can be\n // handled...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_57
{ "fields": [ { "declarator": "packetPayload", "modifier": "private", "original_string": "private byte[] packetPayload;", "type": "byte[]", "var_name": "packetPayload" }, { "declarator": "payloadReader", "modifier": "private", "original_string": "private Cus...
{ "body": "@Test\n public void testFiveSectionsInTwoPackets() {\n packetPayload[0] = 0; // The first packet includes a pointer_field.\n insertTableSection(1, (byte) 101, 10);\n insertTableSection(14, (byte) 102, 10);\n insertTableSection(27, (byte) 103, 10);\n packetPayload[40] = 0; // The second pack...
{ "fields": [ { "declarator": "SECTION_HEADER_LENGTH = 3", "modifier": "private static final", "original_string": "private static final int SECTION_HEADER_LENGTH = 3;", "type": "int", "var_name": "SECTION_HEADER_LENGTH" }, { "declarator": "DEFAULT_SECTION_BUFFER_LENGTH ...
{ "body": "@Override\n public void consume(ParsableByteArray data, @Flags int flags) {\n boolean payloadUnitStartIndicator = (flags & FLAG_PAYLOAD_UNIT_START_INDICATOR) != 0;\n int payloadStartPosition = C.POSITION_UNSET;\n if (payloadUnitStartIndicator) {\n int payloadStartOffset = data.readUnsignedBy...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_350
{ "fields": [ { "declarator": "mediaSource", "modifier": "private", "original_string": "private ConcatenatingMediaSource mediaSource;", "type": "ConcatenatingMediaSource", "var_name": "mediaSource" }, { "declarator": "testRunner", "modifier": "private", "ori...
{ "body": "@Test\n public void testAtomicTimelineWindowOrder() throws IOException {\n // Release default test runner with non-atomic media source and replace with new test runner.\n testRunner.release();\n ConcatenatingMediaSource mediaSource =\n new ConcatenatingMediaSource(/* isAtomic= */ true, new...
{ "fields": [ { "declarator": "MSG_ADD = 0", "modifier": "private static final", "original_string": "private static final int MSG_ADD = 0;", "type": "int", "var_name": "MSG_ADD" }, { "declarator": "MSG_REMOVE = 1", "modifier": "private static final", "origin...
{ "body": "public final synchronized void addMediaSources(Collection<MediaSource> mediaSources) {\n addPublicMediaSources(\n mediaSourcesPublic.size(),\n mediaSources,\n /* handler= */ null,\n /* onCompletionAction= */ null);\n }", "class_method_signature": "ConcatenatingMediaSource....
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_215
{ "fields": [ { "declarator": "NO_SUBTITLE = \"tx3g/no_subtitle\"", "modifier": "private static final", "original_string": "private static final String NO_SUBTITLE = \"tx3g/no_subtitle\";", "type": "String", "var_name": "NO_SUBTITLE" }, { "declarator": "SAMPLE_JUST_TEXT...
{ "body": "@Test\n public void testInitializationDecodeWithStyl() throws IOException, SubtitleDecoderException {\n byte[] initBytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), INITIALIZATION);\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.singletonList(initBytes));\n ...
{ "fields": [ { "declarator": "BOM_UTF16_BE = '\\uFEFF'", "modifier": "private static final", "original_string": "private static final char BOM_UTF16_BE = '\\uFEFF';", "type": "char", "var_name": "BOM_UTF16_BE" }, { "declarator": "BOM_UTF16_LE = '\\uFFFE'", "modif...
{ "body": "@Override\n protected Subtitle decode(byte[] bytes, int length, boolean reset)\n throws SubtitleDecoderException {\n parsableByteArray.reset(bytes, length);\n String cueTextString = readSubtitleText(parsableByteArray);\n if (cueTextString.isEmpty()) {\n return Tx3gSubtitle.EMPTY;\n }...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_346
{ "fields": [ { "declarator": "mediaSource", "modifier": "private", "original_string": "private ConcatenatingMediaSource mediaSource;", "type": "ConcatenatingMediaSource", "var_name": "mediaSource" }, { "declarator": "testRunner", "modifier": "private", "ori...
{ "body": "@Test\n public void testCustomCallbackAfterPreparationAddMultiple() throws IOException {\n DummyMainThread dummyMainThread = new DummyMainThread();\n try {\n testRunner.prepareSource();\n final TimelineGrabber timelineGrabber = new TimelineGrabber(testRunner);\n dummyMainThread.runOnM...
{ "fields": [ { "declarator": "MSG_ADD = 0", "modifier": "private static final", "original_string": "private static final int MSG_ADD = 0;", "type": "int", "var_name": "MSG_ADD" }, { "declarator": "MSG_REMOVE = 1", "modifier": "private static final", "origin...
{ "body": "public final synchronized void addMediaSources(Collection<MediaSource> mediaSources) {\n addPublicMediaSources(\n mediaSourcesPublic.size(),\n mediaSources,\n /* handler= */ null,\n /* onCompletionAction= */ null);\n }", "class_method_signature": "ConcatenatingMediaSource....
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_487
{ "fields": [ { "declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)", "modifier": "private static final", "original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ...
{ "body": "@Test\n public void testSelectTracksPreferTrackWithinCapabilitiesOverSelectionFlag()\n throws Exception {\n Format exceededWithSelectionFlagFormat =\n Format.createAudioSampleFormat(\n \"exceededFormat\",\n MimeTypes.AUDIO_AAC,\n null,\n Format.NO...
{ "fields": [ { "declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f", "modifier": "private static final", "original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;", "type": "float", "var_name": "FRACTION_TO_CONSIDER_FULLSCREEN" }, { "de...
{ "body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_192
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java", "identifier": "WebvttCueParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseEmptyTagName() throws Exception {\n Spanned text = parseCueText(\"An unclosed u tag with <>italic inside\");\n assertThat(text.toString()).isEqualTo(\"An unclosed u tag with italic inside\");\n }", "class_method_signature": "WebvttCueParserTest.testParseEmptyTagName()...
{ "fields": [ { "declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")", "modifier": "public static final", "original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",...
{ "body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_468
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getBitratesUsingPastInfo_multipleChunkWithSameFormat_returnsAverageBitrate() {\n Format format = createFormatWithBitrate(10);\n FakeMediaChunk chunk =\n createChunk(format, /* length= */ 10, /* startTimeSec= */ 0, /* endTimeSec= */ 10);\n FakeMediaChunk chunk2 =\n ...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_16
{ "fields": [ { "declarator": "OGG_EXTRACTOR_FACTORY = OggExtractor::new", "modifier": "private static final", "original_string": "private static final ExtractorFactory OGG_EXTRACTOR_FACTORY = OggExtractor::new;", "type": "ExtractorFactory", "var_name": "OGG_EXTRACTOR_FACTORY" } ...
{ "body": "@Test\n public void testSniffFlac() throws Exception {\n byte[] data =\n TestUtil.joinByteArrays(\n OggTestData.buildOggHeader(0x02, 0, 1000, 1),\n TestUtil.createByteArray(5), // Laces\n new byte[] {0x7F, 'F', 'L', 'A', 'C'});\n assertThat(sniff(data)).isTrue...
{ "fields": [ { "declarator": "FACTORY = () -> new Extractor[] {new OggExtractor()}", "modifier": "public static final", "original_string": "public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new OggExtractor()};", "type": "ExtractorsFactory", "var_name": "FACTORY...
{ "body": "@Override\n public boolean sniff(ExtractorInput input) throws IOException, InterruptedException {\n try {\n return sniffInternal(input);\n } catch (ParserException e) {\n return false;\n }\n }", "class_method_signature": "OggExtractor.sniff(ExtractorInput input)", "constructor": fa...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_311
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n public void initialBitrateEstimateOverwrite_for2G_whileConnectedTo2G_setsInitialEstimate() {\n setActiveNetworkInfo(networkInfo2g);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext())\n .setInitialBitrate...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_254
{ "fields": [ { "declarator": "schemeDataDataSource", "modifier": "private", "original_string": "private DataSource schemeDataDataSource;", "type": "DataSource", "var_name": "schemeDataDataSource" } ], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/upst...
{ "body": "@Test\n public void testIncorrectScheme() {\n try {\n schemeDataDataSource.open(buildDataSpec(\"http://www.google.com\"));\n fail();\n } catch (IOException e) {\n // Expected.\n }\n }", "class_method_signature": "DataSchemeDataSourceTest.testIncorrectScheme()", "constructor": ...
{ "fields": [ { "declarator": "SCHEME_DATA = \"data\"", "modifier": "public static final", "original_string": "public static final String SCHEME_DATA = \"data\";", "type": "String", "var_name": "SCHEME_DATA" }, { "declarator": "dataSpec", "modifier": "private @Nul...
{ "body": "@Override\n public long open(DataSpec dataSpec) throws IOException {\n transferInitializing(dataSpec);\n this.dataSpec = dataSpec;\n Uri uri = dataSpec.uri;\n String scheme = uri.getScheme();\n if (!SCHEME_DATA.equals(scheme)) {\n throw new ParserException(\"Unsupported scheme: \" + sc...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_413
{ "fields": [ { "declarator": "EMPTY_NAME = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_NAME = \"\";", "type": "String", "var_name": "EMPTY_NAME" }, { "declarator": "databaseProvider", "modifier": "private", ...
{ "body": "@Test\n public void getDownloads_emptyDownloadIndex_returnsEmptyArray() throws DatabaseIOException {\n assertThat(downloadIndex.getDownloads().getCount()).isEqualTo(0);\n }", "class_method_signature": "DefaultDownloadIndexTest.getDownloads_emptyDownloadIndex_returnsEmptyArray()", "constructor": fa...
{ "fields": [ { "declarator": "TABLE_PREFIX = DatabaseProvider.TABLE_PREFIX + \"Downloads\"", "modifier": "private static final", "original_string": "private static final String TABLE_PREFIX = DatabaseProvider.TABLE_PREFIX + \"Downloads\";", "type": "String", "var_name": "TABLE_PREFI...
{ "body": "@Override\n public DownloadCursor getDownloads(@Download.State int... states) throws DatabaseIOException {\n ensureInitialized();\n Cursor cursor = getCursor(getStateQuery(states), /* selectionArgs= */ null);\n return new DownloadCursorImpl(cursor);\n }", "class_method_signature": "DefaultDown...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_106
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UriUtilTest.java", "identifier": "UriUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void removeOnlyQueryParameter() {\n Uri uri = Uri.parse(\"http://uri?query=value\");\n assertThat(removeQueryParameter(uri, \"query\").toString()).isEqualTo(\"http://uri\");\n }", "class_method_signature": "UriUtilTest.removeOnlyQueryParameter()", "constructor": false, "full_si...
{ "fields": [ { "declarator": "INDEX_COUNT = 4", "modifier": "private static final", "original_string": "private static final int INDEX_COUNT = 4;", "type": "int", "var_name": "INDEX_COUNT" }, { "declarator": "SCHEME_COLON = 0", "modifier": "private static final",...
{ "body": "public static Uri removeQueryParameter(Uri uri, String queryParameterName) {\n Uri.Builder builder = uri.buildUpon();\n builder.clearQuery();\n for (String key : uri.getQueryParameterNames()) {\n if (!key.equals(queryParameterName)) {\n for (String value : uri.getQueryParameters(key)) ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_385
{ "fields": [ { "declarator": "ALLOCATION_SIZE = 16", "modifier": "private static final", "original_string": "private static final int ALLOCATION_SIZE = 16;", "type": "int", "var_name": "ALLOCATION_SIZE" }, { "declarator": "FORMAT_1 = Format.createSampleFormat(\"1\", \"...
{ "body": "@Test\n public void testSetSampleOffset() {\n long sampleOffsetUs = 1000;\n sampleQueue.setSampleOffsetUs(sampleOffsetUs);\n writeTestData();\n assertReadTestData(null, 0, 8, sampleOffsetUs);\n assertReadEndOfStream(false);\n }", "class_method_signature": "SampleQueueTest.testSetSampleOf...
{ "fields": [ { "declarator": "ADVANCE_FAILED = -1", "modifier": "public static final", "original_string": "public static final int ADVANCE_FAILED = -1;", "type": "int", "var_name": "ADVANCE_FAILED" }, { "declarator": "INITIAL_SCRATCH_SIZE = 32", "modifier": "priv...
{ "body": "public void setSampleOffsetUs(long sampleOffsetUs) {\n if (this.sampleOffsetUs != sampleOffsetUs) {\n this.sampleOffsetUs = sampleOffsetUs;\n pendingFormatAdjustment = true;\n }\n }", "class_method_signature": "SampleQueue.setSampleOffsetUs(long sampleOffsetUs)", "constructor": false, ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_82
{ "fields": [ { "declarator": "TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0x5F, (byte) 0x01,\n (byte) 0xFF, (byte) 0x14, (byte) 0x60, (byte) 0x99}", "modifier": "private static final", "original_string": "private static final byte[] TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0...
{ "body": "@Test\n public void testRead32BitsByteAligned() {\n assertThat(testArray.readBits(32)).isEqualTo(getTestDataBits(0, 32));\n assertThat(testArray.readBits(32)).isEqualTo(getTestDataBits(32, 32));\n }", "class_method_signature": "ParsableBitArrayTest.testRead32BitsByteAligned()", "constructor": f...
{ "fields": [ { "declarator": "data", "modifier": "public", "original_string": "public byte[] data;", "type": "byte[]", "var_name": "data" }, { "declarator": "byteOffset", "modifier": "private", "original_string": "private int byteOffset;", "type": "in...
{ "body": "public int readBits(int numBits) {\n if (numBits == 0) {\n return 0;\n }\n int returnValue = 0;\n bitOffset += numBits;\n while (bitOffset > 8) {\n bitOffset -= 8;\n returnValue |= (data[byteOffset++] & 0xFF) << bitOffset;\n }\n returnValue |= (data[byteOffset] & 0xFF) >...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_444
{ "fields": [ { "declarator": "DATA_1 = new SchemeData(WIDEVINE_UUID, VIDEO_MP4,\n TestUtil.buildTestData(128, 1 /* data seed */))", "modifier": "private static final", "original_string": "private static final SchemeData DATA_1 = new SchemeData(WIDEVINE_UUID, VIDEO_MP4,\n TestUtil.buil...
{ "body": "@Test\n public void testEquals() {\n DrmInitData drmInitData = new DrmInitData(DATA_1, DATA_2);\n\n // Basic non-referential equality test.\n DrmInitData testInitData = new DrmInitData(DATA_1, DATA_2);\n assertThat(testInitData).isEqualTo(drmInitData);\n assertThat(testInitData.hashCode())....
{ "fields": [ { "declarator": "schemeDatas", "modifier": "private final", "original_string": "private final SchemeData[] schemeDatas;", "type": "SchemeData[]", "var_name": "schemeDatas" }, { "declarator": "hashCode", "modifier": "private", "original_string":...
{ "body": "@Override\n public boolean equals(@Nullable Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n DrmInitData other = (DrmInitData) obj;\n return Util.areEqual(schemeType, other.schemeType)\n && A...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_2
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/ogg/VorbisUtilTest.java", "identifier": "VorbisUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReadCommentHeader() throws ParserException {\n byte[] data = OggTestData.getCommentHeaderDataUTF8();\n ParsableByteArray headerData = new ParsableByteArray(data, data.length);\n VorbisUtil.CommentHeader commentHeader = VorbisUtil.readVorbisCommentHeader(headerData);\n\n ...
{ "fields": [ { "declarator": "TAG = \"VorbisUtil\"", "modifier": "private static final", "original_string": "private static final String TAG = \"VorbisUtil\";", "type": "String", "var_name": "TAG" } ], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/ext...
{ "body": "public static CommentHeader readVorbisCommentHeader(ParsableByteArray headerData)\n throws ParserException {\n\n verifyVorbisHeaderCapturePattern(0x03, headerData, false);\n int length = 7;\n\n int len = (int) headerData.readLittleEndianUnsignedInt();\n length += 4;\n String vendor = he...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_278
{ "fields": [ { "declarator": "KEY_1 = \"key1\"", "modifier": "private static final", "original_string": "private static final String KEY_1 = \"key1\";", "type": "String", "var_name": "KEY_1" }, { "declarator": "KEY_2 = \"key2\"", "modifier": "private static final...
{ "body": "@Test\n public void testGetCachedLength() throws Exception {\n SimpleCache simpleCache = getSimpleCache();\n CacheSpan cacheSpan = simpleCache.startReadWrite(KEY_1, 0);\n\n // No cached bytes, returns -'length'\n assertThat(simpleCache.getCachedLength(KEY_1, 0, 100)).isEqualTo(-100);\n\n //...
{ "fields": [ { "declarator": "TAG = \"SimpleCache\"", "modifier": "private static final", "original_string": "private static final String TAG = \"SimpleCache\";", "type": "String", "var_name": "TAG" }, { "declarator": "SUBDIRECTORY_COUNT = 10", "modifier": "priva...
{ "body": "@Override\n public synchronized long getCachedLength(String key, long position, long length) {\n Assertions.checkState(!released);\n CachedContent cachedContent = contentIndex.get(key);\n return cachedContent != null ? cachedContent.getCachedBytesLength(position, length) : -length;\n }", "clas...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_297
{ "fields": [ { "declarator": "SIMULATED_TRANSFER_COUNT = 100", "modifier": "private static final", "original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;", "type": "int", "var_name": "SIMULATED_TRANSFER_COUNT" }, { "declarator": "FAST_COUNTRY_ISO ...
{ "body": "@Test\n public void defaultInitialBitrateEstimate_for4G_isGreaterThanEstimateFor3G() {\n setActiveNetworkInfo(networkInfo4g);\n DefaultBandwidthMeter bandwidthMeter4g =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()).build();\n long initialEstimate4g = band...
{ "fields": [ { "declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()", "modifier": "public static final", "original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG...
{ "body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }", "class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()", "constructor": false, "full_signature": "@Override public synchronized long getBitrateEstimate()", "identifier": "getBitrateEstima...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_452
{ "fields": [ { "declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND", "modifier": "public static final", "original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;", "type": "long", "var_name": "MAX_DURATION_US" } ], "file": "videoplayer-co...
{ "body": "@Test\n public void getAverageBitrate_secondChunkLengthUnset_returnsFirstChunkBitrate() {\n long[] chunkTimeBoundariesSec = {0, 5, 15, 30};\n long[] chunkLengths = {10, C.LENGTH_UNSET, 30};\n\n FakeMediaChunkIterator iterator =\n new FakeMediaChunkIterator(chunkTimeBoundariesSec, chunkLeng...
{ "fields": [], "file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java", "identifier": "TrackSelectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()", "constructor": true, "f...
{ "body": "public static int getAverageBitrate(MediaChunkIterator iterator, long maxDurationUs) {\n long totalDurationUs = 0;\n long totalLength = 0;\n while (iterator.next()) {\n long chunkLength = iterator.getDataSpec().length;\n if (chunkLength == C.LENGTH_UNSET) {\n break;\n }\n ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_405
{ "fields": [ { "declarator": "ASSERT_TRUE_TIMEOUT = 10000", "modifier": "private static final", "original_string": "private static final int ASSERT_TRUE_TIMEOUT = 10000;", "type": "int", "var_name": "ASSERT_TRUE_TIMEOUT" }, { "declarator": "ASSERT_FALSE_TIME = 1000", ...
{ "body": "@Test\n public void mergeRequest_failed_becomesQueued() {\n DownloadRequest downloadRequest = createDownloadRequest();\n DownloadBuilder downloadBuilder =\n new DownloadBuilder(downloadRequest)\n .setState(Download.STATE_FAILED)\n .setFailureReason(Download.FAILURE_REASO...
{ "fields": [ { "declarator": "DEFAULT_MAX_PARALLEL_DOWNLOADS = 3", "modifier": "public static final", "original_string": "public static final int DEFAULT_MAX_PARALLEL_DOWNLOADS = 3;", "type": "int", "var_name": "DEFAULT_MAX_PARALLEL_DOWNLOADS" }, { "declarator": "DEFAU...
{ "body": "static Download mergeRequest(\n Download download, DownloadRequest request, int stopReason, long nowMs) {\n @Download.State int state = download.state;\n // Treat the merge as creating a new download if we're currently removing the existing one, or\n // if the existing download is in a termin...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }
133447770_110
{ "fields": [], "file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UriUtilTest.java", "identifier": "UriUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void removeNonExistentQueryParameter() {\n Uri uri = Uri.parse(\"http://uri\");\n assertThat(removeQueryParameter(uri, \"foo\").toString()).isEqualTo(\"http://uri\");\n uri = Uri.parse(\"http://uri?query=value\");\n assertThat(removeQueryParameter(uri, \"foo\").toString()).isEqu...
{ "fields": [ { "declarator": "INDEX_COUNT = 4", "modifier": "private static final", "original_string": "private static final int INDEX_COUNT = 4;", "type": "int", "var_name": "INDEX_COUNT" }, { "declarator": "SCHEME_COLON = 0", "modifier": "private static final",...
{ "body": "public static Uri removeQueryParameter(Uri uri, String queryParameterName) {\n Uri.Builder builder = uri.buildUpon();\n builder.clearQuery();\n for (String key : uri.getQueryParameterNames()) {\n if (!key.equals(queryParameterName)) {\n for (String value : uri.getQueryParameters(key)) ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 133447770, "size": 39077, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/ybj366533/YY-VideoPlayer" }