id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
3040093_0 | {
"fields": [],
"file": "generic.sesam/search-command-control/default/src/test/java/no/sesat/search/mode/command/PicSearchCommandTest.java",
"identifier": "PicSearchCommandTest",
"interfaces": "",
"superclass": "extends AbstractSearchCommandTest"
} | {
"body": "@Test\n public void testSiteRestriction() throws Exception{\n\n assertEquals(\n \"Site filter not found\",\n \"aftonbladet.se\",\n executeTestOfQuery(\"site:aftonbladet.se banan\", \"banan\", \"+site:aftonbladet.se\")\n .getFilterBuilder().getFilter(\"site\"));\n\n assertEquals(\n \"Site filter not found\",\n \"aftonbladet.se\",\n executeTestOfQuery(\"banan site:aftonbladet.se\", \"banan\", \"+site:aftonbladet.se\")\n .getFilterBuilder().getFilter(\"site\"));\n\n }",
"class_method_signature": "PicSearchCommandTest.testSiteRestriction()",
"constructor": false,
"full_signature": "@Test public void testSiteRestriction()",
"identifier": "testSiteRestriction",
"invocations": [
"assertEquals",
"getFilter",
"getFilterBuilder",
"executeTestOfQuery",
"assertEquals",
"getFilter",
"getFilterBuilder",
"executeTestOfQuery"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testSiteRestriction()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOG = Logger.getLogger(PicSearchCommand.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = Logger.getLogger(PicSearchCommand.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "REQ_URL_FMT = \"/query?ie=UTF-8&tldb={0}&filter={1}&custid={2}&version=2.6\"\n + \"&thumbs={3}&q={4}&start={5}&site={6}&color={7}&size={8}\"",
"modifier": "private static final",
"original_string": "private static final String REQ_URL_FMT = \"/query?ie=UTF-8&tldb={0}&filter={1}&custid={2}&version=2.6\"\n + \"&thumbs={3}&q={4}&start={5}&site={6}&color={7}&size={8}\";",
"type": "String",
"var_name": "REQ_URL_FMT"
},
{
"declarator": "port",
"modifier": "private final",
"original_string": "private final int port;",
"type": "int",
"var_name": "port"
}
],
"file": "generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/PicSearchCommand.java",
"identifier": "PicSearchCommand",
"interfaces": "",
"methods": [
{
"class_method_signature": "PicSearchCommand.PicSearchCommand(final Context cxt)",
"constructor": true,
"full_signature": "public PicSearchCommand(final Context cxt)",
"identifier": "PicSearchCommand",
"modifiers": "public",
"parameters": "(final Context cxt)",
"return": "",
"signature": " PicSearchCommand(final Context cxt)",
"testcase": false
},
{
"class_method_signature": "PicSearchCommand.execute()",
"constructor": false,
"full_signature": "public ResultList<ResultItem> execute()",
"identifier": "execute",
"modifiers": "public",
"parameters": "()",
"return": "ResultList<ResultItem>",
"signature": "ResultList<ResultItem> execute()",
"testcase": false
},
{
"class_method_signature": "PicSearchCommand.visitXorClause(final Visitor visitor, final XorClause clause)",
"constructor": false,
"full_signature": "@Override protected void visitXorClause(final Visitor visitor, final XorClause clause)",
"identifier": "visitXorClause",
"modifiers": "@Override protected",
"parameters": "(final Visitor visitor, final XorClause clause)",
"return": "void",
"signature": "void visitXorClause(final Visitor visitor, final XorClause clause)",
"testcase": false
},
{
"class_method_signature": "PicSearchCommand.createItem(final Element picture)",
"constructor": false,
"full_signature": "@Override protected ResultItem createItem(final Element picture)",
"identifier": "createItem",
"modifiers": "@Override protected",
"parameters": "(final Element picture)",
"return": "ResultItem",
"signature": "ResultItem createItem(final Element picture)",
"testcase": false
},
{
"class_method_signature": "PicSearchCommand.getParameter(final String key)",
"constructor": false,
"full_signature": "@Override protected String getParameter(final String key)",
"identifier": "getParameter",
"modifiers": "@Override protected",
"parameters": "(final String key)",
"return": "String",
"signature": "String getParameter(final String key)",
"testcase": false
},
{
"class_method_signature": "PicSearchCommand.getFilterBuilder()",
"constructor": false,
"full_signature": "@Override protected FilterBuilder getFilterBuilder()",
"identifier": "getFilterBuilder",
"modifiers": "@Override protected",
"parameters": "()",
"return": "FilterBuilder",
"signature": "FilterBuilder getFilterBuilder()",
"testcase": false
},
{
"class_method_signature": "PicSearchCommand.getOffset()",
"constructor": false,
"full_signature": "@Override protected int getOffset()",
"identifier": "getOffset",
"modifiers": "@Override protected",
"parameters": "()",
"return": "int",
"signature": "int getOffset()",
"testcase": false
}
],
"superclass": "extends AbstractXmlSearchCommand"
} | {
"body": "@Override\n protected FilterBuilder getFilterBuilder(){\n return super.getFilterBuilder();\n }",
"class_method_signature": "PicSearchCommand.getFilterBuilder()",
"constructor": false,
"full_signature": "@Override protected FilterBuilder getFilterBuilder()",
"identifier": "getFilterBuilder",
"invocations": [
"getFilterBuilder"
],
"modifiers": "@Override protected",
"parameters": "()",
"return": "FilterBuilder",
"signature": "FilterBuilder getFilterBuilder()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3040093,
"size": 17994,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/michaelsembwever/Possom"
} |
3040093_12 | {
"fields": [],
"file": "result-spi/src/test/java/no/sesat/search/result/StringChopperTest.java",
"identifier": "StringChopperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void Comments() {\n assertEquals(\"<!-- ups--><b>and<![CDATA[ <xml>&& ...]]></b>\", StringChopper.chop(\"<!-- ups--><b>and<![CDATA[ <xml>&& fisk]]> <br/>wonk\", 14, false));\n assertEquals(\"<b>and<!-- ups--><![CDATA[ <xm]]></b>\", StringChopper.chop(\"<b>and<!-- ups--><![CDATA[ <xml>&& fisk]]><!-- ups--> <br/>wonk<!-- ups-->\", 7, true));\n assertEquals(\"<b>and<!-- ups--><![CDATA[ <xml>&& fisk]]> <br/>wonk</b>\", StringChopper.chop(\"<b>and<!-- ups--><![CDATA[ <xml>&& fisk]]> <br/>wonk\", -1, true));\n assertEquals(\"<b>a<!-- ups-->nd</b>\", StringChopper.chop(\"<b>a<!-- ups-->nd\", -1, true));\n assertEquals(\"fi<!-- ups-->s<!-- ups-->k<b>an<!-- ups-->d<!-- ups--></b>\", StringChopper.chop(\"fi<!-- ups-->s<!-- ups-->k<b>an<!-- ups-->d<!-- ups-->\", -1, true));\n }",
"class_method_signature": "StringChopperTest.Comments()",
"constructor": false,
"full_signature": "@Test public void Comments()",
"identifier": "Comments",
"invocations": [
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void Comments()",
"testcase": true
} | {
"fields": [],
"file": "result-spi/src/main/java/no/sesat/search/result/StringChopper.java",
"identifier": "StringChopper",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
},
{
"class_method_signature": "StringChopper.chop(final String input, final int length, final boolean chop)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length, final boolean chop)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length, final boolean chop)",
"return": "String",
"signature": "String chop(final String input, final int length, final boolean chop)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String chop(final String input, final int length) {\n return chop(input, length, false);\n }",
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"invocations": [
"chop"
],
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3040093,
"size": 17994,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/michaelsembwever/Possom"
} |
3040093_15 | {
"fields": [],
"file": "result-spi/src/test/java/no/sesat/search/result/StringChopperTest.java",
"identifier": "StringChopperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void Haavard() {\n assertEquals(\"<div>wonk</div>...\",\n StringChopper.chop(\"<div>wonk</div>tonk</div>\", 5, false));\n }",
"class_method_signature": "StringChopperTest.Haavard()",
"constructor": false,
"full_signature": "@Test public void Haavard()",
"identifier": "Haavard",
"invocations": [
"assertEquals",
"chop"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void Haavard()",
"testcase": true
} | {
"fields": [],
"file": "result-spi/src/main/java/no/sesat/search/result/StringChopper.java",
"identifier": "StringChopper",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
},
{
"class_method_signature": "StringChopper.chop(final String input, final int length, final boolean chop)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length, final boolean chop)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length, final boolean chop)",
"return": "String",
"signature": "String chop(final String input, final int length, final boolean chop)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String chop(final String input, final int length) {\n return chop(input, length, false);\n }",
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"invocations": [
"chop"
],
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3040093,
"size": 17994,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/michaelsembwever/Possom"
} |
3040093_7 | {
"fields": [],
"file": "result-spi/src/test/java/no/sesat/search/result/StringChopperTest.java",
"identifier": "StringChopperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void SimpleChopWholeWord() {\n assertEquals(\"<b>a...</b>\", StringChopper.chop(\"<b>and</b><br/>fisk\", 1, false));\n assertEquals(\"<b>an...</b>\", StringChopper.chop(\"<b>and</b><br/>fisk\", 2, false));\n assertEquals(\"<b>and...</b>\", StringChopper.chop(\"<b>and</b><br/>fisk\", 3, false));\n assertEquals(\"<b>and</b><br/>...\", StringChopper.chop(\"<b>and</b><br/>fisk\", 4, false));\n assertEquals(\"<b>and</b><br/>...\", StringChopper.chop(\"<b>and</b><br/>fisk\", 5, false));\n assertEquals(\"<b>and</b><br/>...\", StringChopper.chop(\"<b>and</b><br/>fisk\", 6, false));\n assertEquals(\"<b>and</b><br/>fisk\", StringChopper.chop(\"<b>and</b><br/>fisk\", 7, false));\n assertEquals(\"<b>and</b><br/>fisk\", StringChopper.chop(\"<b>and</b><br/>fisk\", 8, false));\n assertEquals(\"<b>and</b><br/>fisk\", StringChopper.chop(\"<b>and</b><br/>fisk\", 9, false));\n }",
"class_method_signature": "StringChopperTest.SimpleChopWholeWord()",
"constructor": false,
"full_signature": "@Test public void SimpleChopWholeWord()",
"identifier": "SimpleChopWholeWord",
"invocations": [
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void SimpleChopWholeWord()",
"testcase": true
} | {
"fields": [],
"file": "result-spi/src/main/java/no/sesat/search/result/StringChopper.java",
"identifier": "StringChopper",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
},
{
"class_method_signature": "StringChopper.chop(final String input, final int length, final boolean chop)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length, final boolean chop)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length, final boolean chop)",
"return": "String",
"signature": "String chop(final String input, final int length, final boolean chop)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String chop(final String input, final int length) {\n return chop(input, length, false);\n }",
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"invocations": [
"chop"
],
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3040093,
"size": 17994,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/michaelsembwever/Possom"
} |
3040093_6 | {
"fields": [],
"file": "result-spi/src/test/java/no/sesat/search/result/StringChopperTest.java",
"identifier": "StringChopperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void SimpleChop() {\n assertEquals(\"<b>a</b>\", StringChopper.chop(\"<b>and</b><br/>fisk\", 1, true));\n assertEquals(\"<b>an</b>\", StringChopper.chop(\"<b>and</b><br/>fisk\", 2, true));\n assertEquals(\"<b>and</b>\", StringChopper.chop(\"<b>and</b><br/>fisk\", 3, true));\n assertEquals(\"<b>and</b><br/>f\", StringChopper.chop(\"<b>and</b><br/>fisk\", 4, true));\n assertEquals(\"<b>and</b><br/>fi\", StringChopper.chop(\"<b>and</b><br/>fisk\", 5, true));\n assertEquals(\"<b>and</b><br/>fis\", StringChopper.chop(\"<b>and</b><br/>fisk\", 6, true));\n assertEquals(\"<b>and</b><br/>fisk\", StringChopper.chop(\"<b>and</b><br/>fisk\", 7, true));\n assertEquals(\"<b>and</b><br/>fisk\", StringChopper.chop(\"<b>and</b><br/>fisk\", 8, true));\n assertEquals(\"<b>and</b><br/>fisk\", StringChopper.chop(\"<b>and</b><br/>fisk\", 1000, true));\n }",
"class_method_signature": "StringChopperTest.SimpleChop()",
"constructor": false,
"full_signature": "@Test public void SimpleChop()",
"identifier": "SimpleChop",
"invocations": [
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void SimpleChop()",
"testcase": true
} | {
"fields": [],
"file": "result-spi/src/main/java/no/sesat/search/result/StringChopper.java",
"identifier": "StringChopper",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
},
{
"class_method_signature": "StringChopper.chop(final String input, final int length, final boolean chop)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length, final boolean chop)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length, final boolean chop)",
"return": "String",
"signature": "String chop(final String input, final int length, final boolean chop)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String chop(final String input, final int length) {\n return chop(input, length, false);\n }",
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"invocations": [
"chop"
],
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3040093,
"size": 17994,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/michaelsembwever/Possom"
} |
3040093_14 | {
"fields": [],
"file": "result-spi/src/test/java/no/sesat/search/result/StringChopperTest.java",
"identifier": "StringChopperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void Morten() {\n assertEquals(\"<attrib name=\\\"allowed_types\\\" type=\\\"list-string\\\"><member> text/html </member><member> text/plain </member></attrib>\",\n StringChopper.chop(\"<attrib name=\\\"allowed_types\\\" type=\\\"list-string\\\"><member> text/html </member><member> text/plain </member>\", -1, false));\n assertEquals(\"<attrib name=\\\"allowed_types\\\" value=\\\"morten er kool\\\"/>\",\n StringChopper.chop(\"<attrib name=\\\"allowed_types\\\" value=\\\"morten er kool\\\"/>\", -1, false));\n assertEquals(\"<attrib name=\\\"allowed_types\\\"> fisk</attrib>\",\n StringChopper.chop(\"<attrib name=\\\"allowed_types\\\"> fisk\", -1, false));\n }",
"class_method_signature": "StringChopperTest.Morten()",
"constructor": false,
"full_signature": "@Test public void Morten()",
"identifier": "Morten",
"invocations": [
"assertEquals",
"chop",
"assertEquals",
"chop",
"assertEquals",
"chop"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void Morten()",
"testcase": true
} | {
"fields": [],
"file": "result-spi/src/main/java/no/sesat/search/result/StringChopper.java",
"identifier": "StringChopper",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
},
{
"class_method_signature": "StringChopper.chop(final String input, final int length, final boolean chop)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length, final boolean chop)",
"identifier": "chop",
"modifiers": "public static",
"parameters": "(final String input, final int length, final boolean chop)",
"return": "String",
"signature": "String chop(final String input, final int length, final boolean chop)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String chop(final String input, final int length) {\n return chop(input, length, false);\n }",
"class_method_signature": "StringChopper.chop(final String input, final int length)",
"constructor": false,
"full_signature": "public static String chop(final String input, final int length)",
"identifier": "chop",
"invocations": [
"chop"
],
"modifiers": "public static",
"parameters": "(final String input, final int length)",
"return": "String",
"signature": "String chop(final String input, final int length)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3040093,
"size": 17994,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/michaelsembwever/Possom"
} |
56670_0 | {
"fields": [
{
"declarator": "scanner",
"modifier": "private",
"original_string": "private ClasspathScanner scanner;",
"type": "ClasspathScanner",
"var_name": "scanner"
}
],
"file": "etc/future/scanner/ClasspathScannerTest.java",
"identifier": "ClasspathScannerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getPackage() {\n scanner = new ClasspathScanner(\"org.hibernate.*\");\n assertEquals(\"Package was sanitized\", \"org/hibernate\", scanner.getPackage());\n }",
"class_method_signature": "ClasspathScannerTest.getPackage()",
"constructor": false,
"full_signature": "@Test public void getPackage()",
"identifier": "getPackage",
"invocations": [
"assertEquals",
"getPackage"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void getPackage()",
"testcase": true
} | {
"fields": [
{
"declarator": "pkg",
"modifier": "private",
"original_string": "private String pkg;",
"type": "String",
"var_name": "pkg"
},
{
"declarator": "recur = false",
"modifier": "private",
"original_string": "private boolean recur = false;",
"type": "boolean",
"var_name": "recur"
}
],
"file": "etc/future/scanner/ClasspathScanner.java",
"identifier": "ClasspathScanner",
"interfaces": "",
"methods": [
{
"class_method_signature": "ClasspathScanner.getPackage()",
"constructor": false,
"full_signature": "protected String getPackage()",
"identifier": "getPackage",
"modifiers": "protected",
"parameters": "()",
"return": "String",
"signature": "String getPackage()",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.ClasspathScanner(String pkg, boolean subpackages)",
"constructor": true,
"full_signature": "public ClasspathScanner(String pkg, boolean subpackages)",
"identifier": "ClasspathScanner",
"modifiers": "public",
"parameters": "(String pkg, boolean subpackages)",
"return": "",
"signature": " ClasspathScanner(String pkg, boolean subpackages)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.ClasspathScanner(String pkg)",
"constructor": true,
"full_signature": "public ClasspathScanner(String pkg)",
"identifier": "ClasspathScanner",
"modifiers": "public",
"parameters": "(String pkg)",
"return": "",
"signature": " ClasspathScanner(String pkg)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.sanitizePackage(String pkgName)",
"constructor": false,
"full_signature": "private void sanitizePackage(String pkgName)",
"identifier": "sanitizePackage",
"modifiers": "private",
"parameters": "(String pkgName)",
"return": "void",
"signature": "void sanitizePackage(String pkgName)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.getClassLoader()",
"constructor": false,
"full_signature": "protected ClassLoader getClassLoader()",
"identifier": "getClassLoader",
"modifiers": "protected",
"parameters": "()",
"return": "ClassLoader",
"signature": "ClassLoader getClassLoader()",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.isJARPath(String path)",
"constructor": false,
"full_signature": "protected boolean isJARPath(String path)",
"identifier": "isJARPath",
"modifiers": "protected",
"parameters": "(String path)",
"return": "boolean",
"signature": "boolean isJARPath(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.add(Set<String> classes, String className)",
"constructor": false,
"full_signature": "protected void add(Set<String> classes, String className)",
"identifier": "add",
"modifiers": "protected",
"parameters": "(Set<String> classes, String className)",
"return": "void",
"signature": "void add(Set<String> classes, String className)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.getClassesFromJAR(String path)",
"constructor": false,
"full_signature": "protected Set<String> getClassesFromJAR(String path)",
"identifier": "getClassesFromJAR",
"modifiers": "protected",
"parameters": "(String path)",
"return": "Set<String>",
"signature": "Set<String> getClassesFromJAR(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.getClassesFromDirectory(String path)",
"constructor": false,
"full_signature": "protected Set<String> getClassesFromDirectory(String path)",
"identifier": "getClassesFromDirectory",
"modifiers": "protected",
"parameters": "(String path)",
"return": "Set<String>",
"signature": "Set<String> getClassesFromDirectory(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.sanitizeURLForWindows(String path)",
"constructor": false,
"full_signature": "protected String sanitizeURLForWindows(String path)",
"identifier": "sanitizeURLForWindows",
"modifiers": "protected",
"parameters": "(String path)",
"return": "String",
"signature": "String sanitizeURLForWindows(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.sanitizeURL(String path)",
"constructor": false,
"full_signature": "protected String sanitizeURL(String path)",
"identifier": "sanitizeURL",
"modifiers": "protected",
"parameters": "(String path)",
"return": "String",
"signature": "String sanitizeURL(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.getClasses()",
"constructor": false,
"full_signature": "public Set<String> getClasses()",
"identifier": "getClasses",
"modifiers": "public",
"parameters": "()",
"return": "Set<String>",
"signature": "Set<String> getClasses()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "protected String getPackage() {\n return pkg;\n }",
"class_method_signature": "ClasspathScanner.getPackage()",
"constructor": false,
"full_signature": "protected String getPackage()",
"identifier": "getPackage",
"invocations": [],
"modifiers": "protected",
"parameters": "()",
"return": "String",
"signature": "String getPackage()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 15,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 56670,
"size": 98082,
"stargazer_count": 23,
"stars": null,
"updates": null,
"url": "https://github.com/burris/dwr"
} |
56670_1 | {
"fields": [
{
"declarator": "scanner",
"modifier": "private",
"original_string": "private ClasspathScanner scanner;",
"type": "ClasspathScanner",
"var_name": "scanner"
}
],
"file": "etc/future/scanner/ClasspathScannerTest.java",
"identifier": "ClasspathScannerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void getClasses() throws IOException {\n scanner = new ClasspathScanner(\"org.hibernate.annotations.common.*\");\n Set<String> classes = scanner.getClasses();\n assertTrue(classes.size() == 2);\n assertTrue(classes.contains(\"org.hibernate.annotations.common.AssertionFailure\"));\n assertTrue(classes.contains(\"org.hibernate.annotations.common.TestDirectoryScan\"));\n scanner = new ClasspathScanner(\"org.hibernate.annotations.common.*\", true);\n classes = scanner.getClasses();\n assertTrue(classes.size() == 61);\n assertTrue(classes.contains(\"org.hibernate.annotations.common.other.another.AnotherTestDirectoryScan\"));\n scanner = new ClasspathScanner(\"x.y.z\", true);\n assertTrue(scanner.getClasses().size() == 0);\n scanner = new ClasspathScanner(\"\");\n }",
"class_method_signature": "ClasspathScannerTest.getClasses()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.class) public void getClasses()",
"identifier": "getClasses",
"invocations": [
"getClasses",
"assertTrue",
"size",
"assertTrue",
"contains",
"assertTrue",
"contains",
"getClasses",
"assertTrue",
"size",
"assertTrue",
"contains",
"assertTrue",
"size",
"getClasses"
],
"modifiers": "@Test(expected = IllegalArgumentException.class) public",
"parameters": "()",
"return": "void",
"signature": "void getClasses()",
"testcase": true
} | {
"fields": [
{
"declarator": "pkg",
"modifier": "private",
"original_string": "private String pkg;",
"type": "String",
"var_name": "pkg"
},
{
"declarator": "recur = false",
"modifier": "private",
"original_string": "private boolean recur = false;",
"type": "boolean",
"var_name": "recur"
}
],
"file": "etc/future/scanner/ClasspathScanner.java",
"identifier": "ClasspathScanner",
"interfaces": "",
"methods": [
{
"class_method_signature": "ClasspathScanner.getPackage()",
"constructor": false,
"full_signature": "protected String getPackage()",
"identifier": "getPackage",
"modifiers": "protected",
"parameters": "()",
"return": "String",
"signature": "String getPackage()",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.ClasspathScanner(String pkg, boolean subpackages)",
"constructor": true,
"full_signature": "public ClasspathScanner(String pkg, boolean subpackages)",
"identifier": "ClasspathScanner",
"modifiers": "public",
"parameters": "(String pkg, boolean subpackages)",
"return": "",
"signature": " ClasspathScanner(String pkg, boolean subpackages)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.ClasspathScanner(String pkg)",
"constructor": true,
"full_signature": "public ClasspathScanner(String pkg)",
"identifier": "ClasspathScanner",
"modifiers": "public",
"parameters": "(String pkg)",
"return": "",
"signature": " ClasspathScanner(String pkg)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.sanitizePackage(String pkgName)",
"constructor": false,
"full_signature": "private void sanitizePackage(String pkgName)",
"identifier": "sanitizePackage",
"modifiers": "private",
"parameters": "(String pkgName)",
"return": "void",
"signature": "void sanitizePackage(String pkgName)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.getClassLoader()",
"constructor": false,
"full_signature": "protected ClassLoader getClassLoader()",
"identifier": "getClassLoader",
"modifiers": "protected",
"parameters": "()",
"return": "ClassLoader",
"signature": "ClassLoader getClassLoader()",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.isJARPath(String path)",
"constructor": false,
"full_signature": "protected boolean isJARPath(String path)",
"identifier": "isJARPath",
"modifiers": "protected",
"parameters": "(String path)",
"return": "boolean",
"signature": "boolean isJARPath(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.add(Set<String> classes, String className)",
"constructor": false,
"full_signature": "protected void add(Set<String> classes, String className)",
"identifier": "add",
"modifiers": "protected",
"parameters": "(Set<String> classes, String className)",
"return": "void",
"signature": "void add(Set<String> classes, String className)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.getClassesFromJAR(String path)",
"constructor": false,
"full_signature": "protected Set<String> getClassesFromJAR(String path)",
"identifier": "getClassesFromJAR",
"modifiers": "protected",
"parameters": "(String path)",
"return": "Set<String>",
"signature": "Set<String> getClassesFromJAR(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.getClassesFromDirectory(String path)",
"constructor": false,
"full_signature": "protected Set<String> getClassesFromDirectory(String path)",
"identifier": "getClassesFromDirectory",
"modifiers": "protected",
"parameters": "(String path)",
"return": "Set<String>",
"signature": "Set<String> getClassesFromDirectory(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.sanitizeURLForWindows(String path)",
"constructor": false,
"full_signature": "protected String sanitizeURLForWindows(String path)",
"identifier": "sanitizeURLForWindows",
"modifiers": "protected",
"parameters": "(String path)",
"return": "String",
"signature": "String sanitizeURLForWindows(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.sanitizeURL(String path)",
"constructor": false,
"full_signature": "protected String sanitizeURL(String path)",
"identifier": "sanitizeURL",
"modifiers": "protected",
"parameters": "(String path)",
"return": "String",
"signature": "String sanitizeURL(String path)",
"testcase": false
},
{
"class_method_signature": "ClasspathScanner.getClasses()",
"constructor": false,
"full_signature": "public Set<String> getClasses()",
"identifier": "getClasses",
"modifiers": "public",
"parameters": "()",
"return": "Set<String>",
"signature": "Set<String> getClasses()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public Set<String> getClasses() throws IOException {\n Set<String> classes = new HashSet<String>();\n Enumeration<URL> resources = getClassLoader().getResources(pkg + \"/\");\n if (resources != null) {\n while (resources.hasMoreElements()) {\n String path = sanitizeURL(resources.nextElement().getFile());\n if ((path != null) && (path.trim().length() > 0))\n classes.addAll(\n isJARPath(path) ? getClassesFromJAR(path) : getClassesFromDirectory(path)\n );\n }\n }\n return classes;\n }",
"class_method_signature": "ClasspathScanner.getClasses()",
"constructor": false,
"full_signature": "public Set<String> getClasses()",
"identifier": "getClasses",
"invocations": [
"getResources",
"getClassLoader",
"hasMoreElements",
"sanitizeURL",
"getFile",
"nextElement",
"length",
"trim",
"addAll",
"isJARPath",
"getClassesFromJAR",
"getClassesFromDirectory"
],
"modifiers": "public",
"parameters": "()",
"return": "Set<String>",
"signature": "Set<String> getClasses()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 15,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 56670,
"size": 98082,
"stargazer_count": 23,
"stars": null,
"updates": null,
"url": "https://github.com/burris/dwr"
} |
23996364_9 | {
"fields": [],
"file": "prototype-app/src/test/java/com/ewerk/prototype/proc/util/UriBuilderTest.java",
"identifier": "UriBuilderTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testQuartz() {\n String label = \"spt\";\n String cronExp = \"0/5 * * * * ?\";\n\n String uri = UriBuilder.quartz(label, cronExp);\n assertThat(uri).isEqualTo(\"quartz2://rts/spt?cron=0/5+*+*+*+*+?&stateful=true\");\n }",
"class_method_signature": "UriBuilderTest.testQuartz()",
"constructor": false,
"full_signature": "@Test public void testQuartz()",
"identifier": "testQuartz",
"invocations": [
"quartz",
"isEqualTo",
"assertThat"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testQuartz()",
"testcase": true
} | {
"fields": [
{
"declarator": "PATTERN = compile(\" \")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = compile(\" \");",
"type": "Pattern",
"var_name": "PATTERN"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/proc/util/UriBuilder.java",
"identifier": "UriBuilder",
"interfaces": "",
"methods": [
{
"class_method_signature": "UriBuilder.UriBuilder()",
"constructor": true,
"full_signature": "private UriBuilder()",
"identifier": "UriBuilder",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " UriBuilder()",
"testcase": false
},
{
"class_method_signature": "UriBuilder.quartz(final String name, final String cronExp)",
"constructor": false,
"full_signature": "public static String quartz(final String name, final String cronExp)",
"identifier": "quartz",
"modifiers": "public static",
"parameters": "(final String name, final String cronExp)",
"return": "String",
"signature": "String quartz(final String name, final String cronExp)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String quartz(final String name, final String cronExp) {\n checkArgument(!isNullOrEmpty(name), \"The argument 'name' must not be null or empty.\");\n checkArgument(!isNullOrEmpty(cronExp), \"The argument 'cronExp' must not be null or empty.\");\n\n return \"quartz2://rts/\" + name + \"?cron=\" + PATTERN.matcher(cronExp).replaceAll(\"+\")\n + \"&stateful=true\";\n }",
"class_method_signature": "UriBuilder.quartz(final String name, final String cronExp)",
"constructor": false,
"full_signature": "public static String quartz(final String name, final String cronExp)",
"identifier": "quartz",
"invocations": [
"checkArgument",
"isNullOrEmpty",
"checkArgument",
"isNullOrEmpty",
"replaceAll",
"matcher"
],
"modifiers": "public static",
"parameters": "(final String name, final String cronExp)",
"return": "String",
"signature": "String quartz(final String name, final String cronExp)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_5 | {
"fields": [
{
"declarator": "ID = \"SJ\"",
"modifier": "private static final",
"original_string": "private static final String ID = \"SJ\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "LAST_NAME = \"Smith\"",
"modifier": "private static final",
"original_string": "private static final String LAST_NAME = \"Smith\";",
"type": "String",
"var_name": "LAST_NAME"
},
{
"declarator": "FIRST_NAME = \"John\"",
"modifier": "private static final",
"original_string": "private static final String FIRST_NAME = \"John\";",
"type": "String",
"var_name": "FIRST_NAME"
},
{
"declarator": "BIRTHDAY = of(2014, APRIL, 1)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY = of(2014, APRIL, 1);",
"type": "LocalDate",
"var_name": "BIRTHDAY"
},
{
"declarator": "BIRTHDAY_2 = of(2014, APRIL, 2)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY_2 = of(2014, APRIL, 2);",
"type": "LocalDate",
"var_name": "BIRTHDAY_2"
},
{
"declarator": "person",
"modifier": "private",
"original_string": "private Person person;",
"type": "Person",
"var_name": "person"
},
{
"declarator": "other",
"modifier": "private",
"original_string": "private Person other;",
"type": "Person",
"var_name": "other"
}
],
"file": "prototype-app/src/test/java/com/ewerk/prototype/model/PersonTest.java",
"identifier": "PersonTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testHashCode() {\n assertThat(person.hashCode()).isNotEqualTo(other.hashCode());\n assertThat(person.hashCode()).isNotEqualTo(null);\n assertThat(person.hashCode()).isEqualTo(person.hashCode());\n }",
"class_method_signature": "PersonTest.testHashCode()",
"constructor": false,
"full_signature": "@Test public void testHashCode()",
"identifier": "testHashCode",
"invocations": [
"isNotEqualTo",
"assertThat",
"hashCode",
"hashCode",
"isNotEqualTo",
"assertThat",
"hashCode",
"isEqualTo",
"assertThat",
"hashCode",
"hashCode"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testHashCode()",
"testcase": true
} | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n private",
"original_string": "@Id\n private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "firstName",
"modifier": "private",
"original_string": "private String firstName;",
"type": "String",
"var_name": "firstName"
},
{
"declarator": "lastName",
"modifier": "@Indexed\n private",
"original_string": "@Indexed\n private String lastName;",
"type": "String",
"var_name": "lastName"
},
{
"declarator": "birthday",
"modifier": "@Indexed\n @DateTimeFormat(iso = DATE)\n private",
"original_string": "@Indexed\n @DateTimeFormat(iso = DATE)\n private LocalDate birthday;",
"type": "LocalDate",
"var_name": "birthday"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/model/Person.java",
"identifier": "Person",
"interfaces": "",
"methods": [
{
"class_method_signature": "Person.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getId()",
"testcase": false
},
{
"class_method_signature": "Person.setId(final String id)",
"constructor": false,
"full_signature": "public void setId(final String id)",
"identifier": "setId",
"modifiers": "public",
"parameters": "(final String id)",
"return": "void",
"signature": "void setId(final String id)",
"testcase": false
},
{
"class_method_signature": "Person.getFirstName()",
"constructor": false,
"full_signature": "public String getFirstName()",
"identifier": "getFirstName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getFirstName()",
"testcase": false
},
{
"class_method_signature": "Person.setFirstName(final String firstName)",
"constructor": false,
"full_signature": "public void setFirstName(final String firstName)",
"identifier": "setFirstName",
"modifiers": "public",
"parameters": "(final String firstName)",
"return": "void",
"signature": "void setFirstName(final String firstName)",
"testcase": false
},
{
"class_method_signature": "Person.getLastName()",
"constructor": false,
"full_signature": "public String getLastName()",
"identifier": "getLastName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getLastName()",
"testcase": false
},
{
"class_method_signature": "Person.setLastName(final String lastName)",
"constructor": false,
"full_signature": "public void setLastName(final String lastName)",
"identifier": "setLastName",
"modifiers": "public",
"parameters": "(final String lastName)",
"return": "void",
"signature": "void setLastName(final String lastName)",
"testcase": false
},
{
"class_method_signature": "Person.getBirthday()",
"constructor": false,
"full_signature": "public LocalDate getBirthday()",
"identifier": "getBirthday",
"modifiers": "public",
"parameters": "()",
"return": "LocalDate",
"signature": "LocalDate getBirthday()",
"testcase": false
},
{
"class_method_signature": "Person.setBirthday(final LocalDate birthday)",
"constructor": false,
"full_signature": "public void setBirthday(final LocalDate birthday)",
"identifier": "setBirthday",
"modifiers": "public",
"parameters": "(final LocalDate birthday)",
"return": "void",
"signature": "void setBirthday(final LocalDate birthday)",
"testcase": false
},
{
"class_method_signature": "Person.equals(final Object o)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public boolean equals(final Object o)",
"identifier": "equals",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public",
"parameters": "(final Object o)",
"return": "boolean",
"signature": "boolean equals(final Object o)",
"testcase": false
},
{
"class_method_signature": "Person.hashCode()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "Person.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\")\n @Override\n public int hashCode() {\n return Objects.hashCode(id, firstName, lastName, birthday);\n }",
"class_method_signature": "Person.hashCode()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public int hashCode()",
"identifier": "hashCode",
"invocations": [
"hashCode"
],
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_4 | {
"fields": [
{
"declarator": "ID = \"SJ\"",
"modifier": "private static final",
"original_string": "private static final String ID = \"SJ\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "LAST_NAME = \"Smith\"",
"modifier": "private static final",
"original_string": "private static final String LAST_NAME = \"Smith\";",
"type": "String",
"var_name": "LAST_NAME"
},
{
"declarator": "FIRST_NAME = \"John\"",
"modifier": "private static final",
"original_string": "private static final String FIRST_NAME = \"John\";",
"type": "String",
"var_name": "FIRST_NAME"
},
{
"declarator": "BIRTHDAY = of(2014, APRIL, 1)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY = of(2014, APRIL, 1);",
"type": "LocalDate",
"var_name": "BIRTHDAY"
},
{
"declarator": "BIRTHDAY_2 = of(2014, APRIL, 2)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY_2 = of(2014, APRIL, 2);",
"type": "LocalDate",
"var_name": "BIRTHDAY_2"
},
{
"declarator": "person",
"modifier": "private",
"original_string": "private Person person;",
"type": "Person",
"var_name": "person"
},
{
"declarator": "other",
"modifier": "private",
"original_string": "private Person other;",
"type": "Person",
"var_name": "other"
}
],
"file": "prototype-app/src/test/java/com/ewerk/prototype/model/PersonTest.java",
"identifier": "PersonTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testEquals() {\n assertThat(person).isNotEqualTo(other);\n assertThat(person).isNotEqualTo(null);\n assertThat(person).isEqualTo(person);\n }",
"class_method_signature": "PersonTest.testEquals()",
"constructor": false,
"full_signature": "@Test public void testEquals()",
"identifier": "testEquals",
"invocations": [
"isNotEqualTo",
"assertThat",
"isNotEqualTo",
"assertThat",
"isEqualTo",
"assertThat"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testEquals()",
"testcase": true
} | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n private",
"original_string": "@Id\n private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "firstName",
"modifier": "private",
"original_string": "private String firstName;",
"type": "String",
"var_name": "firstName"
},
{
"declarator": "lastName",
"modifier": "@Indexed\n private",
"original_string": "@Indexed\n private String lastName;",
"type": "String",
"var_name": "lastName"
},
{
"declarator": "birthday",
"modifier": "@Indexed\n @DateTimeFormat(iso = DATE)\n private",
"original_string": "@Indexed\n @DateTimeFormat(iso = DATE)\n private LocalDate birthday;",
"type": "LocalDate",
"var_name": "birthday"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/model/Person.java",
"identifier": "Person",
"interfaces": "",
"methods": [
{
"class_method_signature": "Person.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getId()",
"testcase": false
},
{
"class_method_signature": "Person.setId(final String id)",
"constructor": false,
"full_signature": "public void setId(final String id)",
"identifier": "setId",
"modifiers": "public",
"parameters": "(final String id)",
"return": "void",
"signature": "void setId(final String id)",
"testcase": false
},
{
"class_method_signature": "Person.getFirstName()",
"constructor": false,
"full_signature": "public String getFirstName()",
"identifier": "getFirstName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getFirstName()",
"testcase": false
},
{
"class_method_signature": "Person.setFirstName(final String firstName)",
"constructor": false,
"full_signature": "public void setFirstName(final String firstName)",
"identifier": "setFirstName",
"modifiers": "public",
"parameters": "(final String firstName)",
"return": "void",
"signature": "void setFirstName(final String firstName)",
"testcase": false
},
{
"class_method_signature": "Person.getLastName()",
"constructor": false,
"full_signature": "public String getLastName()",
"identifier": "getLastName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getLastName()",
"testcase": false
},
{
"class_method_signature": "Person.setLastName(final String lastName)",
"constructor": false,
"full_signature": "public void setLastName(final String lastName)",
"identifier": "setLastName",
"modifiers": "public",
"parameters": "(final String lastName)",
"return": "void",
"signature": "void setLastName(final String lastName)",
"testcase": false
},
{
"class_method_signature": "Person.getBirthday()",
"constructor": false,
"full_signature": "public LocalDate getBirthday()",
"identifier": "getBirthday",
"modifiers": "public",
"parameters": "()",
"return": "LocalDate",
"signature": "LocalDate getBirthday()",
"testcase": false
},
{
"class_method_signature": "Person.setBirthday(final LocalDate birthday)",
"constructor": false,
"full_signature": "public void setBirthday(final LocalDate birthday)",
"identifier": "setBirthday",
"modifiers": "public",
"parameters": "(final LocalDate birthday)",
"return": "void",
"signature": "void setBirthday(final LocalDate birthday)",
"testcase": false
},
{
"class_method_signature": "Person.equals(final Object o)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public boolean equals(final Object o)",
"identifier": "equals",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public",
"parameters": "(final Object o)",
"return": "boolean",
"signature": "boolean equals(final Object o)",
"testcase": false
},
{
"class_method_signature": "Person.hashCode()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "Person.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\")\n @Override\n public boolean equals(final Object o) {\n if (this == o)\n return true;\n if ((o == null) || (getClass() != o.getClass()))\n return false;\n final Person person = (Person) o;\n return equal(id, person.id) &&\n equal(firstName, person.firstName) &&\n equal(lastName, person.lastName) &&\n equal(birthday, person.birthday);\n }",
"class_method_signature": "Person.equals(final Object o)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public boolean equals(final Object o)",
"identifier": "equals",
"invocations": [
"getClass",
"getClass",
"equal",
"equal",
"equal",
"equal"
],
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public",
"parameters": "(final Object o)",
"return": "boolean",
"signature": "boolean equals(final Object o)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_8 | {
"fields": [],
"file": "prototype-app/src/test/java/com/ewerk/prototype/proc/util/UriBuilderTest.java",
"identifier": "UriBuilderTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testQuartzWithNullParam() {\n UriBuilder.quartz(null, null);\n }",
"class_method_signature": "UriBuilderTest.testQuartzWithNullParam()",
"constructor": false,
"full_signature": "@Test(expectedExceptions = IllegalArgumentException.class) public void testQuartzWithNullParam()",
"identifier": "testQuartzWithNullParam",
"invocations": [
"quartz"
],
"modifiers": "@Test(expectedExceptions = IllegalArgumentException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testQuartzWithNullParam()",
"testcase": true
} | {
"fields": [
{
"declarator": "PATTERN = compile(\" \")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = compile(\" \");",
"type": "Pattern",
"var_name": "PATTERN"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/proc/util/UriBuilder.java",
"identifier": "UriBuilder",
"interfaces": "",
"methods": [
{
"class_method_signature": "UriBuilder.UriBuilder()",
"constructor": true,
"full_signature": "private UriBuilder()",
"identifier": "UriBuilder",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " UriBuilder()",
"testcase": false
},
{
"class_method_signature": "UriBuilder.quartz(final String name, final String cronExp)",
"constructor": false,
"full_signature": "public static String quartz(final String name, final String cronExp)",
"identifier": "quartz",
"modifiers": "public static",
"parameters": "(final String name, final String cronExp)",
"return": "String",
"signature": "String quartz(final String name, final String cronExp)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String quartz(final String name, final String cronExp) {\n checkArgument(!isNullOrEmpty(name), \"The argument 'name' must not be null or empty.\");\n checkArgument(!isNullOrEmpty(cronExp), \"The argument 'cronExp' must not be null or empty.\");\n\n return \"quartz2://rts/\" + name + \"?cron=\" + PATTERN.matcher(cronExp).replaceAll(\"+\")\n + \"&stateful=true\";\n }",
"class_method_signature": "UriBuilder.quartz(final String name, final String cronExp)",
"constructor": false,
"full_signature": "public static String quartz(final String name, final String cronExp)",
"identifier": "quartz",
"invocations": [
"checkArgument",
"isNullOrEmpty",
"checkArgument",
"isNullOrEmpty",
"replaceAll",
"matcher"
],
"modifiers": "public static",
"parameters": "(final String name, final String cronExp)",
"return": "String",
"signature": "String quartz(final String name, final String cronExp)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_3 | {
"fields": [
{
"declarator": "ID = \"SJ\"",
"modifier": "private static final",
"original_string": "private static final String ID = \"SJ\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "LAST_NAME = \"Smith\"",
"modifier": "private static final",
"original_string": "private static final String LAST_NAME = \"Smith\";",
"type": "String",
"var_name": "LAST_NAME"
},
{
"declarator": "FIRST_NAME = \"John\"",
"modifier": "private static final",
"original_string": "private static final String FIRST_NAME = \"John\";",
"type": "String",
"var_name": "FIRST_NAME"
},
{
"declarator": "BIRTHDAY = of(2014, APRIL, 1)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY = of(2014, APRIL, 1);",
"type": "LocalDate",
"var_name": "BIRTHDAY"
},
{
"declarator": "BIRTHDAY_2 = of(2014, APRIL, 2)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY_2 = of(2014, APRIL, 2);",
"type": "LocalDate",
"var_name": "BIRTHDAY_2"
},
{
"declarator": "person",
"modifier": "private",
"original_string": "private Person person;",
"type": "Person",
"var_name": "person"
},
{
"declarator": "other",
"modifier": "private",
"original_string": "private Person other;",
"type": "Person",
"var_name": "other"
}
],
"file": "prototype-app/src/test/java/com/ewerk/prototype/model/PersonTest.java",
"identifier": "PersonTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testGetBirthday() {\n assertThat(person.getBirthday()).isEqualTo(BIRTHDAY);\n }",
"class_method_signature": "PersonTest.testGetBirthday()",
"constructor": false,
"full_signature": "@Test public void testGetBirthday()",
"identifier": "testGetBirthday",
"invocations": [
"isEqualTo",
"assertThat",
"getBirthday"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetBirthday()",
"testcase": true
} | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n private",
"original_string": "@Id\n private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "firstName",
"modifier": "private",
"original_string": "private String firstName;",
"type": "String",
"var_name": "firstName"
},
{
"declarator": "lastName",
"modifier": "@Indexed\n private",
"original_string": "@Indexed\n private String lastName;",
"type": "String",
"var_name": "lastName"
},
{
"declarator": "birthday",
"modifier": "@Indexed\n @DateTimeFormat(iso = DATE)\n private",
"original_string": "@Indexed\n @DateTimeFormat(iso = DATE)\n private LocalDate birthday;",
"type": "LocalDate",
"var_name": "birthday"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/model/Person.java",
"identifier": "Person",
"interfaces": "",
"methods": [
{
"class_method_signature": "Person.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getId()",
"testcase": false
},
{
"class_method_signature": "Person.setId(final String id)",
"constructor": false,
"full_signature": "public void setId(final String id)",
"identifier": "setId",
"modifiers": "public",
"parameters": "(final String id)",
"return": "void",
"signature": "void setId(final String id)",
"testcase": false
},
{
"class_method_signature": "Person.getFirstName()",
"constructor": false,
"full_signature": "public String getFirstName()",
"identifier": "getFirstName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getFirstName()",
"testcase": false
},
{
"class_method_signature": "Person.setFirstName(final String firstName)",
"constructor": false,
"full_signature": "public void setFirstName(final String firstName)",
"identifier": "setFirstName",
"modifiers": "public",
"parameters": "(final String firstName)",
"return": "void",
"signature": "void setFirstName(final String firstName)",
"testcase": false
},
{
"class_method_signature": "Person.getLastName()",
"constructor": false,
"full_signature": "public String getLastName()",
"identifier": "getLastName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getLastName()",
"testcase": false
},
{
"class_method_signature": "Person.setLastName(final String lastName)",
"constructor": false,
"full_signature": "public void setLastName(final String lastName)",
"identifier": "setLastName",
"modifiers": "public",
"parameters": "(final String lastName)",
"return": "void",
"signature": "void setLastName(final String lastName)",
"testcase": false
},
{
"class_method_signature": "Person.getBirthday()",
"constructor": false,
"full_signature": "public LocalDate getBirthday()",
"identifier": "getBirthday",
"modifiers": "public",
"parameters": "()",
"return": "LocalDate",
"signature": "LocalDate getBirthday()",
"testcase": false
},
{
"class_method_signature": "Person.setBirthday(final LocalDate birthday)",
"constructor": false,
"full_signature": "public void setBirthday(final LocalDate birthday)",
"identifier": "setBirthday",
"modifiers": "public",
"parameters": "(final LocalDate birthday)",
"return": "void",
"signature": "void setBirthday(final LocalDate birthday)",
"testcase": false
},
{
"class_method_signature": "Person.equals(final Object o)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public boolean equals(final Object o)",
"identifier": "equals",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public",
"parameters": "(final Object o)",
"return": "boolean",
"signature": "boolean equals(final Object o)",
"testcase": false
},
{
"class_method_signature": "Person.hashCode()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "Person.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public LocalDate getBirthday() {\n return birthday;\n }",
"class_method_signature": "Person.getBirthday()",
"constructor": false,
"full_signature": "public LocalDate getBirthday()",
"identifier": "getBirthday",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "LocalDate",
"signature": "LocalDate getBirthday()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_12 | {
"fields": [],
"file": "prototype-app/src/test/java/com/ewerk/prototype/proc/archiving/model/ArchiveTest.java",
"identifier": "ArchiveTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testWith() {\n final Person person = new Person();\n final Archive archive = Archive.with(Lists.newArrayList(person));\n assertThat(archive.uid()).isNotEmpty();\n assertThat(archive.archivedPersons().get(0)).isEqualTo(person);\n assertThat(archive.creation()).isNotNull();\n }",
"class_method_signature": "ArchiveTest.testWith()",
"constructor": false,
"full_signature": "@Test public void testWith()",
"identifier": "testWith",
"invocations": [
"with",
"newArrayList",
"isNotEmpty",
"assertThat",
"uid",
"isEqualTo",
"assertThat",
"get",
"archivedPersons",
"isNotNull",
"assertThat",
"creation"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testWith()",
"testcase": true
} | {
"fields": [],
"file": "prototype-app/src/main/java/com/ewerk/prototype/proc/archiving/model/Archive.java",
"identifier": "Archive",
"interfaces": "",
"methods": [
{
"class_method_signature": "Archive.uid()",
"constructor": false,
"full_signature": "public abstract String uid()",
"identifier": "uid",
"modifiers": "public abstract",
"parameters": "()",
"return": "String",
"signature": "String uid()",
"testcase": false
},
{
"class_method_signature": "Archive.archivedPersons()",
"constructor": false,
"full_signature": "public abstract List<Person> archivedPersons()",
"identifier": "archivedPersons",
"modifiers": "public abstract",
"parameters": "()",
"return": "List<Person>",
"signature": "List<Person> archivedPersons()",
"testcase": false
},
{
"class_method_signature": "Archive.creation()",
"constructor": false,
"full_signature": "public abstract LocalDateTime creation()",
"identifier": "creation",
"modifiers": "public abstract",
"parameters": "()",
"return": "LocalDateTime",
"signature": "LocalDateTime creation()",
"testcase": false
},
{
"class_method_signature": "Archive.Archive()",
"constructor": true,
"full_signature": " Archive()",
"identifier": "Archive",
"modifiers": "",
"parameters": "()",
"return": "",
"signature": " Archive()",
"testcase": false
},
{
"class_method_signature": "Archive.with(@CheckForNull final List<Person> persons)",
"constructor": false,
"full_signature": "@Nonnull public static Archive with(@CheckForNull final List<Person> persons)",
"identifier": "with",
"modifiers": "@Nonnull public static",
"parameters": "(@CheckForNull final List<Person> persons)",
"return": "Archive",
"signature": "Archive with(@CheckForNull final List<Person> persons)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Nonnull\n public static Archive with(@CheckForNull final List<Person> persons) {\n checkArgument((persons != null) && !persons.isEmpty(),\n \"Argument 'persons' must not be null or empty.\");\n return new AutoValue_Archive(randomUUID().toString(), persons, now());\n }",
"class_method_signature": "Archive.with(@CheckForNull final List<Person> persons)",
"constructor": false,
"full_signature": "@Nonnull public static Archive with(@CheckForNull final List<Person> persons)",
"identifier": "with",
"invocations": [
"checkArgument",
"isEmpty",
"toString",
"randomUUID",
"now"
],
"modifiers": "@Nonnull public static",
"parameters": "(@CheckForNull final List<Person> persons)",
"return": "Archive",
"signature": "Archive with(@CheckForNull final List<Person> persons)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_2 | {
"fields": [
{
"declarator": "ID = \"SJ\"",
"modifier": "private static final",
"original_string": "private static final String ID = \"SJ\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "LAST_NAME = \"Smith\"",
"modifier": "private static final",
"original_string": "private static final String LAST_NAME = \"Smith\";",
"type": "String",
"var_name": "LAST_NAME"
},
{
"declarator": "FIRST_NAME = \"John\"",
"modifier": "private static final",
"original_string": "private static final String FIRST_NAME = \"John\";",
"type": "String",
"var_name": "FIRST_NAME"
},
{
"declarator": "BIRTHDAY = of(2014, APRIL, 1)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY = of(2014, APRIL, 1);",
"type": "LocalDate",
"var_name": "BIRTHDAY"
},
{
"declarator": "BIRTHDAY_2 = of(2014, APRIL, 2)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY_2 = of(2014, APRIL, 2);",
"type": "LocalDate",
"var_name": "BIRTHDAY_2"
},
{
"declarator": "person",
"modifier": "private",
"original_string": "private Person person;",
"type": "Person",
"var_name": "person"
},
{
"declarator": "other",
"modifier": "private",
"original_string": "private Person other;",
"type": "Person",
"var_name": "other"
}
],
"file": "prototype-app/src/test/java/com/ewerk/prototype/model/PersonTest.java",
"identifier": "PersonTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testGetFirstName() {\n assertThat(person.getFirstName()).isEqualTo(FIRST_NAME);\n }",
"class_method_signature": "PersonTest.testGetFirstName()",
"constructor": false,
"full_signature": "@Test public void testGetFirstName()",
"identifier": "testGetFirstName",
"invocations": [
"isEqualTo",
"assertThat",
"getFirstName"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetFirstName()",
"testcase": true
} | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n private",
"original_string": "@Id\n private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "firstName",
"modifier": "private",
"original_string": "private String firstName;",
"type": "String",
"var_name": "firstName"
},
{
"declarator": "lastName",
"modifier": "@Indexed\n private",
"original_string": "@Indexed\n private String lastName;",
"type": "String",
"var_name": "lastName"
},
{
"declarator": "birthday",
"modifier": "@Indexed\n @DateTimeFormat(iso = DATE)\n private",
"original_string": "@Indexed\n @DateTimeFormat(iso = DATE)\n private LocalDate birthday;",
"type": "LocalDate",
"var_name": "birthday"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/model/Person.java",
"identifier": "Person",
"interfaces": "",
"methods": [
{
"class_method_signature": "Person.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getId()",
"testcase": false
},
{
"class_method_signature": "Person.setId(final String id)",
"constructor": false,
"full_signature": "public void setId(final String id)",
"identifier": "setId",
"modifiers": "public",
"parameters": "(final String id)",
"return": "void",
"signature": "void setId(final String id)",
"testcase": false
},
{
"class_method_signature": "Person.getFirstName()",
"constructor": false,
"full_signature": "public String getFirstName()",
"identifier": "getFirstName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getFirstName()",
"testcase": false
},
{
"class_method_signature": "Person.setFirstName(final String firstName)",
"constructor": false,
"full_signature": "public void setFirstName(final String firstName)",
"identifier": "setFirstName",
"modifiers": "public",
"parameters": "(final String firstName)",
"return": "void",
"signature": "void setFirstName(final String firstName)",
"testcase": false
},
{
"class_method_signature": "Person.getLastName()",
"constructor": false,
"full_signature": "public String getLastName()",
"identifier": "getLastName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getLastName()",
"testcase": false
},
{
"class_method_signature": "Person.setLastName(final String lastName)",
"constructor": false,
"full_signature": "public void setLastName(final String lastName)",
"identifier": "setLastName",
"modifiers": "public",
"parameters": "(final String lastName)",
"return": "void",
"signature": "void setLastName(final String lastName)",
"testcase": false
},
{
"class_method_signature": "Person.getBirthday()",
"constructor": false,
"full_signature": "public LocalDate getBirthday()",
"identifier": "getBirthday",
"modifiers": "public",
"parameters": "()",
"return": "LocalDate",
"signature": "LocalDate getBirthday()",
"testcase": false
},
{
"class_method_signature": "Person.setBirthday(final LocalDate birthday)",
"constructor": false,
"full_signature": "public void setBirthday(final LocalDate birthday)",
"identifier": "setBirthday",
"modifiers": "public",
"parameters": "(final LocalDate birthday)",
"return": "void",
"signature": "void setBirthday(final LocalDate birthday)",
"testcase": false
},
{
"class_method_signature": "Person.equals(final Object o)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public boolean equals(final Object o)",
"identifier": "equals",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public",
"parameters": "(final Object o)",
"return": "boolean",
"signature": "boolean equals(final Object o)",
"testcase": false
},
{
"class_method_signature": "Person.hashCode()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "Person.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public String getFirstName() {\n return firstName;\n }",
"class_method_signature": "Person.getFirstName()",
"constructor": false,
"full_signature": "public String getFirstName()",
"identifier": "getFirstName",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getFirstName()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_1 | {
"fields": [
{
"declarator": "ID = \"SJ\"",
"modifier": "private static final",
"original_string": "private static final String ID = \"SJ\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "LAST_NAME = \"Smith\"",
"modifier": "private static final",
"original_string": "private static final String LAST_NAME = \"Smith\";",
"type": "String",
"var_name": "LAST_NAME"
},
{
"declarator": "FIRST_NAME = \"John\"",
"modifier": "private static final",
"original_string": "private static final String FIRST_NAME = \"John\";",
"type": "String",
"var_name": "FIRST_NAME"
},
{
"declarator": "BIRTHDAY = of(2014, APRIL, 1)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY = of(2014, APRIL, 1);",
"type": "LocalDate",
"var_name": "BIRTHDAY"
},
{
"declarator": "BIRTHDAY_2 = of(2014, APRIL, 2)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY_2 = of(2014, APRIL, 2);",
"type": "LocalDate",
"var_name": "BIRTHDAY_2"
},
{
"declarator": "person",
"modifier": "private",
"original_string": "private Person person;",
"type": "Person",
"var_name": "person"
},
{
"declarator": "other",
"modifier": "private",
"original_string": "private Person other;",
"type": "Person",
"var_name": "other"
}
],
"file": "prototype-app/src/test/java/com/ewerk/prototype/model/PersonTest.java",
"identifier": "PersonTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testGetLastName() {\n assertThat(person.getLastName()).isEqualTo(LAST_NAME);\n }",
"class_method_signature": "PersonTest.testGetLastName()",
"constructor": false,
"full_signature": "@Test public void testGetLastName()",
"identifier": "testGetLastName",
"invocations": [
"isEqualTo",
"assertThat",
"getLastName"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetLastName()",
"testcase": true
} | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n private",
"original_string": "@Id\n private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "firstName",
"modifier": "private",
"original_string": "private String firstName;",
"type": "String",
"var_name": "firstName"
},
{
"declarator": "lastName",
"modifier": "@Indexed\n private",
"original_string": "@Indexed\n private String lastName;",
"type": "String",
"var_name": "lastName"
},
{
"declarator": "birthday",
"modifier": "@Indexed\n @DateTimeFormat(iso = DATE)\n private",
"original_string": "@Indexed\n @DateTimeFormat(iso = DATE)\n private LocalDate birthday;",
"type": "LocalDate",
"var_name": "birthday"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/model/Person.java",
"identifier": "Person",
"interfaces": "",
"methods": [
{
"class_method_signature": "Person.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getId()",
"testcase": false
},
{
"class_method_signature": "Person.setId(final String id)",
"constructor": false,
"full_signature": "public void setId(final String id)",
"identifier": "setId",
"modifiers": "public",
"parameters": "(final String id)",
"return": "void",
"signature": "void setId(final String id)",
"testcase": false
},
{
"class_method_signature": "Person.getFirstName()",
"constructor": false,
"full_signature": "public String getFirstName()",
"identifier": "getFirstName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getFirstName()",
"testcase": false
},
{
"class_method_signature": "Person.setFirstName(final String firstName)",
"constructor": false,
"full_signature": "public void setFirstName(final String firstName)",
"identifier": "setFirstName",
"modifiers": "public",
"parameters": "(final String firstName)",
"return": "void",
"signature": "void setFirstName(final String firstName)",
"testcase": false
},
{
"class_method_signature": "Person.getLastName()",
"constructor": false,
"full_signature": "public String getLastName()",
"identifier": "getLastName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getLastName()",
"testcase": false
},
{
"class_method_signature": "Person.setLastName(final String lastName)",
"constructor": false,
"full_signature": "public void setLastName(final String lastName)",
"identifier": "setLastName",
"modifiers": "public",
"parameters": "(final String lastName)",
"return": "void",
"signature": "void setLastName(final String lastName)",
"testcase": false
},
{
"class_method_signature": "Person.getBirthday()",
"constructor": false,
"full_signature": "public LocalDate getBirthday()",
"identifier": "getBirthday",
"modifiers": "public",
"parameters": "()",
"return": "LocalDate",
"signature": "LocalDate getBirthday()",
"testcase": false
},
{
"class_method_signature": "Person.setBirthday(final LocalDate birthday)",
"constructor": false,
"full_signature": "public void setBirthday(final LocalDate birthday)",
"identifier": "setBirthday",
"modifiers": "public",
"parameters": "(final LocalDate birthday)",
"return": "void",
"signature": "void setBirthday(final LocalDate birthday)",
"testcase": false
},
{
"class_method_signature": "Person.equals(final Object o)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public boolean equals(final Object o)",
"identifier": "equals",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public",
"parameters": "(final Object o)",
"return": "boolean",
"signature": "boolean equals(final Object o)",
"testcase": false
},
{
"class_method_signature": "Person.hashCode()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "Person.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public String getLastName() {\n return lastName;\n }",
"class_method_signature": "Person.getLastName()",
"constructor": false,
"full_signature": "public String getLastName()",
"identifier": "getLastName",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getLastName()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_10 | {
"fields": [],
"file": "prototype-app/src/test/java/com/ewerk/prototype/proc/archiving/model/ArchiveTest.java",
"identifier": "ArchiveTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testWithNullPersons() {\n Archive.with(null);\n }",
"class_method_signature": "ArchiveTest.testWithNullPersons()",
"constructor": false,
"full_signature": "@Test(expectedExceptions = IllegalArgumentException.class) public void testWithNullPersons()",
"identifier": "testWithNullPersons",
"invocations": [
"with"
],
"modifiers": "@Test(expectedExceptions = IllegalArgumentException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testWithNullPersons()",
"testcase": true
} | {
"fields": [],
"file": "prototype-app/src/main/java/com/ewerk/prototype/proc/archiving/model/Archive.java",
"identifier": "Archive",
"interfaces": "",
"methods": [
{
"class_method_signature": "Archive.uid()",
"constructor": false,
"full_signature": "public abstract String uid()",
"identifier": "uid",
"modifiers": "public abstract",
"parameters": "()",
"return": "String",
"signature": "String uid()",
"testcase": false
},
{
"class_method_signature": "Archive.archivedPersons()",
"constructor": false,
"full_signature": "public abstract List<Person> archivedPersons()",
"identifier": "archivedPersons",
"modifiers": "public abstract",
"parameters": "()",
"return": "List<Person>",
"signature": "List<Person> archivedPersons()",
"testcase": false
},
{
"class_method_signature": "Archive.creation()",
"constructor": false,
"full_signature": "public abstract LocalDateTime creation()",
"identifier": "creation",
"modifiers": "public abstract",
"parameters": "()",
"return": "LocalDateTime",
"signature": "LocalDateTime creation()",
"testcase": false
},
{
"class_method_signature": "Archive.Archive()",
"constructor": true,
"full_signature": " Archive()",
"identifier": "Archive",
"modifiers": "",
"parameters": "()",
"return": "",
"signature": " Archive()",
"testcase": false
},
{
"class_method_signature": "Archive.with(@CheckForNull final List<Person> persons)",
"constructor": false,
"full_signature": "@Nonnull public static Archive with(@CheckForNull final List<Person> persons)",
"identifier": "with",
"modifiers": "@Nonnull public static",
"parameters": "(@CheckForNull final List<Person> persons)",
"return": "Archive",
"signature": "Archive with(@CheckForNull final List<Person> persons)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Nonnull\n public static Archive with(@CheckForNull final List<Person> persons) {\n checkArgument((persons != null) && !persons.isEmpty(),\n \"Argument 'persons' must not be null or empty.\");\n return new AutoValue_Archive(randomUUID().toString(), persons, now());\n }",
"class_method_signature": "Archive.with(@CheckForNull final List<Person> persons)",
"constructor": false,
"full_signature": "@Nonnull public static Archive with(@CheckForNull final List<Person> persons)",
"identifier": "with",
"invocations": [
"checkArgument",
"isEmpty",
"toString",
"randomUUID",
"now"
],
"modifiers": "@Nonnull public static",
"parameters": "(@CheckForNull final List<Person> persons)",
"return": "Archive",
"signature": "Archive with(@CheckForNull final List<Person> persons)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_11 | {
"fields": [],
"file": "prototype-app/src/test/java/com/ewerk/prototype/proc/archiving/model/ArchiveTest.java",
"identifier": "ArchiveTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testWithEmptyPersons() {\n Archive.with(Lists.newArrayList());\n }",
"class_method_signature": "ArchiveTest.testWithEmptyPersons()",
"constructor": false,
"full_signature": "@Test(expectedExceptions = IllegalArgumentException.class) public void testWithEmptyPersons()",
"identifier": "testWithEmptyPersons",
"invocations": [
"with",
"newArrayList"
],
"modifiers": "@Test(expectedExceptions = IllegalArgumentException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testWithEmptyPersons()",
"testcase": true
} | {
"fields": [],
"file": "prototype-app/src/main/java/com/ewerk/prototype/proc/archiving/model/Archive.java",
"identifier": "Archive",
"interfaces": "",
"methods": [
{
"class_method_signature": "Archive.uid()",
"constructor": false,
"full_signature": "public abstract String uid()",
"identifier": "uid",
"modifiers": "public abstract",
"parameters": "()",
"return": "String",
"signature": "String uid()",
"testcase": false
},
{
"class_method_signature": "Archive.archivedPersons()",
"constructor": false,
"full_signature": "public abstract List<Person> archivedPersons()",
"identifier": "archivedPersons",
"modifiers": "public abstract",
"parameters": "()",
"return": "List<Person>",
"signature": "List<Person> archivedPersons()",
"testcase": false
},
{
"class_method_signature": "Archive.creation()",
"constructor": false,
"full_signature": "public abstract LocalDateTime creation()",
"identifier": "creation",
"modifiers": "public abstract",
"parameters": "()",
"return": "LocalDateTime",
"signature": "LocalDateTime creation()",
"testcase": false
},
{
"class_method_signature": "Archive.Archive()",
"constructor": true,
"full_signature": " Archive()",
"identifier": "Archive",
"modifiers": "",
"parameters": "()",
"return": "",
"signature": " Archive()",
"testcase": false
},
{
"class_method_signature": "Archive.with(@CheckForNull final List<Person> persons)",
"constructor": false,
"full_signature": "@Nonnull public static Archive with(@CheckForNull final List<Person> persons)",
"identifier": "with",
"modifiers": "@Nonnull public static",
"parameters": "(@CheckForNull final List<Person> persons)",
"return": "Archive",
"signature": "Archive with(@CheckForNull final List<Person> persons)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Nonnull\n public static Archive with(@CheckForNull final List<Person> persons) {\n checkArgument((persons != null) && !persons.isEmpty(),\n \"Argument 'persons' must not be null or empty.\");\n return new AutoValue_Archive(randomUUID().toString(), persons, now());\n }",
"class_method_signature": "Archive.with(@CheckForNull final List<Person> persons)",
"constructor": false,
"full_signature": "@Nonnull public static Archive with(@CheckForNull final List<Person> persons)",
"identifier": "with",
"invocations": [
"checkArgument",
"isEmpty",
"toString",
"randomUUID",
"now"
],
"modifiers": "@Nonnull public static",
"parameters": "(@CheckForNull final List<Person> persons)",
"return": "Archive",
"signature": "Archive with(@CheckForNull final List<Person> persons)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_0 | {
"fields": [
{
"declarator": "ID = \"SJ\"",
"modifier": "private static final",
"original_string": "private static final String ID = \"SJ\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "LAST_NAME = \"Smith\"",
"modifier": "private static final",
"original_string": "private static final String LAST_NAME = \"Smith\";",
"type": "String",
"var_name": "LAST_NAME"
},
{
"declarator": "FIRST_NAME = \"John\"",
"modifier": "private static final",
"original_string": "private static final String FIRST_NAME = \"John\";",
"type": "String",
"var_name": "FIRST_NAME"
},
{
"declarator": "BIRTHDAY = of(2014, APRIL, 1)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY = of(2014, APRIL, 1);",
"type": "LocalDate",
"var_name": "BIRTHDAY"
},
{
"declarator": "BIRTHDAY_2 = of(2014, APRIL, 2)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY_2 = of(2014, APRIL, 2);",
"type": "LocalDate",
"var_name": "BIRTHDAY_2"
},
{
"declarator": "person",
"modifier": "private",
"original_string": "private Person person;",
"type": "Person",
"var_name": "person"
},
{
"declarator": "other",
"modifier": "private",
"original_string": "private Person other;",
"type": "Person",
"var_name": "other"
}
],
"file": "prototype-app/src/test/java/com/ewerk/prototype/model/PersonTest.java",
"identifier": "PersonTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testGetId() {\n assertThat(person.getId()).isEqualTo(ID);\n }",
"class_method_signature": "PersonTest.testGetId()",
"constructor": false,
"full_signature": "@Test public void testGetId()",
"identifier": "testGetId",
"invocations": [
"isEqualTo",
"assertThat",
"getId"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetId()",
"testcase": true
} | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n private",
"original_string": "@Id\n private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "firstName",
"modifier": "private",
"original_string": "private String firstName;",
"type": "String",
"var_name": "firstName"
},
{
"declarator": "lastName",
"modifier": "@Indexed\n private",
"original_string": "@Indexed\n private String lastName;",
"type": "String",
"var_name": "lastName"
},
{
"declarator": "birthday",
"modifier": "@Indexed\n @DateTimeFormat(iso = DATE)\n private",
"original_string": "@Indexed\n @DateTimeFormat(iso = DATE)\n private LocalDate birthday;",
"type": "LocalDate",
"var_name": "birthday"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/model/Person.java",
"identifier": "Person",
"interfaces": "",
"methods": [
{
"class_method_signature": "Person.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getId()",
"testcase": false
},
{
"class_method_signature": "Person.setId(final String id)",
"constructor": false,
"full_signature": "public void setId(final String id)",
"identifier": "setId",
"modifiers": "public",
"parameters": "(final String id)",
"return": "void",
"signature": "void setId(final String id)",
"testcase": false
},
{
"class_method_signature": "Person.getFirstName()",
"constructor": false,
"full_signature": "public String getFirstName()",
"identifier": "getFirstName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getFirstName()",
"testcase": false
},
{
"class_method_signature": "Person.setFirstName(final String firstName)",
"constructor": false,
"full_signature": "public void setFirstName(final String firstName)",
"identifier": "setFirstName",
"modifiers": "public",
"parameters": "(final String firstName)",
"return": "void",
"signature": "void setFirstName(final String firstName)",
"testcase": false
},
{
"class_method_signature": "Person.getLastName()",
"constructor": false,
"full_signature": "public String getLastName()",
"identifier": "getLastName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getLastName()",
"testcase": false
},
{
"class_method_signature": "Person.setLastName(final String lastName)",
"constructor": false,
"full_signature": "public void setLastName(final String lastName)",
"identifier": "setLastName",
"modifiers": "public",
"parameters": "(final String lastName)",
"return": "void",
"signature": "void setLastName(final String lastName)",
"testcase": false
},
{
"class_method_signature": "Person.getBirthday()",
"constructor": false,
"full_signature": "public LocalDate getBirthday()",
"identifier": "getBirthday",
"modifiers": "public",
"parameters": "()",
"return": "LocalDate",
"signature": "LocalDate getBirthday()",
"testcase": false
},
{
"class_method_signature": "Person.setBirthday(final LocalDate birthday)",
"constructor": false,
"full_signature": "public void setBirthday(final LocalDate birthday)",
"identifier": "setBirthday",
"modifiers": "public",
"parameters": "(final LocalDate birthday)",
"return": "void",
"signature": "void setBirthday(final LocalDate birthday)",
"testcase": false
},
{
"class_method_signature": "Person.equals(final Object o)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public boolean equals(final Object o)",
"identifier": "equals",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public",
"parameters": "(final Object o)",
"return": "boolean",
"signature": "boolean equals(final Object o)",
"testcase": false
},
{
"class_method_signature": "Person.hashCode()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "Person.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public String getId() {\n return id;\n }",
"class_method_signature": "Person.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getId()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_7 | {
"fields": [],
"file": "prototype-app/src/test/java/com/ewerk/prototype/api/GlobalErrorHandlerTest.java",
"identifier": "GlobalErrorHandlerTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testHandleException() {\n GlobalErrorHandler handler = new GlobalErrorHandler();\n final ResponseEntity<String> responseEntity =\n handler.handleException(new RuntimeException(\"Test\"));\n assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);\n assertThat(responseEntity.getBody()).isEqualTo(\"Test\");\n }",
"class_method_signature": "GlobalErrorHandlerTest.testHandleException()",
"constructor": false,
"full_signature": "@Test public void testHandleException()",
"identifier": "testHandleException",
"invocations": [
"handleException",
"isEqualTo",
"assertThat",
"getStatusCode",
"isEqualTo",
"assertThat",
"getBody"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testHandleException()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOG = getLogger(GlobalErrorHandler.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = getLogger(GlobalErrorHandler.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/api/GlobalErrorHandler.java",
"identifier": "GlobalErrorHandler",
"interfaces": "",
"methods": [
{
"class_method_signature": "GlobalErrorHandler.handleException(@Nonnull final Exception exception)",
"constructor": false,
"full_signature": "@ExceptionHandler(Exception.class) public ResponseEntity<String> handleException(@Nonnull final Exception exception)",
"identifier": "handleException",
"modifiers": "@ExceptionHandler(Exception.class) public",
"parameters": "(@Nonnull final Exception exception)",
"return": "ResponseEntity<String>",
"signature": "ResponseEntity<String> handleException(@Nonnull final Exception exception)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@ExceptionHandler(Exception.class)\n public ResponseEntity<String> handleException(@Nonnull final Exception exception) {\n LOG.error(\"Internal server error\", exception);\n return new ResponseEntity<>(exception.getMessage(), INTERNAL_SERVER_ERROR);\n }",
"class_method_signature": "GlobalErrorHandler.handleException(@Nonnull final Exception exception)",
"constructor": false,
"full_signature": "@ExceptionHandler(Exception.class) public ResponseEntity<String> handleException(@Nonnull final Exception exception)",
"identifier": "handleException",
"invocations": [
"error",
"getMessage"
],
"modifiers": "@ExceptionHandler(Exception.class) public",
"parameters": "(@Nonnull final Exception exception)",
"return": "ResponseEntity<String>",
"signature": "ResponseEntity<String> handleException(@Nonnull final Exception exception)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
23996364_6 | {
"fields": [
{
"declarator": "ID = \"SJ\"",
"modifier": "private static final",
"original_string": "private static final String ID = \"SJ\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "LAST_NAME = \"Smith\"",
"modifier": "private static final",
"original_string": "private static final String LAST_NAME = \"Smith\";",
"type": "String",
"var_name": "LAST_NAME"
},
{
"declarator": "FIRST_NAME = \"John\"",
"modifier": "private static final",
"original_string": "private static final String FIRST_NAME = \"John\";",
"type": "String",
"var_name": "FIRST_NAME"
},
{
"declarator": "BIRTHDAY = of(2014, APRIL, 1)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY = of(2014, APRIL, 1);",
"type": "LocalDate",
"var_name": "BIRTHDAY"
},
{
"declarator": "BIRTHDAY_2 = of(2014, APRIL, 2)",
"modifier": "private static final",
"original_string": "private static final LocalDate BIRTHDAY_2 = of(2014, APRIL, 2);",
"type": "LocalDate",
"var_name": "BIRTHDAY_2"
},
{
"declarator": "person",
"modifier": "private",
"original_string": "private Person person;",
"type": "Person",
"var_name": "person"
},
{
"declarator": "other",
"modifier": "private",
"original_string": "private Person other;",
"type": "Person",
"var_name": "other"
}
],
"file": "prototype-app/src/test/java/com/ewerk/prototype/model/PersonTest.java",
"identifier": "PersonTest",
"interfaces": "",
"superclass": "extends AbstractUnitTest"
} | {
"body": "@Test\n public void testToString() {\n assertThat(person.toString()).isEqualTo(\n \"Person{id=SJ, lastName=Smith, firstName=John, birthday=2014-04-01}\");\n }",
"class_method_signature": "PersonTest.testToString()",
"constructor": false,
"full_signature": "@Test public void testToString()",
"identifier": "testToString",
"invocations": [
"isEqualTo",
"assertThat",
"toString"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testToString()",
"testcase": true
} | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n private",
"original_string": "@Id\n private String id;",
"type": "String",
"var_name": "id"
},
{
"declarator": "firstName",
"modifier": "private",
"original_string": "private String firstName;",
"type": "String",
"var_name": "firstName"
},
{
"declarator": "lastName",
"modifier": "@Indexed\n private",
"original_string": "@Indexed\n private String lastName;",
"type": "String",
"var_name": "lastName"
},
{
"declarator": "birthday",
"modifier": "@Indexed\n @DateTimeFormat(iso = DATE)\n private",
"original_string": "@Indexed\n @DateTimeFormat(iso = DATE)\n private LocalDate birthday;",
"type": "LocalDate",
"var_name": "birthday"
}
],
"file": "prototype-app/src/main/java/com/ewerk/prototype/model/Person.java",
"identifier": "Person",
"interfaces": "",
"methods": [
{
"class_method_signature": "Person.getId()",
"constructor": false,
"full_signature": "public String getId()",
"identifier": "getId",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getId()",
"testcase": false
},
{
"class_method_signature": "Person.setId(final String id)",
"constructor": false,
"full_signature": "public void setId(final String id)",
"identifier": "setId",
"modifiers": "public",
"parameters": "(final String id)",
"return": "void",
"signature": "void setId(final String id)",
"testcase": false
},
{
"class_method_signature": "Person.getFirstName()",
"constructor": false,
"full_signature": "public String getFirstName()",
"identifier": "getFirstName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getFirstName()",
"testcase": false
},
{
"class_method_signature": "Person.setFirstName(final String firstName)",
"constructor": false,
"full_signature": "public void setFirstName(final String firstName)",
"identifier": "setFirstName",
"modifiers": "public",
"parameters": "(final String firstName)",
"return": "void",
"signature": "void setFirstName(final String firstName)",
"testcase": false
},
{
"class_method_signature": "Person.getLastName()",
"constructor": false,
"full_signature": "public String getLastName()",
"identifier": "getLastName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getLastName()",
"testcase": false
},
{
"class_method_signature": "Person.setLastName(final String lastName)",
"constructor": false,
"full_signature": "public void setLastName(final String lastName)",
"identifier": "setLastName",
"modifiers": "public",
"parameters": "(final String lastName)",
"return": "void",
"signature": "void setLastName(final String lastName)",
"testcase": false
},
{
"class_method_signature": "Person.getBirthday()",
"constructor": false,
"full_signature": "public LocalDate getBirthday()",
"identifier": "getBirthday",
"modifiers": "public",
"parameters": "()",
"return": "LocalDate",
"signature": "LocalDate getBirthday()",
"testcase": false
},
{
"class_method_signature": "Person.setBirthday(final LocalDate birthday)",
"constructor": false,
"full_signature": "public void setBirthday(final LocalDate birthday)",
"identifier": "setBirthday",
"modifiers": "public",
"parameters": "(final LocalDate birthday)",
"return": "void",
"signature": "void setBirthday(final LocalDate birthday)",
"testcase": false
},
{
"class_method_signature": "Person.equals(final Object o)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public boolean equals(final Object o)",
"identifier": "equals",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferenceInEquals\") @Override public",
"parameters": "(final Object o)",
"return": "boolean",
"signature": "boolean equals(final Object o)",
"testcase": false
},
{
"class_method_signature": "Person.hashCode()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@SuppressWarnings(\"NonFinalFieldReferencedInHashCode\") @Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "Person.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public String toString() {\n return toStringHelper(this).add(\"id\", id)\n .add(\"lastName\", lastName)\n .add(\"firstName\", firstName)\n .add(\"birthday\", birthday)\n .toString();\n }",
"class_method_signature": "Person.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [
"toString",
"add",
"add",
"add",
"add",
"toStringHelper"
],
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23996364,
"size": 243,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/ewerk/sample_spring-boot-camel-mongo-jdk8"
} |
7767145_1 | {
"fields": [
{
"declarator": "LOGGER = Logger\n\t\t\t.getLogger(QuoteRepositoryTest.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOGGER = Logger\n\t\t\t.getLogger(QuoteRepositoryTest.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "DBNAME = \"odm\"",
"modifier": "private static final",
"original_string": "private static final String DBNAME = \"odm\";",
"type": "String",
"var_name": "DBNAME"
},
{
"declarator": "QUOTE_NUMBER = \"SomeNumberViaMorphia-001\"",
"modifier": "private static final",
"original_string": "private static final String QUOTE_NUMBER = \"SomeNumberViaMorphia-001\";",
"type": "String",
"var_name": "QUOTE_NUMBER"
},
{
"declarator": "mongo",
"modifier": "private",
"original_string": "private Mongo mongo;",
"type": "Mongo",
"var_name": "mongo"
},
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
},
{
"declarator": "quoteRepository",
"modifier": "private",
"original_string": "private QuoteRepository quoteRepository;",
"type": "QuoteRepository",
"var_name": "quoteRepository"
}
],
"file": "morphia/src/test/java/com/vizuri/mongo/odm/morphia/repository/QuoteRepositoryTest.java",
"identifier": "QuoteRepositoryTest",
"interfaces": "",
"superclass": "extends BasePersistenceTest"
} | {
"body": "@Test\n\tpublic void testDeleteQuote() {\n\t\tcountRecords();\n\t\tIterator<Quote> existingQuotes = quoteRepository.findByQuoteNumber(QUOTE_NUMBER);\n\t\t\n\t\twhile (existingQuotes.hasNext()) {\n\t\t\tquoteRepository.delete(existingQuotes.next());\n\t\t}\n\t\tcountRecords();\n\t}",
"class_method_signature": "QuoteRepositoryTest.testDeleteQuote()",
"constructor": false,
"full_signature": "@Test public void testDeleteQuote()",
"identifier": "testDeleteQuote",
"invocations": [
"countRecords",
"findByQuoteNumber",
"hasNext",
"delete",
"next",
"countRecords"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testDeleteQuote()",
"testcase": true
} | {
"fields": [],
"file": "morphia/src/main/java/com/vizuri/mongo/odm/morphia/repository/QuoteRepository.java",
"identifier": "QuoteRepository",
"interfaces": "",
"methods": [
{
"class_method_signature": "QuoteRepository.QuoteRepository(Mongo mongo, Morphia morphia, String dbName)",
"constructor": true,
"full_signature": "public QuoteRepository(Mongo mongo, Morphia morphia, String dbName)",
"identifier": "QuoteRepository",
"modifiers": "public",
"parameters": "(Mongo mongo, Morphia morphia, String dbName)",
"return": "",
"signature": " QuoteRepository(Mongo mongo, Morphia morphia, String dbName)",
"testcase": false
},
{
"class_method_signature": "QuoteRepository.findByQuoteNumber(String quoteNumber)",
"constructor": false,
"full_signature": "public Iterator<Quote> findByQuoteNumber(String quoteNumber)",
"identifier": "findByQuoteNumber",
"modifiers": "public",
"parameters": "(String quoteNumber)",
"return": "Iterator<Quote>",
"signature": "Iterator<Quote> findByQuoteNumber(String quoteNumber)",
"testcase": false
}
],
"superclass": "extends BasicDAO<Quote, ObjectId>"
} | {
"body": "public Iterator<Quote> findByQuoteNumber(String quoteNumber) {\n\t\tPattern regExp = Pattern.compile(quoteNumber + \".*\", Pattern.CASE_INSENSITIVE);\n return ds.find(entityClazz).filter(\"quoteNumber\", regExp).iterator();\t\n\t}",
"class_method_signature": "QuoteRepository.findByQuoteNumber(String quoteNumber)",
"constructor": false,
"full_signature": "public Iterator<Quote> findByQuoteNumber(String quoteNumber)",
"identifier": "findByQuoteNumber",
"invocations": [
"compile",
"iterator",
"filter",
"find"
],
"modifiers": "public",
"parameters": "(String quoteNumber)",
"return": "Iterator<Quote>",
"signature": "Iterator<Quote> findByQuoteNumber(String quoteNumber)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7767145,
"size": 255,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/Vizuri/mongo-odm"
} |
7767145_0 | {
"fields": [
{
"declarator": "LOGGER = Logger\n\t\t\t.getLogger(QuoteRepositoryTest.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOGGER = Logger\n\t\t\t.getLogger(QuoteRepositoryTest.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "DBNAME = \"odm\"",
"modifier": "private static final",
"original_string": "private static final String DBNAME = \"odm\";",
"type": "String",
"var_name": "DBNAME"
},
{
"declarator": "QUOTE_NUMBER = \"SomeNumberViaMorphia-001\"",
"modifier": "private static final",
"original_string": "private static final String QUOTE_NUMBER = \"SomeNumberViaMorphia-001\";",
"type": "String",
"var_name": "QUOTE_NUMBER"
},
{
"declarator": "mongo",
"modifier": "private",
"original_string": "private Mongo mongo;",
"type": "Mongo",
"var_name": "mongo"
},
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
},
{
"declarator": "quoteRepository",
"modifier": "private",
"original_string": "private QuoteRepository quoteRepository;",
"type": "QuoteRepository",
"var_name": "quoteRepository"
}
],
"file": "morphia/src/test/java/com/vizuri/mongo/odm/morphia/repository/QuoteRepositoryTest.java",
"identifier": "QuoteRepositoryTest",
"interfaces": "",
"superclass": "extends BasePersistenceTest"
} | {
"body": "@Test\n\tpublic void testFindByQuoteNumber() {\n\t\tIterator<Quote> existingQuotes = quoteRepository.findByQuoteNumber(QUOTE_NUMBER);\n\n\t\twhile( existingQuotes.hasNext()) {\n\t\t\tLOGGER.debug(\"Quote Found: \" + existingQuotes.next().toString());\n\t\t}\n\t}",
"class_method_signature": "QuoteRepositoryTest.testFindByQuoteNumber()",
"constructor": false,
"full_signature": "@Test public void testFindByQuoteNumber()",
"identifier": "testFindByQuoteNumber",
"invocations": [
"findByQuoteNumber",
"hasNext",
"debug",
"toString",
"next"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testFindByQuoteNumber()",
"testcase": true
} | {
"fields": [],
"file": "morphia/src/main/java/com/vizuri/mongo/odm/morphia/repository/QuoteRepository.java",
"identifier": "QuoteRepository",
"interfaces": "",
"methods": [
{
"class_method_signature": "QuoteRepository.QuoteRepository(Mongo mongo, Morphia morphia, String dbName)",
"constructor": true,
"full_signature": "public QuoteRepository(Mongo mongo, Morphia morphia, String dbName)",
"identifier": "QuoteRepository",
"modifiers": "public",
"parameters": "(Mongo mongo, Morphia morphia, String dbName)",
"return": "",
"signature": " QuoteRepository(Mongo mongo, Morphia morphia, String dbName)",
"testcase": false
},
{
"class_method_signature": "QuoteRepository.findByQuoteNumber(String quoteNumber)",
"constructor": false,
"full_signature": "public Iterator<Quote> findByQuoteNumber(String quoteNumber)",
"identifier": "findByQuoteNumber",
"modifiers": "public",
"parameters": "(String quoteNumber)",
"return": "Iterator<Quote>",
"signature": "Iterator<Quote> findByQuoteNumber(String quoteNumber)",
"testcase": false
}
],
"superclass": "extends BasicDAO<Quote, ObjectId>"
} | {
"body": "public Iterator<Quote> findByQuoteNumber(String quoteNumber) {\n\t\tPattern regExp = Pattern.compile(quoteNumber + \".*\", Pattern.CASE_INSENSITIVE);\n return ds.find(entityClazz).filter(\"quoteNumber\", regExp).iterator();\t\n\t}",
"class_method_signature": "QuoteRepository.findByQuoteNumber(String quoteNumber)",
"constructor": false,
"full_signature": "public Iterator<Quote> findByQuoteNumber(String quoteNumber)",
"identifier": "findByQuoteNumber",
"invocations": [
"compile",
"iterator",
"filter",
"find"
],
"modifiers": "public",
"parameters": "(String quoteNumber)",
"return": "Iterator<Quote>",
"signature": "Iterator<Quote> findByQuoteNumber(String quoteNumber)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7767145,
"size": 255,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/Vizuri/mongo-odm"
} |
7767145_4 | {
"fields": [
{
"declarator": "quoteService",
"modifier": "@EJB\n\tprivate",
"original_string": "@EJB\n\tprivate QuoteService quoteService;",
"type": "QuoteService",
"var_name": "quoteService"
},
{
"declarator": "productService",
"modifier": "@EJB\n\tprivate",
"original_string": "@EJB\n\tprivate ProductService productService;",
"type": "ProductService",
"var_name": "productService"
},
{
"declarator": "log",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Logger log;",
"type": "Logger",
"var_name": "log"
}
],
"file": "hibernate-ogm/src/test/java/com/vizuri/mongo/odm/hibernateogm/service/QuoteServiceTest.java",
"identifier": "QuoteServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testManyToOne() {\n\t\tQuote quote = new Quote();\n\t\tquote.setQuoteNumber(\"aqmany-1234-\" + (new Date()).getTime());\n\t\tquote.setQuoteVers(\"V\" + (new Date()).getTime());\n\t\t\n\t\ttry {\n\t\t\tquote.setShipping(\"Shipping!\");\n\t\t\t\n\t\t\tSet<LineItem> lineItems = new HashSet<LineItem>();\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tLineItem lineItem = new LineItem();\n\t\t\t\tlineItem.setCost(new BigDecimal(\"100\" + i));\n\t\t\t\tlineItem.setCustomDescription(\"Custom description \" + i);\n\t\t\t\tlineItem.setQuantity(i);\n\t\t\t\tlineItem.setProduct(productService.findById(String.valueOf(i)));\n\t\t\t\tlineItems.add(lineItem);\n\t\t\t}\n\t\t\tquote.setLineItems(lineItems);\n\t\t\tquoteService.createOrUpdate(quote);\n\t\t} catch (Exception ex) {\n\t\t\tlog.error(\"Could not persist quote: \", ex);\n\t\t}\n\t}",
"class_method_signature": "QuoteServiceTest.testManyToOne()",
"constructor": false,
"full_signature": "@Test public void testManyToOne()",
"identifier": "testManyToOne",
"invocations": [
"setQuoteNumber",
"getTime",
"setQuoteVers",
"getTime",
"setShipping",
"setCost",
"setCustomDescription",
"setQuantity",
"setProduct",
"findById",
"valueOf",
"add",
"setLineItems",
"createOrUpdate",
"error"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testManyToOne()",
"testcase": true
} | {
"fields": [
{
"declarator": "log",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Logger log;",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "em",
"modifier": "@PersistenceContext(unitName = \"vizuri-mongo-ogm\")\n\tprivate",
"original_string": "@PersistenceContext(unitName = \"vizuri-mongo-ogm\")\n\tprivate EntityManager em;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "lazyFEM",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Provider<FullTextEntityManager> lazyFEM;",
"type": "Provider<FullTextEntityManager>",
"var_name": "lazyFEM"
}
],
"file": "hibernate-ogm/src/main/java/com/vizuri/mongo/odm/hibernateogm/service/QuoteService.java",
"identifier": "QuoteService",
"interfaces": "",
"methods": [
{
"class_method_signature": "QuoteService.createOrUpdate(Quote quote)",
"constructor": false,
"full_signature": "public void createOrUpdate(Quote quote)",
"identifier": "createOrUpdate",
"modifiers": "public",
"parameters": "(Quote quote)",
"return": "void",
"signature": "void createOrUpdate(Quote quote)",
"testcase": false
},
{
"class_method_signature": "QuoteService.findQuotesByCriteria(String criteria)",
"constructor": false,
"full_signature": "public List<Quote> findQuotesByCriteria(String criteria)",
"identifier": "findQuotesByCriteria",
"modifiers": "public",
"parameters": "(String criteria)",
"return": "List<Quote>",
"signature": "List<Quote> findQuotesByCriteria(String criteria)",
"testcase": false
},
{
"class_method_signature": "QuoteService.findQuotesByCriteria(final SearchCriteria criteria)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") public List<Quote> findQuotesByCriteria(final SearchCriteria criteria)",
"identifier": "findQuotesByCriteria",
"modifiers": "@SuppressWarnings(\"unchecked\") public",
"parameters": "(final SearchCriteria criteria)",
"return": "List<Quote>",
"signature": "List<Quote> findQuotesByCriteria(final SearchCriteria criteria)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public void createOrUpdate(Quote quote) throws Exception {\n\t\tlog.info( \"Updating 1234-\" + quote.getQuoteNumber() + \" version \" + quote.getQuoteVers() + \" for potential: \" + quote.getPotentialId());\n\t\tString modifiedQuoteNumber = \"1234-\" + quote.getQuoteNumber(); // So we can fake a search for all\n\t\tquote.setQuoteNumber(modifiedQuoteNumber);\n\t\tem.persist( quote );\n\t}",
"class_method_signature": "QuoteService.createOrUpdate(Quote quote)",
"constructor": false,
"full_signature": "public void createOrUpdate(Quote quote)",
"identifier": "createOrUpdate",
"invocations": [
"info",
"getQuoteNumber",
"getQuoteVers",
"getPotentialId",
"getQuoteNumber",
"setQuoteNumber",
"persist"
],
"modifiers": "public",
"parameters": "(Quote quote)",
"return": "void",
"signature": "void createOrUpdate(Quote quote)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7767145,
"size": 255,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/Vizuri/mongo-odm"
} |
7767145_3 | {
"fields": [
{
"declarator": "quoteService",
"modifier": "@EJB\n\tprivate",
"original_string": "@EJB\n\tprivate QuoteService quoteService;",
"type": "QuoteService",
"var_name": "quoteService"
},
{
"declarator": "productService",
"modifier": "@EJB\n\tprivate",
"original_string": "@EJB\n\tprivate ProductService productService;",
"type": "ProductService",
"var_name": "productService"
},
{
"declarator": "log",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Logger log;",
"type": "Logger",
"var_name": "log"
}
],
"file": "hibernate-ogm/src/test/java/com/vizuri/mongo/odm/hibernateogm/service/QuoteServiceTest.java",
"identifier": "QuoteServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testSearchQuotes() {\n\t\tList<Quote> results = quoteService.findQuotesByCriteria(new SearchCriteria());\n\t\t\n\t\tlog.info(\"Found: \" + results.size() + \" quotes using blank search criteria.\");\n\t\t\n\t\tfor (Quote quote : results) { \n\t\t\tlog.info(\"Quote: \" + quote.toString());\n\t\t}\n\t\t\n\t}",
"class_method_signature": "QuoteServiceTest.testSearchQuotes()",
"constructor": false,
"full_signature": "@Test public void testSearchQuotes()",
"identifier": "testSearchQuotes",
"invocations": [
"findQuotesByCriteria",
"info",
"size",
"info",
"toString"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testSearchQuotes()",
"testcase": true
} | {
"fields": [
{
"declarator": "log",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Logger log;",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "em",
"modifier": "@PersistenceContext(unitName = \"vizuri-mongo-ogm\")\n\tprivate",
"original_string": "@PersistenceContext(unitName = \"vizuri-mongo-ogm\")\n\tprivate EntityManager em;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "lazyFEM",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Provider<FullTextEntityManager> lazyFEM;",
"type": "Provider<FullTextEntityManager>",
"var_name": "lazyFEM"
}
],
"file": "hibernate-ogm/src/main/java/com/vizuri/mongo/odm/hibernateogm/service/QuoteService.java",
"identifier": "QuoteService",
"interfaces": "",
"methods": [
{
"class_method_signature": "QuoteService.createOrUpdate(Quote quote)",
"constructor": false,
"full_signature": "public void createOrUpdate(Quote quote)",
"identifier": "createOrUpdate",
"modifiers": "public",
"parameters": "(Quote quote)",
"return": "void",
"signature": "void createOrUpdate(Quote quote)",
"testcase": false
},
{
"class_method_signature": "QuoteService.findQuotesByCriteria(String criteria)",
"constructor": false,
"full_signature": "public List<Quote> findQuotesByCriteria(String criteria)",
"identifier": "findQuotesByCriteria",
"modifiers": "public",
"parameters": "(String criteria)",
"return": "List<Quote>",
"signature": "List<Quote> findQuotesByCriteria(String criteria)",
"testcase": false
},
{
"class_method_signature": "QuoteService.findQuotesByCriteria(final SearchCriteria criteria)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") public List<Quote> findQuotesByCriteria(final SearchCriteria criteria)",
"identifier": "findQuotesByCriteria",
"modifiers": "@SuppressWarnings(\"unchecked\") public",
"parameters": "(final SearchCriteria criteria)",
"return": "List<Quote>",
"signature": "List<Quote> findQuotesByCriteria(final SearchCriteria criteria)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public List<Quote> findQuotesByCriteria(String criteria) {\n\t\ttry {\n\t\t\tSearchCriteria searchCriteria = new SearchCriteria();\n\t\t\tsearchCriteria.setQuery(criteria);\n\t\t\treturn findQuotesByCriteria(searchCriteria);\n\t\t} catch (EntityNotFoundException enfe) {\n\t\t\tlog.info(\"Look ma, no results for: \" + criteria);\n\t\t}\n\t\treturn Collections.emptyList();\n\t}",
"class_method_signature": "QuoteService.findQuotesByCriteria(String criteria)",
"constructor": false,
"full_signature": "public List<Quote> findQuotesByCriteria(String criteria)",
"identifier": "findQuotesByCriteria",
"invocations": [
"setQuery",
"findQuotesByCriteria",
"info",
"emptyList"
],
"modifiers": "public",
"parameters": "(String criteria)",
"return": "List<Quote>",
"signature": "List<Quote> findQuotesByCriteria(String criteria)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7767145,
"size": 255,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/Vizuri/mongo-odm"
} |
7767145_2 | {
"fields": [
{
"declarator": "quoteService",
"modifier": "@EJB\n\tprivate",
"original_string": "@EJB\n\tprivate QuoteService quoteService;",
"type": "QuoteService",
"var_name": "quoteService"
},
{
"declarator": "productService",
"modifier": "@EJB\n\tprivate",
"original_string": "@EJB\n\tprivate ProductService productService;",
"type": "ProductService",
"var_name": "productService"
},
{
"declarator": "log",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Logger log;",
"type": "Logger",
"var_name": "log"
}
],
"file": "hibernate-ogm/src/test/java/com/vizuri/mongo/odm/hibernateogm/service/QuoteServiceTest.java",
"identifier": "QuoteServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testQuotePersist() {\n\t\tQuote quote = new Quote();\n\t\tquote.setQuoteNumber(\"arquillian-1234-\" + (new Date()).getTime());\n\t\tquote.setQuoteVers(\"V\" + (new Date()).getTime());\n\t\t\n\t\ttry {\n\t\t\tquote.setShipping(\"Shipping!\");\n\t\t\tquoteService.createOrUpdate(quote);\n\t\t} catch (Exception ex) {\n\t\t\tlog.error(\"Could not persist quote: \", ex);\n\t\t}\n\t}",
"class_method_signature": "QuoteServiceTest.testQuotePersist()",
"constructor": false,
"full_signature": "@Test public void testQuotePersist()",
"identifier": "testQuotePersist",
"invocations": [
"setQuoteNumber",
"getTime",
"setQuoteVers",
"getTime",
"setShipping",
"createOrUpdate",
"error"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testQuotePersist()",
"testcase": true
} | {
"fields": [
{
"declarator": "log",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Logger log;",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "em",
"modifier": "@PersistenceContext(unitName = \"vizuri-mongo-ogm\")\n\tprivate",
"original_string": "@PersistenceContext(unitName = \"vizuri-mongo-ogm\")\n\tprivate EntityManager em;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "lazyFEM",
"modifier": "@Inject\n\tprivate",
"original_string": "@Inject\n\tprivate Provider<FullTextEntityManager> lazyFEM;",
"type": "Provider<FullTextEntityManager>",
"var_name": "lazyFEM"
}
],
"file": "hibernate-ogm/src/main/java/com/vizuri/mongo/odm/hibernateogm/service/QuoteService.java",
"identifier": "QuoteService",
"interfaces": "",
"methods": [
{
"class_method_signature": "QuoteService.createOrUpdate(Quote quote)",
"constructor": false,
"full_signature": "public void createOrUpdate(Quote quote)",
"identifier": "createOrUpdate",
"modifiers": "public",
"parameters": "(Quote quote)",
"return": "void",
"signature": "void createOrUpdate(Quote quote)",
"testcase": false
},
{
"class_method_signature": "QuoteService.findQuotesByCriteria(String criteria)",
"constructor": false,
"full_signature": "public List<Quote> findQuotesByCriteria(String criteria)",
"identifier": "findQuotesByCriteria",
"modifiers": "public",
"parameters": "(String criteria)",
"return": "List<Quote>",
"signature": "List<Quote> findQuotesByCriteria(String criteria)",
"testcase": false
},
{
"class_method_signature": "QuoteService.findQuotesByCriteria(final SearchCriteria criteria)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") public List<Quote> findQuotesByCriteria(final SearchCriteria criteria)",
"identifier": "findQuotesByCriteria",
"modifiers": "@SuppressWarnings(\"unchecked\") public",
"parameters": "(final SearchCriteria criteria)",
"return": "List<Quote>",
"signature": "List<Quote> findQuotesByCriteria(final SearchCriteria criteria)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public void createOrUpdate(Quote quote) throws Exception {\n\t\tlog.info( \"Updating 1234-\" + quote.getQuoteNumber() + \" version \" + quote.getQuoteVers() + \" for potential: \" + quote.getPotentialId());\n\t\tString modifiedQuoteNumber = \"1234-\" + quote.getQuoteNumber(); // So we can fake a search for all\n\t\tquote.setQuoteNumber(modifiedQuoteNumber);\n\t\tem.persist( quote );\n\t}",
"class_method_signature": "QuoteService.createOrUpdate(Quote quote)",
"constructor": false,
"full_signature": "public void createOrUpdate(Quote quote)",
"identifier": "createOrUpdate",
"invocations": [
"info",
"getQuoteNumber",
"getQuoteVers",
"getPotentialId",
"getQuoteNumber",
"setQuoteNumber",
"persist"
],
"modifiers": "public",
"parameters": "(Quote quote)",
"return": "void",
"signature": "void createOrUpdate(Quote quote)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7767145,
"size": 255,
"stargazer_count": 15,
"stars": null,
"updates": null,
"url": "https://github.com/Vizuri/mongo-odm"
} |
149732116_0 | {
"fields": [
{
"declarator": "dynamicConfigurationService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private DynamicConfigurationService dynamicConfigurationService;",
"type": "DynamicConfigurationService",
"var_name": "dynamicConfigurationService"
},
{
"declarator": "applicationProperties = new ApplicationProperties()",
"modifier": "private final",
"original_string": "private final ApplicationProperties applicationProperties = new ApplicationProperties();",
"type": "ApplicationProperties",
"var_name": "applicationProperties"
},
{
"declarator": "holidaysService = new HolidaysService()",
"modifier": "private final",
"original_string": "private final HolidaysService holidaysService = new HolidaysService();",
"type": "HolidaysService",
"var_name": "holidaysService"
},
{
"declarator": "openingHoursService = new OpeningHoursService(applicationProperties)",
"modifier": "private final",
"original_string": "private final OpeningHoursService openingHoursService = new OpeningHoursService(applicationProperties);",
"type": "OpeningHoursService",
"var_name": "openingHoursService"
},
{
"declarator": "shopService",
"modifier": "private",
"original_string": "private ShopService shopService;",
"type": "ShopService",
"var_name": "shopService"
}
],
"file": "backend/src/test/java/ch/puzzle/ln/zeus/service/ShopServiceTest.java",
"identifier": "ShopServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldGetDelayMinutes() {\n //when\n List<Integer> delayMinutes = shopService.getDelayMinutes();\n\n //then\n assertTrue(delayMinutes.size() > 0);\n }",
"class_method_signature": "ShopServiceTest.shouldGetDelayMinutes()",
"constructor": false,
"full_signature": "@Test public void shouldGetDelayMinutes()",
"identifier": "shouldGetDelayMinutes",
"invocations": [
"getDelayMinutes",
"assertTrue",
"size"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void shouldGetDelayMinutes()",
"testcase": true
} | {
"fields": [
{
"declarator": "DELAY_INTERVAL_MINUTES = 15",
"modifier": "private static final",
"original_string": "private static final int DELAY_INTERVAL_MINUTES = 15;",
"type": "int",
"var_name": "DELAY_INTERVAL_MINUTES"
},
{
"declarator": "MAX_INTERVAL_PERIODS = 4 * 10",
"modifier": "private static final",
"original_string": "private static final int MAX_INTERVAL_PERIODS = 4 * 10;",
"type": "int",
"var_name": "MAX_INTERVAL_PERIODS"
},
{
"declarator": "dynamicConfigurationService",
"modifier": "private final",
"original_string": "private final DynamicConfigurationService dynamicConfigurationService;",
"type": "DynamicConfigurationService",
"var_name": "dynamicConfigurationService"
},
{
"declarator": "holidaysService",
"modifier": "private final",
"original_string": "private final HolidaysService holidaysService;",
"type": "HolidaysService",
"var_name": "holidaysService"
},
{
"declarator": "openingHoursService",
"modifier": "private final",
"original_string": "private final OpeningHoursService openingHoursService;",
"type": "OpeningHoursService",
"var_name": "openingHoursService"
}
],
"file": "backend/src/main/java/ch/puzzle/ln/zeus/service/ShopService.java",
"identifier": "ShopService",
"interfaces": "",
"methods": [
{
"class_method_signature": "ShopService.ShopService(DynamicConfigurationService dynamicConfigurationService, HolidaysService holidaysService, OpeningHoursService openingHoursService)",
"constructor": true,
"full_signature": "public ShopService(DynamicConfigurationService dynamicConfigurationService, HolidaysService holidaysService, OpeningHoursService openingHoursService)",
"identifier": "ShopService",
"modifiers": "public",
"parameters": "(DynamicConfigurationService dynamicConfigurationService, HolidaysService holidaysService, OpeningHoursService openingHoursService)",
"return": "",
"signature": " ShopService(DynamicConfigurationService dynamicConfigurationService, HolidaysService holidaysService, OpeningHoursService openingHoursService)",
"testcase": false
},
{
"class_method_signature": "ShopService.isClosed()",
"constructor": false,
"full_signature": "public boolean isClosed()",
"identifier": "isClosed",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isClosed()",
"testcase": false
},
{
"class_method_signature": "ShopService.isDisabled()",
"constructor": false,
"full_signature": "public boolean isDisabled()",
"identifier": "isDisabled",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isDisabled()",
"testcase": false
},
{
"class_method_signature": "ShopService.areOpeningHoursOverridden()",
"constructor": false,
"full_signature": "public boolean areOpeningHoursOverridden()",
"identifier": "areOpeningHoursOverridden",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean areOpeningHoursOverridden()",
"testcase": false
},
{
"class_method_signature": "ShopService.isShopOpenInMinutes(int delayMinutes)",
"constructor": false,
"full_signature": "public boolean isShopOpenInMinutes(int delayMinutes)",
"identifier": "isShopOpenInMinutes",
"modifiers": "public",
"parameters": "(int delayMinutes)",
"return": "boolean",
"signature": "boolean isShopOpenInMinutes(int delayMinutes)",
"testcase": false
},
{
"class_method_signature": "ShopService.getDelayMinutes()",
"constructor": false,
"full_signature": "public List<Integer> getDelayMinutes()",
"identifier": "getDelayMinutes",
"modifiers": "public",
"parameters": "()",
"return": "List<Integer>",
"signature": "List<Integer> getDelayMinutes()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public List<Integer> getDelayMinutes() {\n return IntStream.range(0, MAX_INTERVAL_PERIODS)\n .map(period -> (period + 1) * DELAY_INTERVAL_MINUTES)\n .filter(this::isShopOpenInMinutes)\n .boxed()\n .collect(Collectors.toList());\n }",
"class_method_signature": "ShopService.getDelayMinutes()",
"constructor": false,
"full_signature": "public List<Integer> getDelayMinutes()",
"identifier": "getDelayMinutes",
"invocations": [
"collect",
"boxed",
"filter",
"map",
"range",
"toList"
],
"modifiers": "public",
"parameters": "()",
"return": "List<Integer>",
"signature": "List<Integer> getDelayMinutes()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 149732116,
"size": 5708,
"stargazer_count": 16,
"stars": null,
"updates": null,
"url": "https://github.com/puzzle/zeus"
} |
17488986_46 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOverlapsDateLine() {\n\n\n // ________________\n // | | |\n // |** | **|\n // |-*----+-----*-|\n // |** | **|\n // | | |\n // ----------------\n //box is notated as *\n //test area is notated as ?\n BoundingBox box = new BoundingBox(45, -178, -45, 178);\n Assert.assertTrue(box.overlaps(box, 4));\n\n // ________________\n // | | |\n // |** | ?? **|\n // |-*----+-----*-|\n // |** | **|\n // | | |\n // ----------------\n //box is notated as *\n //test area is notated as ?\n BoundingBox farAway = new BoundingBox(45, 45, 44, 44);\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n\n // ________________\n // | | |\n // |** | ? **|\n // |-*----+-----*-|\n // |** | **|\n // | | |\n // ----------------\n //box is notated as *\n //test area is notated as ?\n farAway = new BoundingBox(1, 45, 1, 44);\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n\n // ________________\n // | | |\n // |** ?|? **|\n // |-*---?+?----*-|\n // |** ?|? **|\n // | | |\n // ----------------\n //box is notated as *\n //test area is notated as ?\n farAway = new BoundingBox(2, 2, -2, -2);\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n farAway = new BoundingBox(0.5, 0.5, -0.5, -0.5);\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n farAway = new BoundingBox(1, -179, -1, 179);\n Assert.assertTrue(box.overlaps(farAway, 4));\n }",
"class_method_signature": "BoundingBoxTest.testOverlapsDateLine()",
"constructor": false,
"full_signature": "@Test public void testOverlapsDateLine()",
"identifier": "testOverlapsDateLine",
"invocations": [
"assertTrue",
"overlaps",
"assertFalse",
"overlaps",
"assertFalse",
"overlaps",
"assertFalse",
"overlaps",
"assertFalse",
"overlaps",
"assertTrue",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOverlapsDateLine()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_11 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileListBorderComputerTest.java",
"identifier": "MapTileListBorderComputerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOnePointModulo() {\n final MapTileList source = new MapTileList();\n final MapTileList dest = new MapTileList();\n final Set<Long> set = new HashSet<>();\n final int border = 2;\n final MapTileListBorderComputer computer = new MapTileListBorderComputer(border, false);\n final int zoom = 5;\n final int sourceX = 1;\n final int sourceY = 31;\n source.put(MapTileIndex.getTileIndex(zoom, sourceX, sourceY));\n add(set, zoom, sourceX, sourceY, border);\n set.remove(MapTileIndex.getTileIndex(zoom, sourceX, sourceY));\n computer.computeFromSource(source, dest);\n check(dest, set, zoom);\n }",
"class_method_signature": "MapTileListBorderComputerTest.testOnePointModulo()",
"constructor": false,
"full_signature": "@Test public void testOnePointModulo()",
"identifier": "testOnePointModulo",
"invocations": [
"put",
"getTileIndex",
"add",
"remove",
"getTileIndex",
"computeFromSource",
"check"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOnePointModulo()",
"testcase": true
} | {
"fields": [
{
"declarator": "mBorder",
"modifier": "private final",
"original_string": "private final int mBorder;",
"type": "int",
"var_name": "mBorder"
},
{
"declarator": "mIncludeAll",
"modifier": "private final",
"original_string": "private final boolean mIncludeAll;",
"type": "boolean",
"var_name": "mIncludeAll"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileListBorderComputer.java",
"identifier": "MapTileListBorderComputer",
"interfaces": "implements MapTileListComputer",
"methods": [
{
"class_method_signature": "MapTileListBorderComputer.MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"constructor": true,
"full_signature": "public MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"identifier": "MapTileListBorderComputer",
"modifiers": "public",
"parameters": "(final int pBorder, final boolean pIncludeAll)",
"return": "",
"signature": " MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.getBorder()",
"constructor": false,
"full_signature": "public int getBorder()",
"identifier": "getBorder",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBorder()",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.isIncludeAll()",
"constructor": false,
"full_signature": "public boolean isIncludeAll()",
"identifier": "isIncludeAll",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isIncludeAll()",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"identifier": "computeFromSource",
"modifiers": "@Override public",
"parameters": "(final MapTileList pSource, final MapTileList pReuse)",
"return": "MapTileList",
"signature": "MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse) {\n final MapTileList out = pReuse != null ? pReuse : new MapTileList();\n for (int i = 0 ; i < pSource.getSize() ; i ++) {\n final long sourceIndex = pSource.get(i);\n final int zoom = MapTileIndex.getZoom(sourceIndex);\n final int sourceX = MapTileIndex.getX(sourceIndex);\n final int sourceY = MapTileIndex.getY(sourceIndex);\n final int power = 1 << zoom;\n for (int j = -mBorder ; j <= mBorder ; j ++) {\n for (int k = -mBorder ; k <= mBorder ; k ++) {\n int destX = sourceX + j;\n int destY = sourceY + k;\n while (destX < 0) {\n destX += power;\n }\n while (destY < 0) {\n destY += power;\n }\n while (destX >= power) {\n destX -= power;\n }\n while (destY >= power) {\n destY -= power;\n }\n final long index = MapTileIndex.getTileIndex(zoom, destX, destY);\n if (out.contains(index)) {\n continue;\n }\n if (pSource.contains(index) && !mIncludeAll) {\n continue;\n }\n out.put(index);\n }\n }\n }\n return out;\n }",
"class_method_signature": "MapTileListBorderComputer.computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"identifier": "computeFromSource",
"invocations": [
"getSize",
"get",
"getZoom",
"getX",
"getY",
"getTileIndex",
"contains",
"contains",
"put"
],
"modifiers": "@Override public",
"parameters": "(final MapTileList pSource, final MapTileList pReuse)",
"return": "MapTileList",
"signature": "MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_50 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNorthernBoundsSimple() {\n //item's southern bounds of itemis just out of view\n BoundingBox view = new BoundingBox(2, 2, -2, -2);\n\n BoundingBox item = new BoundingBox(2.1, 2, 0, -2);\n Assert.assertTrue(view.overlaps(item, 4));\n\n\n item = new BoundingBox(2.1, 2, 1.9, -2);\n Assert.assertTrue(view.overlaps(item, 4));\n\n item = new BoundingBox(3.1, 2, 1.999999999, -2);\n Assert.assertTrue(view.overlaps(item, 4));\n\n item = new BoundingBox(3.1, 2, 2.0, -2);\n Assert.assertTrue(view.overlaps(item, 4));\n\n item = new BoundingBox(3.1, 2, 2.1, -2);\n Assert.assertFalse(view.overlaps(item, 4));\n }",
"class_method_signature": "BoundingBoxTest.testNorthernBoundsSimple()",
"constructor": false,
"full_signature": "@Test public void testNorthernBoundsSimple()",
"identifier": "testNorthernBoundsSimple",
"invocations": [
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertFalse",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testNorthernBoundsSimple()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_0 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "XY01Delta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double XY01Delta = 1E-10;",
"type": "double",
"var_name": "XY01Delta"
},
{
"declarator": "latLongDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double latLongDelta = 1E-10;",
"type": "double",
"var_name": "latLongDelta"
},
{
"declarator": "mMinZoomLevel = 0",
"modifier": "private static final",
"original_string": "private static final int mMinZoomLevel = 0;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel = TileSystem.getMaximumZoomLevel()",
"modifier": "private static final",
"original_string": "private static final int mMaxZoomLevel = TileSystem.getMaximumZoomLevel();",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/TileSystemTest.java",
"identifier": "TileSystemTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetY01FromLatitude() {\n checkXY01(0, tileSystem.getY01FromLatitude(tileSystem.getMaxLatitude(), true));\n checkXY01(.5, tileSystem.getY01FromLatitude(0, true));\n checkXY01(1, tileSystem.getY01FromLatitude(tileSystem.getMinLatitude(), true));\n }",
"class_method_signature": "TileSystemTest.testGetY01FromLatitude()",
"constructor": false,
"full_signature": "@Test public void testGetY01FromLatitude()",
"identifier": "testGetY01FromLatitude",
"invocations": [
"checkXY01",
"getY01FromLatitude",
"getMaxLatitude",
"checkXY01",
"getY01FromLatitude",
"checkXY01",
"getY01FromLatitude",
"getMinLatitude"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetY01FromLatitude()",
"testcase": true
} | {
"fields": [
{
"declarator": "EarthRadius = GeoConstants.RADIUS_EARTH_METERS",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double EarthRadius = GeoConstants.RADIUS_EARTH_METERS;",
"type": "double",
"var_name": "EarthRadius"
},
{
"declarator": "MinLatitude = -85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLatitude = -85.05112877980659;",
"type": "double",
"var_name": "MinLatitude"
},
{
"declarator": "MaxLatitude = 85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLatitude = 85.05112877980659;",
"type": "double",
"var_name": "MaxLatitude"
},
{
"declarator": "MinLongitude = -180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLongitude = -180d;",
"type": "double",
"var_name": "MinLongitude"
},
{
"declarator": "MaxLongitude = 180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLongitude = 180d;",
"type": "double",
"var_name": "MaxLongitude"
},
{
"declarator": "mTileSize = 256",
"modifier": "private static",
"original_string": "private static int mTileSize = 256;",
"type": "int",
"var_name": "mTileSize"
},
{
"declarator": "primaryKeyMaxZoomLevel = 29",
"modifier": "public static final",
"original_string": "public static final int primaryKeyMaxZoomLevel = 29;",
"type": "int",
"var_name": "primaryKeyMaxZoomLevel"
},
{
"declarator": "projectionZoomLevel = primaryKeyMaxZoomLevel + 1",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final int projectionZoomLevel = primaryKeyMaxZoomLevel + 1;",
"type": "int",
"var_name": "projectionZoomLevel"
},
{
"declarator": "mMaxZoomLevel = primaryKeyMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mMaxZoomLevel = primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java",
"identifier": "TileSystem",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSystem.setTileSize(final int tileSize)",
"constructor": false,
"full_signature": "public static void setTileSize(final int tileSize)",
"identifier": "setTileSize",
"modifiers": "public static",
"parameters": "(final int tileSize)",
"return": "void",
"signature": "void setTileSize(final int tileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize()",
"constructor": false,
"full_signature": "public static int getTileSize()",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getTileSize()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaximumZoomLevel()",
"constructor": false,
"full_signature": "public static int getMaximumZoomLevel()",
"identifier": "getMaximumZoomLevel",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getMaximumZoomLevel()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getTileSize(final double pZoomLevel)",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getTileSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getInputTileZoomLevel(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static int getInputTileZoomLevel(final double pZoomLevel)",
"identifier": "getInputTileZoomLevel",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "int",
"signature": "int getInputTileZoomLevel(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double MapSize(final double pZoomLevel)",
"identifier": "MapSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double MapSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getFactor(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getFactor(final double pZoomLevel)",
"identifier": "getFactor",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getFactor(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final double zoomLevel)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final double zoomLevel)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final double zoomLevel)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final double zoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolutionMapSize(double latitude, final double mapSize)",
"constructor": false,
"full_signature": "public static double GroundResolutionMapSize(double latitude, final double mapSize)",
"identifier": "GroundResolutionMapSize",
"modifiers": "public static",
"parameters": "(double latitude, final double mapSize)",
"return": "double",
"signature": "double GroundResolutionMapSize(double latitude, final double mapSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"return": "Point",
"signature": "Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"identifier": "LatLongToPixelXYMapSize",
"modifiers": "@Deprecated public",
"parameters": "(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongWithoutWrap",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude)",
"constructor": false,
"full_signature": "abstract public double getX01FromLongitude(double longitude)",
"identifier": "getX01FromLongitude",
"modifiers": "abstract public",
"parameters": "(double longitude)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "abstract public double getY01FromLatitude(final double pLatitude)",
"identifier": "getY01FromLatitude",
"modifiers": "abstract public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double getY01FromLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"identifier": "PixelXYToLatLongMapSize",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongMapSizeWithoutWrap",
"modifiers": "public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final double n, final double minValue, final double maxValue)",
"constructor": false,
"full_signature": "public static double Clip(final double n, final double minValue, final double maxValue)",
"identifier": "Clip",
"modifiers": "public static",
"parameters": "(final double n, final double minValue, final double maxValue)",
"return": "double",
"signature": "double Clip(final double n, final double minValue, final double maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY, final Point reuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final Rect rect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int tileX, final int tileY, final Point reuse)",
"return": "Point",
"signature": "Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"return": "PointL",
"signature": "PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"identifier": "TileXYToQuadKey",
"modifiers": "public static",
"parameters": "(final int tileX, final int tileY, final int levelOfDetail)",
"return": "String",
"signature": "String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.QuadKeyToTileXY(final String quadKey, final Point reuse)",
"constructor": false,
"full_signature": "public static Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"identifier": "QuadKeyToTileXY",
"modifiers": "public static",
"parameters": "(final String quadKey, final Point reuse)",
"return": "Point",
"signature": "Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"constructor": false,
"full_signature": "public double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"identifier": "getLongitudeZoom",
"modifiers": "public",
"parameters": "(final double pEast, final double pWest, final int pScreenWidth)",
"return": "double",
"signature": "double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"identifier": "getLatitudeZoom",
"modifiers": "public",
"parameters": "(final double pNorth, final double pSouth, final int pScreenHeight)",
"return": "double",
"signature": "double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.wrap(double n, final double minValue, final double maxValue, final double interval)",
"constructor": false,
"full_signature": "private static double wrap(double n, final double minValue, final double maxValue, final double interval)",
"identifier": "wrap",
"modifiers": "private static",
"parameters": "(double n, final double minValue, final double maxValue, final double interval)",
"return": "double",
"signature": "double wrap(double n, final double minValue, final double maxValue, final double interval)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorFromXY01",
"modifiers": "public",
"parameters": "(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01)",
"constructor": false,
"full_signature": "abstract public double getLatitudeFromY01(final double pY01)",
"identifier": "getLatitudeFromY01",
"modifiers": "abstract public",
"parameters": "(final double pY01)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01)",
"constructor": false,
"full_signature": "abstract public double getLongitudeFromX01(final double pX01)",
"identifier": "getLongitudeFromX01",
"modifiers": "abstract public",
"parameters": "(final double pX01)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"identifier": "getCleanMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"constructor": false,
"full_signature": "public static long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"identifier": "ClipToLong",
"modifiers": "public static",
"parameters": "(final double pValue, final double pMax, final boolean pWrapEnabled)",
"return": "long",
"signature": "long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final long n, final long minValue, final long maxValue)",
"constructor": false,
"full_signature": "@Deprecated public static long Clip(final long n, final long minValue, final long maxValue)",
"identifier": "Clip",
"modifiers": "@Deprecated public static",
"parameters": "(final long n, final long minValue, final long maxValue)",
"return": "long",
"signature": "long Clip(final long n, final long minValue, final long maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.truncateToInt(final long value)",
"constructor": false,
"full_signature": "public static int truncateToInt(final long value)",
"identifier": "truncateToInt",
"modifiers": "public static",
"parameters": "(final long value)",
"return": "int",
"signature": "int truncateToInt(final long value)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"identifier": "getMercatorFromGeo",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"return": "PointL",
"signature": "PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "public GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"identifier": "getGeoFromMercator",
"modifiers": "public",
"parameters": "(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"identifier": "getXY01FromMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"return": "double",
"signature": "double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLongitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLongitude(final double pRandom01)",
"identifier": "getRandomLongitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLongitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01, final double pMinLatitude)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final long pMercator, final double pTileSize)",
"constructor": false,
"full_signature": "public static int getTileFromMercator(final long pMercator, final double pTileSize)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final long pMercator, final double pTileSize)",
"return": "int",
"signature": "int getTileFromMercator(final long pMercator, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromTile(final int pTile, final double pTileSize)",
"constructor": false,
"full_signature": "public static long getMercatorFromTile(final int pTile, final double pTileSize)",
"identifier": "getMercatorFromTile",
"modifiers": "public static",
"parameters": "(final int pTile, final double pTileSize)",
"return": "long",
"signature": "long getMercatorFromTile(final int pTile, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLatitude()",
"constructor": false,
"full_signature": "abstract public double getMinLatitude()",
"identifier": "getMinLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLatitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLatitude()",
"identifier": "getMaxLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLongitude()",
"constructor": false,
"full_signature": "abstract public double getMinLongitude()",
"identifier": "getMinLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLongitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLongitude()",
"identifier": "getMaxLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public double cleanLongitude(final double pLongitude)",
"identifier": "cleanLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "double",
"signature": "double cleanLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public double cleanLatitude(final double pLatitude)",
"identifier": "cleanLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double cleanLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public boolean isValidLongitude(final double pLongitude)",
"identifier": "isValidLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "boolean",
"signature": "boolean isValidLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public boolean isValidLatitude(final double pLatitude)",
"identifier": "isValidLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "boolean",
"signature": "boolean isValidLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLongitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLongitudeSpan()",
"identifier": "toStringLongitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLatitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLatitudeSpan()",
"identifier": "toStringLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileXFromLongitude(final double pLongitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"identifier": "getTileXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final int pZoom)",
"return": "int",
"signature": "int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileYFromLatitude(final double pLatitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"identifier": "getTileYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final int pZoom)",
"return": "int",
"signature": "int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromTileY(final int pY, final int pZoom)",
"constructor": false,
"full_signature": "public double getLatitudeFromTileY(final int pY, final int pZoom)",
"identifier": "getLatitudeFromTileY",
"modifiers": "public",
"parameters": "(final int pY, final int pZoom)",
"return": "double",
"signature": "double getLatitudeFromTileY(final int pY, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromTileX(final int pX, final int pZoom)",
"constructor": false,
"full_signature": "public double getLongitudeFromTileX(final int pX, final int pZoom)",
"identifier": "getLongitudeFromTileX",
"modifiers": "public",
"parameters": "(final int pX, final int pZoom)",
"return": "double",
"signature": "double getLongitudeFromTileX(final int pX, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.clipTile(final int pTile, final int pZoom)",
"constructor": false,
"full_signature": "private int clipTile(final int pTile, final int pZoom)",
"identifier": "clipTile",
"modifiers": "private",
"parameters": "(final int pTile, final int pZoom)",
"return": "int",
"signature": "int clipTile(final int pTile, final int pZoom)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double getY01FromLatitude(double latitude, boolean wrapEnabled) {\n\t\tlatitude = wrapEnabled ? Clip(latitude, getMinLatitude(), getMaxLatitude()) : latitude;\n\t\tfinal double result = getY01FromLatitude(latitude);\n\t\treturn wrapEnabled ? Clip(result, 0, 1) : result;\n\t}",
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"invocations": [
"Clip",
"getMinLatitude",
"getMaxLatitude",
"getY01FromLatitude",
"Clip"
],
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_27 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_distanceTo_itself() {\n\t\tfinal double distancePrecisionDelta = 0;\n\t\tfinal int iterations = 100;\n\t\tfor (int i = 0 ; i < iterations ; i ++) {\n\t\t\tfinal GeoPoint target = new GeoPoint(getRandomLatitude(), getRandomLongitude());\n\t\t\tfinal GeoPoint other = new GeoPoint(target);\n\t\t\tassertEquals(\"distance to self is zero for \" + target, 0, target.distanceToAsDouble(other), distancePrecisionDelta);\n\t\t\tassertEquals(\"reverse distance to self is zero for \" + other, 0, other.distanceToAsDouble(target), distancePrecisionDelta);\n\t\t}\n\t}",
"class_method_signature": "GeoPointTest.test_distanceTo_itself()",
"constructor": false,
"full_signature": "@Test public void test_distanceTo_itself()",
"identifier": "test_distanceTo_itself",
"invocations": [
"getRandomLatitude",
"getRandomLongitude",
"assertEquals",
"distanceToAsDouble",
"assertEquals",
"distanceToAsDouble"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_distanceTo_itself()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double distanceToAsDouble(final IGeoPoint other) {\n\t\tfinal double lat1 = DEG2RAD * getLatitude();\n\t\tfinal double lat2 = DEG2RAD * other.getLatitude();\n\t\tfinal double lon1 = DEG2RAD * getLongitude();\n\t\tfinal double lon2 = DEG2RAD * other.getLongitude();\n\t\treturn RADIUS_EARTH_METERS * 2 * Math.asin(Math.min(1, Math.sqrt(\n\t\t\t\tMath.pow(Math.sin((lat2 - lat1) / 2), 2)\n\t\t\t\t+ Math.cos(lat1) * Math.cos(lat2)\n\t\t\t\t* Math.pow(Math.sin((lon2 - lon1) / 2), 2)\n\t\t)));\n\t}",
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"invocations": [
"getLatitude",
"getLatitude",
"getLongitude",
"getLongitude",
"asin",
"min",
"sqrt",
"pow",
"sin",
"cos",
"cos",
"pow",
"sin"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_66 | {
"fields": [
{
"declarator": "mCacheControlValue = 172800",
"modifier": "private final",
"original_string": "private final long mCacheControlValue = 172800;",
"type": "long",
"var_name": "mCacheControlValue"
},
{
"declarator": "mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"};",
"type": "String[]",
"var_name": "mCacheControlStringOK"
},
{
"declarator": "mCacheControlStringKO = {\"max-age=, public\", \"public\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringKO = {\"max-age=, public\", \"public\"};",
"type": "String[]",
"var_name": "mCacheControlStringKO"
},
{
"declarator": "mExpiresValue = 1539971220000L",
"modifier": "private final",
"original_string": "private final long mExpiresValue = 1539971220000L;",
"type": "long",
"var_name": "mExpiresValue"
},
{
"declarator": "mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringOK"
},
{
"declarator": "mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringKO"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicyTest.java",
"identifier": "TileSourcePolicyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetHttpCacheControlDuration(){\n final TileSourcePolicy tileSourcePolicy = new TileSourcePolicy();\n for (final String string : mCacheControlStringOK) {\n Assert.assertEquals(mCacheControlValue, (long) tileSourcePolicy.getHttpCacheControlDuration(string));\n }\n for (final String string : mCacheControlStringKO) {\n Assert.assertNull(tileSourcePolicy.getHttpCacheControlDuration(string));\n }\n }",
"class_method_signature": "TileSourcePolicyTest.testGetHttpCacheControlDuration()",
"constructor": false,
"full_signature": "@Test public void testGetHttpCacheControlDuration()",
"identifier": "testGetHttpCacheControlDuration",
"invocations": [
"assertEquals",
"getHttpCacheControlDuration",
"assertNull",
"getHttpCacheControlDuration"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetHttpCacheControlDuration()",
"testcase": true
} | {
"fields": [
{
"declarator": "FLAG_NO_BULK = 1",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_BULK = 1;",
"type": "int",
"var_name": "FLAG_NO_BULK"
},
{
"declarator": "FLAG_NO_PREVENTIVE = 2",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_PREVENTIVE = 2;",
"type": "int",
"var_name": "FLAG_NO_PREVENTIVE"
},
{
"declarator": "FLAG_USER_AGENT_MEANINGFUL = 4",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_MEANINGFUL = 4;",
"type": "int",
"var_name": "FLAG_USER_AGENT_MEANINGFUL"
},
{
"declarator": "FLAG_USER_AGENT_NORMALIZED = 8",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_NORMALIZED = 8;",
"type": "int",
"var_name": "FLAG_USER_AGENT_NORMALIZED"
},
{
"declarator": "mMaxConcurrent",
"modifier": "private final",
"original_string": "private final int mMaxConcurrent;",
"type": "int",
"var_name": "mMaxConcurrent"
},
{
"declarator": "mFlags",
"modifier": "private final",
"original_string": "private final int mFlags;",
"type": "int",
"var_name": "mFlags"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicy.java",
"identifier": "TileSourcePolicy",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy()",
"constructor": true,
"full_signature": "public TileSourcePolicy()",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " TileSourcePolicy()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"constructor": true,
"full_signature": "public TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "(final int pMaxConcurrent,\n final int pFlags)",
"return": "",
"signature": " TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getMaxConcurrent()",
"constructor": false,
"full_signature": "public int getMaxConcurrent()",
"identifier": "getMaxConcurrent",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getMaxConcurrent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsBulkDownload()",
"constructor": false,
"full_signature": "public boolean acceptsBulkDownload()",
"identifier": "acceptsBulkDownload",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsBulkDownload()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsMeaninglessUserAgent()",
"constructor": false,
"full_signature": "private boolean acceptsMeaninglessUserAgent()",
"identifier": "acceptsMeaninglessUserAgent",
"modifiers": "private",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsMeaninglessUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.normalizesUserAgent()",
"constructor": false,
"full_signature": "public boolean normalizesUserAgent()",
"identifier": "normalizesUserAgent",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean normalizesUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsPreventive()",
"constructor": false,
"full_signature": "public boolean acceptsPreventive()",
"identifier": "acceptsPreventive",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsPreventive()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsUserAgent(final String pUserAgent)",
"constructor": false,
"full_signature": "public boolean acceptsUserAgent(final String pUserAgent)",
"identifier": "acceptsUserAgent",
"modifiers": "public",
"parameters": "(final String pUserAgent)",
"return": "boolean",
"signature": "boolean acceptsUserAgent(final String pUserAgent)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpExpiresTime(final String pHttpExpiresHeader)",
"constructor": false,
"full_signature": "public Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"identifier": "getHttpExpiresTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader)",
"return": "Long",
"signature": "Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"constructor": false,
"full_signature": "public Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"identifier": "getHttpCacheControlDuration",
"modifiers": "public",
"parameters": "(final String pHttpCacheControlHeader)",
"return": "Long",
"signature": "Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final HttpURLConnection pHttpURLConnection, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public Long getHttpCacheControlDuration(final String pHttpCacheControlHeader) {\n if (pHttpCacheControlHeader != null && pHttpCacheControlHeader.length() > 0) {\n try {\n final String[] parts = pHttpCacheControlHeader.split(\", \");\n final String maxAge = \"max-age=\";\n for (final String part : parts) {\n final int pos = part.indexOf(maxAge);\n if (pos == 0) {\n final String durationString = part.substring(maxAge.length());\n return Long.valueOf(durationString);\n }\n }\n } catch (final Exception ex) {\n if (Configuration.getInstance().isDebugMapTileDownloader())\n Log.d(IMapView.LOGTAG,\n \"Unable to parse cache control tag for tile, server returned \" + pHttpCacheControlHeader, ex);\n }\n }\n return null;\n }",
"class_method_signature": "TileSourcePolicy.getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"constructor": false,
"full_signature": "public Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"identifier": "getHttpCacheControlDuration",
"invocations": [
"length",
"split",
"indexOf",
"substring",
"length",
"valueOf",
"isDebugMapTileDownloader",
"getInstance",
"d"
],
"modifiers": "public",
"parameters": "(final String pHttpCacheControlHeader)",
"return": "Long",
"signature": "Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_31 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_bearingTo_north() {\n\t\tfinal GeoPoint target = new GeoPoint(0.0, 0.0);\n\t\tfinal GeoPoint other = new GeoPoint(10.0, 0.0);\n\t\tassertEquals(\"directly north\", 0, Math.round(target.bearingTo(other)));\n\t}",
"class_method_signature": "GeoPointTest.test_bearingTo_north()",
"constructor": false,
"full_signature": "@Test public void test_bearingTo_north()",
"identifier": "test_bearingTo_north",
"invocations": [
"assertEquals",
"round",
"bearingTo"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_bearingTo_north()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double bearingTo(final IGeoPoint other) {\n\t\tfinal double lat1 = Math.toRadians(this.mLatitude);\n\t\tfinal double long1 = Math.toRadians(this.mLongitude);\n\t\tfinal double lat2 = Math.toRadians(other.getLatitude());\n\t\tfinal double long2 = Math.toRadians(other.getLongitude());\n\t\tfinal double delta_long = long2 - long1;\n\t\tfinal double a = Math.sin(delta_long) * Math.cos(lat2);\n\t\tfinal double b = Math.cos(lat1) * Math.sin(lat2) -\n\t\t\t\t\t\t Math.sin(lat1) * Math.cos(lat2) * Math.cos(delta_long);\n\t\tfinal double bearing = Math.toDegrees(Math.atan2(a, b));\n\t\tfinal double bearing_normalized = (bearing + 360) % 360;\n\t\treturn bearing_normalized;\n\t}",
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"invocations": [
"toRadians",
"toRadians",
"toRadians",
"getLatitude",
"toRadians",
"getLongitude",
"sin",
"cos",
"cos",
"sin",
"sin",
"cos",
"cos",
"toDegrees",
"atan2"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_30 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_distanceTo_Parallels() {\n\t\tfinal double ratioDelta = 1E-5;\n\t\tfinal int iterations = 100;\n\t\tfor (int i = 0 ; i < iterations ; i ++) {\n\t\t\tfinal double latitude = getRandomLatitude();\n\t\t\tfinal double longitude1 = getRandomLongitude();\n\t\t\tfinal double longitude2 = getRandomLongitude();\n\t\t\tfinal GeoPoint target = new GeoPoint(latitude, longitude1);\n\t\t\tfinal GeoPoint other = new GeoPoint(latitude, longitude2);\n\n\t\t\tfinal double diff = getCleanLongitudeDiff(longitude1, longitude2);\n\t\t\tfinal double expected = GeoConstants.RADIUS_EARTH_METERS * 2 * Math.asin(\n\t\t\t\t\tMath.cos(latitude * MathConstants.DEG2RAD)*Math.sin(diff * MathConstants.DEG2RAD/ 2));\n\t\t\tif (expected < minimumDistance) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal double delta = expected * ratioDelta;\n\t\t\tassertEquals(\"distance between \" + target + \" and \" + other,\n\t\t\t\t\texpected, target.distanceToAsDouble(other), delta);\n\t\t}\n\t}",
"class_method_signature": "GeoPointTest.test_distanceTo_Parallels()",
"constructor": false,
"full_signature": "@Test public void test_distanceTo_Parallels()",
"identifier": "test_distanceTo_Parallels",
"invocations": [
"getRandomLatitude",
"getRandomLongitude",
"getRandomLongitude",
"getCleanLongitudeDiff",
"asin",
"cos",
"sin",
"assertEquals",
"distanceToAsDouble"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_distanceTo_Parallels()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double distanceToAsDouble(final IGeoPoint other) {\n\t\tfinal double lat1 = DEG2RAD * getLatitude();\n\t\tfinal double lat2 = DEG2RAD * other.getLatitude();\n\t\tfinal double lon1 = DEG2RAD * getLongitude();\n\t\tfinal double lon2 = DEG2RAD * other.getLongitude();\n\t\treturn RADIUS_EARTH_METERS * 2 * Math.asin(Math.min(1, Math.sqrt(\n\t\t\t\tMath.pow(Math.sin((lat2 - lat1) / 2), 2)\n\t\t\t\t+ Math.cos(lat1) * Math.cos(lat2)\n\t\t\t\t* Math.pow(Math.sin((lon2 - lon1) / 2), 2)\n\t\t)));\n\t}",
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"invocations": [
"getLatitude",
"getLatitude",
"getLongitude",
"getLongitude",
"asin",
"min",
"sqrt",
"pow",
"sin",
"cos",
"cos",
"pow",
"sin"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_67 | {
"fields": [
{
"declarator": "mCacheControlValue = 172800",
"modifier": "private final",
"original_string": "private final long mCacheControlValue = 172800;",
"type": "long",
"var_name": "mCacheControlValue"
},
{
"declarator": "mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"};",
"type": "String[]",
"var_name": "mCacheControlStringOK"
},
{
"declarator": "mCacheControlStringKO = {\"max-age=, public\", \"public\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringKO = {\"max-age=, public\", \"public\"};",
"type": "String[]",
"var_name": "mCacheControlStringKO"
},
{
"declarator": "mExpiresValue = 1539971220000L",
"modifier": "private final",
"original_string": "private final long mExpiresValue = 1539971220000L;",
"type": "long",
"var_name": "mExpiresValue"
},
{
"declarator": "mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringOK"
},
{
"declarator": "mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringKO"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicyTest.java",
"identifier": "TileSourcePolicyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComputeExpirationTime(){\n final Random random = new Random();\n final int oneWeek = 7 * 24 * 3600 * 1000; // 7 days in milliseconds\n testComputeExpirationTimeHelper(null, random.nextInt(oneWeek));\n testComputeExpirationTimeHelper((long)random.nextInt(oneWeek), random.nextInt(oneWeek));\n }",
"class_method_signature": "TileSourcePolicyTest.testComputeExpirationTime()",
"constructor": false,
"full_signature": "@Test public void testComputeExpirationTime()",
"identifier": "testComputeExpirationTime",
"invocations": [
"testComputeExpirationTimeHelper",
"nextInt",
"testComputeExpirationTimeHelper",
"nextInt",
"nextInt"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testComputeExpirationTime()",
"testcase": true
} | {
"fields": [
{
"declarator": "FLAG_NO_BULK = 1",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_BULK = 1;",
"type": "int",
"var_name": "FLAG_NO_BULK"
},
{
"declarator": "FLAG_NO_PREVENTIVE = 2",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_PREVENTIVE = 2;",
"type": "int",
"var_name": "FLAG_NO_PREVENTIVE"
},
{
"declarator": "FLAG_USER_AGENT_MEANINGFUL = 4",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_MEANINGFUL = 4;",
"type": "int",
"var_name": "FLAG_USER_AGENT_MEANINGFUL"
},
{
"declarator": "FLAG_USER_AGENT_NORMALIZED = 8",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_NORMALIZED = 8;",
"type": "int",
"var_name": "FLAG_USER_AGENT_NORMALIZED"
},
{
"declarator": "mMaxConcurrent",
"modifier": "private final",
"original_string": "private final int mMaxConcurrent;",
"type": "int",
"var_name": "mMaxConcurrent"
},
{
"declarator": "mFlags",
"modifier": "private final",
"original_string": "private final int mFlags;",
"type": "int",
"var_name": "mFlags"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicy.java",
"identifier": "TileSourcePolicy",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy()",
"constructor": true,
"full_signature": "public TileSourcePolicy()",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " TileSourcePolicy()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"constructor": true,
"full_signature": "public TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "(final int pMaxConcurrent,\n final int pFlags)",
"return": "",
"signature": " TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getMaxConcurrent()",
"constructor": false,
"full_signature": "public int getMaxConcurrent()",
"identifier": "getMaxConcurrent",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getMaxConcurrent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsBulkDownload()",
"constructor": false,
"full_signature": "public boolean acceptsBulkDownload()",
"identifier": "acceptsBulkDownload",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsBulkDownload()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsMeaninglessUserAgent()",
"constructor": false,
"full_signature": "private boolean acceptsMeaninglessUserAgent()",
"identifier": "acceptsMeaninglessUserAgent",
"modifiers": "private",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsMeaninglessUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.normalizesUserAgent()",
"constructor": false,
"full_signature": "public boolean normalizesUserAgent()",
"identifier": "normalizesUserAgent",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean normalizesUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsPreventive()",
"constructor": false,
"full_signature": "public boolean acceptsPreventive()",
"identifier": "acceptsPreventive",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsPreventive()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsUserAgent(final String pUserAgent)",
"constructor": false,
"full_signature": "public boolean acceptsUserAgent(final String pUserAgent)",
"identifier": "acceptsUserAgent",
"modifiers": "public",
"parameters": "(final String pUserAgent)",
"return": "boolean",
"signature": "boolean acceptsUserAgent(final String pUserAgent)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpExpiresTime(final String pHttpExpiresHeader)",
"constructor": false,
"full_signature": "public Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"identifier": "getHttpExpiresTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader)",
"return": "Long",
"signature": "Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"constructor": false,
"full_signature": "public Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"identifier": "getHttpCacheControlDuration",
"modifiers": "public",
"parameters": "(final String pHttpCacheControlHeader)",
"return": "Long",
"signature": "Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final HttpURLConnection pHttpURLConnection, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow) {\n final Long override=Configuration.getInstance().getExpirationOverrideDuration();\n if (override != null) {\n return pNow + override;\n }\n\n final long extension = Configuration.getInstance().getExpirationExtendedDuration();\n final Long cacheControlDuration = getHttpCacheControlDuration(pHttpCacheControlHeader);\n if (cacheControlDuration != null) {\n return pNow + cacheControlDuration * 1000 + extension;\n }\n\n final Long httpExpiresTime = getHttpExpiresTime(pHttpExpiresHeader);\n if (httpExpiresTime != null) {\n return httpExpiresTime + extension;\n }\n\n return pNow + OpenStreetMapTileProviderConstants.DEFAULT_MAXIMUM_CACHED_FILE_AGE + extension;\n }",
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"identifier": "computeExpirationTime",
"invocations": [
"getExpirationOverrideDuration",
"getInstance",
"getExpirationExtendedDuration",
"getInstance",
"getHttpCacheControlDuration",
"getHttpExpiresTime"
],
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_26 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/PointReducerTest.java",
"identifier": "PointReducerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReducer(){\n ArrayList<GeoPoint> pts =new ArrayList<>();\n pts.add(new GeoPoint(45, -74.0));\n pts.add(new GeoPoint(45.0009, -74.0009)); //about 1km\n pts.add(new GeoPoint(45.0018, -74.0018)); //about 1km\n\n ArrayList<GeoPoint> geoPoints = PointReducer.reduceWithTolerance(pts, 0.5 / 312); //about 50km latitude span\n Assert.assertTrue(!geoPoints.isEmpty());\n Assert.assertTrue(geoPoints.size()+\"\", geoPoints.size()==2);\n }",
"class_method_signature": "PointReducerTest.testReducer()",
"constructor": false,
"full_signature": "@Test public void testReducer()",
"identifier": "testReducer",
"invocations": [
"add",
"add",
"add",
"reduceWithTolerance",
"assertTrue",
"isEmpty",
"assertTrue",
"size",
"size"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testReducer()",
"testcase": true
} | {
"fields": [],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/PointReducer.java",
"identifier": "PointReducer",
"interfaces": "",
"methods": [
{
"class_method_signature": "PointReducer.reduceWithTolerance(ArrayList<GeoPoint> shape, double tolerance)",
"constructor": false,
"full_signature": "public static ArrayList<GeoPoint> reduceWithTolerance(ArrayList<GeoPoint> shape, double tolerance)",
"identifier": "reduceWithTolerance",
"modifiers": "public static",
"parameters": "(ArrayList<GeoPoint> shape, double tolerance)",
"return": "ArrayList<GeoPoint>",
"signature": "ArrayList<GeoPoint> reduceWithTolerance(ArrayList<GeoPoint> shape, double tolerance)",
"testcase": false
},
{
"class_method_signature": "PointReducer.douglasPeuckerReduction(ArrayList<GeoPoint> shape, boolean[] marked, double tolerance, int firstIdx, int lastIdx)",
"constructor": false,
"full_signature": "private static void douglasPeuckerReduction(ArrayList<GeoPoint> shape, boolean[] marked, double tolerance, int firstIdx, int lastIdx)",
"identifier": "douglasPeuckerReduction",
"modifiers": "private static",
"parameters": "(ArrayList<GeoPoint> shape, boolean[] marked, double tolerance, int firstIdx, int lastIdx)",
"return": "void",
"signature": "void douglasPeuckerReduction(ArrayList<GeoPoint> shape, boolean[] marked, double tolerance, int firstIdx, int lastIdx)",
"testcase": false
},
{
"class_method_signature": "PointReducer.orthogonalDistance(GeoPoint point, GeoPoint lineStart, GeoPoint lineEnd)",
"constructor": false,
"full_signature": "public static double orthogonalDistance(GeoPoint point, GeoPoint lineStart, GeoPoint lineEnd)",
"identifier": "orthogonalDistance",
"modifiers": "public static",
"parameters": "(GeoPoint point, GeoPoint lineStart, GeoPoint lineEnd)",
"return": "double",
"signature": "double orthogonalDistance(GeoPoint point, GeoPoint lineStart, GeoPoint lineEnd)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static ArrayList<GeoPoint> reduceWithTolerance(ArrayList<GeoPoint> shape, double tolerance)\n {\n int n = shape.size();\n // if a shape has 2 or less points it cannot be reduced\n if (tolerance <= 0 || n < 3) {\n return shape;\n }\n\n boolean [] marked = new boolean[n]; //vertex indexes to keep will be marked as \"true\"\n for (int i=1; i<n-1; i++)\n marked[i] = false;\n // automatically add the first and last point to the returned shape\n marked[0] = marked[n-1] = true;\n\n // the first and last points in the original shape are\n // used as the entry point to the algorithm.\n douglasPeuckerReduction(\n shape, // original shape\n marked, // reduced shape\n tolerance, // tolerance\n 0, // index of first point\n n-1 // index of last point\n );\n\n // all done, return the reduced shape\n ArrayList<GeoPoint> newShape = new ArrayList<GeoPoint>(n); // the new shape to return\n for (int i=0; i<n; i++){\n if (marked[i])\n newShape.add(shape.get(i));\n }\n return newShape;\n }",
"class_method_signature": "PointReducer.reduceWithTolerance(ArrayList<GeoPoint> shape, double tolerance)",
"constructor": false,
"full_signature": "public static ArrayList<GeoPoint> reduceWithTolerance(ArrayList<GeoPoint> shape, double tolerance)",
"identifier": "reduceWithTolerance",
"invocations": [
"size",
"douglasPeuckerReduction",
"add",
"get"
],
"modifiers": "public static",
"parameters": "(ArrayList<GeoPoint> shape, double tolerance)",
"return": "ArrayList<GeoPoint>",
"signature": "ArrayList<GeoPoint> reduceWithTolerance(ArrayList<GeoPoint> shape, double tolerance)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_1 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "XY01Delta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double XY01Delta = 1E-10;",
"type": "double",
"var_name": "XY01Delta"
},
{
"declarator": "latLongDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double latLongDelta = 1E-10;",
"type": "double",
"var_name": "latLongDelta"
},
{
"declarator": "mMinZoomLevel = 0",
"modifier": "private static final",
"original_string": "private static final int mMinZoomLevel = 0;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel = TileSystem.getMaximumZoomLevel()",
"modifier": "private static final",
"original_string": "private static final int mMaxZoomLevel = TileSystem.getMaximumZoomLevel();",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/TileSystemTest.java",
"identifier": "TileSystemTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetX01FromLongitude() {\n final int iterations = 10;\n for (int i = 0 ; i <= iterations ; i ++) {\n final double longitude = tileSystem.getMinLongitude() + i * (tileSystem.getMaxLongitude() - tileSystem.getMinLongitude()) / iterations;\n checkXY01(((double)i) / iterations, tileSystem.getX01FromLongitude(longitude, true));\n }\n }",
"class_method_signature": "TileSystemTest.testGetX01FromLongitude()",
"constructor": false,
"full_signature": "@Test public void testGetX01FromLongitude()",
"identifier": "testGetX01FromLongitude",
"invocations": [
"getMinLongitude",
"getMaxLongitude",
"getMinLongitude",
"checkXY01",
"getX01FromLongitude"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetX01FromLongitude()",
"testcase": true
} | {
"fields": [
{
"declarator": "EarthRadius = GeoConstants.RADIUS_EARTH_METERS",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double EarthRadius = GeoConstants.RADIUS_EARTH_METERS;",
"type": "double",
"var_name": "EarthRadius"
},
{
"declarator": "MinLatitude = -85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLatitude = -85.05112877980659;",
"type": "double",
"var_name": "MinLatitude"
},
{
"declarator": "MaxLatitude = 85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLatitude = 85.05112877980659;",
"type": "double",
"var_name": "MaxLatitude"
},
{
"declarator": "MinLongitude = -180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLongitude = -180d;",
"type": "double",
"var_name": "MinLongitude"
},
{
"declarator": "MaxLongitude = 180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLongitude = 180d;",
"type": "double",
"var_name": "MaxLongitude"
},
{
"declarator": "mTileSize = 256",
"modifier": "private static",
"original_string": "private static int mTileSize = 256;",
"type": "int",
"var_name": "mTileSize"
},
{
"declarator": "primaryKeyMaxZoomLevel = 29",
"modifier": "public static final",
"original_string": "public static final int primaryKeyMaxZoomLevel = 29;",
"type": "int",
"var_name": "primaryKeyMaxZoomLevel"
},
{
"declarator": "projectionZoomLevel = primaryKeyMaxZoomLevel + 1",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final int projectionZoomLevel = primaryKeyMaxZoomLevel + 1;",
"type": "int",
"var_name": "projectionZoomLevel"
},
{
"declarator": "mMaxZoomLevel = primaryKeyMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mMaxZoomLevel = primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java",
"identifier": "TileSystem",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSystem.setTileSize(final int tileSize)",
"constructor": false,
"full_signature": "public static void setTileSize(final int tileSize)",
"identifier": "setTileSize",
"modifiers": "public static",
"parameters": "(final int tileSize)",
"return": "void",
"signature": "void setTileSize(final int tileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize()",
"constructor": false,
"full_signature": "public static int getTileSize()",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getTileSize()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaximumZoomLevel()",
"constructor": false,
"full_signature": "public static int getMaximumZoomLevel()",
"identifier": "getMaximumZoomLevel",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getMaximumZoomLevel()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getTileSize(final double pZoomLevel)",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getTileSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getInputTileZoomLevel(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static int getInputTileZoomLevel(final double pZoomLevel)",
"identifier": "getInputTileZoomLevel",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "int",
"signature": "int getInputTileZoomLevel(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double MapSize(final double pZoomLevel)",
"identifier": "MapSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double MapSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getFactor(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getFactor(final double pZoomLevel)",
"identifier": "getFactor",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getFactor(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final double zoomLevel)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final double zoomLevel)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final double zoomLevel)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final double zoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolutionMapSize(double latitude, final double mapSize)",
"constructor": false,
"full_signature": "public static double GroundResolutionMapSize(double latitude, final double mapSize)",
"identifier": "GroundResolutionMapSize",
"modifiers": "public static",
"parameters": "(double latitude, final double mapSize)",
"return": "double",
"signature": "double GroundResolutionMapSize(double latitude, final double mapSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"return": "Point",
"signature": "Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"identifier": "LatLongToPixelXYMapSize",
"modifiers": "@Deprecated public",
"parameters": "(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongWithoutWrap",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude)",
"constructor": false,
"full_signature": "abstract public double getX01FromLongitude(double longitude)",
"identifier": "getX01FromLongitude",
"modifiers": "abstract public",
"parameters": "(double longitude)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "abstract public double getY01FromLatitude(final double pLatitude)",
"identifier": "getY01FromLatitude",
"modifiers": "abstract public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double getY01FromLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"identifier": "PixelXYToLatLongMapSize",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongMapSizeWithoutWrap",
"modifiers": "public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final double n, final double minValue, final double maxValue)",
"constructor": false,
"full_signature": "public static double Clip(final double n, final double minValue, final double maxValue)",
"identifier": "Clip",
"modifiers": "public static",
"parameters": "(final double n, final double minValue, final double maxValue)",
"return": "double",
"signature": "double Clip(final double n, final double minValue, final double maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY, final Point reuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final Rect rect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int tileX, final int tileY, final Point reuse)",
"return": "Point",
"signature": "Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"return": "PointL",
"signature": "PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"identifier": "TileXYToQuadKey",
"modifiers": "public static",
"parameters": "(final int tileX, final int tileY, final int levelOfDetail)",
"return": "String",
"signature": "String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.QuadKeyToTileXY(final String quadKey, final Point reuse)",
"constructor": false,
"full_signature": "public static Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"identifier": "QuadKeyToTileXY",
"modifiers": "public static",
"parameters": "(final String quadKey, final Point reuse)",
"return": "Point",
"signature": "Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"constructor": false,
"full_signature": "public double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"identifier": "getLongitudeZoom",
"modifiers": "public",
"parameters": "(final double pEast, final double pWest, final int pScreenWidth)",
"return": "double",
"signature": "double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"identifier": "getLatitudeZoom",
"modifiers": "public",
"parameters": "(final double pNorth, final double pSouth, final int pScreenHeight)",
"return": "double",
"signature": "double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.wrap(double n, final double minValue, final double maxValue, final double interval)",
"constructor": false,
"full_signature": "private static double wrap(double n, final double minValue, final double maxValue, final double interval)",
"identifier": "wrap",
"modifiers": "private static",
"parameters": "(double n, final double minValue, final double maxValue, final double interval)",
"return": "double",
"signature": "double wrap(double n, final double minValue, final double maxValue, final double interval)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorFromXY01",
"modifiers": "public",
"parameters": "(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01)",
"constructor": false,
"full_signature": "abstract public double getLatitudeFromY01(final double pY01)",
"identifier": "getLatitudeFromY01",
"modifiers": "abstract public",
"parameters": "(final double pY01)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01)",
"constructor": false,
"full_signature": "abstract public double getLongitudeFromX01(final double pX01)",
"identifier": "getLongitudeFromX01",
"modifiers": "abstract public",
"parameters": "(final double pX01)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"identifier": "getCleanMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"constructor": false,
"full_signature": "public static long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"identifier": "ClipToLong",
"modifiers": "public static",
"parameters": "(final double pValue, final double pMax, final boolean pWrapEnabled)",
"return": "long",
"signature": "long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final long n, final long minValue, final long maxValue)",
"constructor": false,
"full_signature": "@Deprecated public static long Clip(final long n, final long minValue, final long maxValue)",
"identifier": "Clip",
"modifiers": "@Deprecated public static",
"parameters": "(final long n, final long minValue, final long maxValue)",
"return": "long",
"signature": "long Clip(final long n, final long minValue, final long maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.truncateToInt(final long value)",
"constructor": false,
"full_signature": "public static int truncateToInt(final long value)",
"identifier": "truncateToInt",
"modifiers": "public static",
"parameters": "(final long value)",
"return": "int",
"signature": "int truncateToInt(final long value)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"identifier": "getMercatorFromGeo",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"return": "PointL",
"signature": "PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "public GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"identifier": "getGeoFromMercator",
"modifiers": "public",
"parameters": "(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"identifier": "getXY01FromMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"return": "double",
"signature": "double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLongitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLongitude(final double pRandom01)",
"identifier": "getRandomLongitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLongitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01, final double pMinLatitude)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final long pMercator, final double pTileSize)",
"constructor": false,
"full_signature": "public static int getTileFromMercator(final long pMercator, final double pTileSize)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final long pMercator, final double pTileSize)",
"return": "int",
"signature": "int getTileFromMercator(final long pMercator, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromTile(final int pTile, final double pTileSize)",
"constructor": false,
"full_signature": "public static long getMercatorFromTile(final int pTile, final double pTileSize)",
"identifier": "getMercatorFromTile",
"modifiers": "public static",
"parameters": "(final int pTile, final double pTileSize)",
"return": "long",
"signature": "long getMercatorFromTile(final int pTile, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLatitude()",
"constructor": false,
"full_signature": "abstract public double getMinLatitude()",
"identifier": "getMinLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLatitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLatitude()",
"identifier": "getMaxLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLongitude()",
"constructor": false,
"full_signature": "abstract public double getMinLongitude()",
"identifier": "getMinLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLongitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLongitude()",
"identifier": "getMaxLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public double cleanLongitude(final double pLongitude)",
"identifier": "cleanLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "double",
"signature": "double cleanLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public double cleanLatitude(final double pLatitude)",
"identifier": "cleanLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double cleanLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public boolean isValidLongitude(final double pLongitude)",
"identifier": "isValidLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "boolean",
"signature": "boolean isValidLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public boolean isValidLatitude(final double pLatitude)",
"identifier": "isValidLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "boolean",
"signature": "boolean isValidLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLongitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLongitudeSpan()",
"identifier": "toStringLongitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLatitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLatitudeSpan()",
"identifier": "toStringLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileXFromLongitude(final double pLongitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"identifier": "getTileXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final int pZoom)",
"return": "int",
"signature": "int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileYFromLatitude(final double pLatitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"identifier": "getTileYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final int pZoom)",
"return": "int",
"signature": "int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromTileY(final int pY, final int pZoom)",
"constructor": false,
"full_signature": "public double getLatitudeFromTileY(final int pY, final int pZoom)",
"identifier": "getLatitudeFromTileY",
"modifiers": "public",
"parameters": "(final int pY, final int pZoom)",
"return": "double",
"signature": "double getLatitudeFromTileY(final int pY, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromTileX(final int pX, final int pZoom)",
"constructor": false,
"full_signature": "public double getLongitudeFromTileX(final int pX, final int pZoom)",
"identifier": "getLongitudeFromTileX",
"modifiers": "public",
"parameters": "(final int pX, final int pZoom)",
"return": "double",
"signature": "double getLongitudeFromTileX(final int pX, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.clipTile(final int pTile, final int pZoom)",
"constructor": false,
"full_signature": "private int clipTile(final int pTile, final int pZoom)",
"identifier": "clipTile",
"modifiers": "private",
"parameters": "(final int pTile, final int pZoom)",
"return": "int",
"signature": "int clipTile(final int pTile, final int pZoom)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double getX01FromLongitude(double longitude, boolean wrapEnabled) {\n\t\tlongitude = wrapEnabled ? Clip(longitude, getMinLongitude(), getMaxLongitude()) : longitude;\n\t\tfinal double result = getX01FromLongitude(longitude);\n\t\treturn wrapEnabled ? Clip(result, 0, 1) : result;\n\t}",
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"invocations": [
"Clip",
"getMinLongitude",
"getMaxLongitude",
"getX01FromLongitude",
"Clip"
],
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_51 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCorpusChristi() {\n BoundingBox item = new BoundingBox(27.696581, -97.243682999999, 27.688781, -97.253063);\n\n\n BoundingBox shouldWork = new BoundingBox(27.72243591897344, -97.24737167358398,\n 27.63730702015522, -97.30916976928711);\n Assert.assertTrue(shouldWork.overlaps(item, 4));\n\n }",
"class_method_signature": "BoundingBoxTest.testCorpusChristi()",
"constructor": false,
"full_signature": "@Test public void testCorpusChristi()",
"identifier": "testCorpusChristi",
"invocations": [
"assertTrue",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCorpusChristi()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_10 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileListBorderComputerTest.java",
"identifier": "MapTileListBorderComputerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOnePointModuloInclude() {\n final MapTileList source = new MapTileList();\n final MapTileList dest = new MapTileList();\n final Set<Long> set = new HashSet<>();\n final int border = 2;\n final MapTileListBorderComputer computer = new MapTileListBorderComputer(border, true);\n final int zoom = 5;\n final int sourceX = 1;\n final int sourceY = 31;\n source.put(MapTileIndex.getTileIndex(zoom, sourceX, sourceY));\n add(set, zoom, sourceX, sourceY, border);\n computer.computeFromSource(source, dest);\n check(dest, set, zoom);\n }",
"class_method_signature": "MapTileListBorderComputerTest.testOnePointModuloInclude()",
"constructor": false,
"full_signature": "@Test public void testOnePointModuloInclude()",
"identifier": "testOnePointModuloInclude",
"invocations": [
"put",
"getTileIndex",
"add",
"computeFromSource",
"check"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOnePointModuloInclude()",
"testcase": true
} | {
"fields": [
{
"declarator": "mBorder",
"modifier": "private final",
"original_string": "private final int mBorder;",
"type": "int",
"var_name": "mBorder"
},
{
"declarator": "mIncludeAll",
"modifier": "private final",
"original_string": "private final boolean mIncludeAll;",
"type": "boolean",
"var_name": "mIncludeAll"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileListBorderComputer.java",
"identifier": "MapTileListBorderComputer",
"interfaces": "implements MapTileListComputer",
"methods": [
{
"class_method_signature": "MapTileListBorderComputer.MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"constructor": true,
"full_signature": "public MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"identifier": "MapTileListBorderComputer",
"modifiers": "public",
"parameters": "(final int pBorder, final boolean pIncludeAll)",
"return": "",
"signature": " MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.getBorder()",
"constructor": false,
"full_signature": "public int getBorder()",
"identifier": "getBorder",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBorder()",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.isIncludeAll()",
"constructor": false,
"full_signature": "public boolean isIncludeAll()",
"identifier": "isIncludeAll",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isIncludeAll()",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"identifier": "computeFromSource",
"modifiers": "@Override public",
"parameters": "(final MapTileList pSource, final MapTileList pReuse)",
"return": "MapTileList",
"signature": "MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse) {\n final MapTileList out = pReuse != null ? pReuse : new MapTileList();\n for (int i = 0 ; i < pSource.getSize() ; i ++) {\n final long sourceIndex = pSource.get(i);\n final int zoom = MapTileIndex.getZoom(sourceIndex);\n final int sourceX = MapTileIndex.getX(sourceIndex);\n final int sourceY = MapTileIndex.getY(sourceIndex);\n final int power = 1 << zoom;\n for (int j = -mBorder ; j <= mBorder ; j ++) {\n for (int k = -mBorder ; k <= mBorder ; k ++) {\n int destX = sourceX + j;\n int destY = sourceY + k;\n while (destX < 0) {\n destX += power;\n }\n while (destY < 0) {\n destY += power;\n }\n while (destX >= power) {\n destX -= power;\n }\n while (destY >= power) {\n destY -= power;\n }\n final long index = MapTileIndex.getTileIndex(zoom, destX, destY);\n if (out.contains(index)) {\n continue;\n }\n if (pSource.contains(index) && !mIncludeAll) {\n continue;\n }\n out.put(index);\n }\n }\n }\n return out;\n }",
"class_method_signature": "MapTileListBorderComputer.computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"identifier": "computeFromSource",
"invocations": [
"getSize",
"get",
"getZoom",
"getX",
"getY",
"getTileIndex",
"contains",
"contains",
"put"
],
"modifiers": "@Override public",
"parameters": "(final MapTileList pSource, final MapTileList pReuse)",
"return": "MapTileList",
"signature": "MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_47 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOverlapsDateLine2() {\n\n // ________________\n // | | |\n // |** ?? | **|\n // |-*----+-----*-|\n // |** | **|\n // | | |\n // ----------------\n //box is notated as *\n //test area is notated as ?\n\n\n BoundingBox box = new BoundingBox(45, -178, -45, -1);\n Assert.assertTrue(box.overlaps(box, 4));\n\n BoundingBox farAway = new BoundingBox(45, -74, 44, -72);\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n\n // ________________\n // |******| **|\n // | ?? *| * |\n // |-----*+-----*-|\n // | *| * |\n // |******| **|\n // ----------------\n //box is notated as *\n //test area is notated as ?\n\n\n box = new BoundingBox(45, 0, -45, 170);\n Assert.assertTrue(box.overlaps(box, 4));\n\n farAway = new BoundingBox(40, -72, 38, -74);\n Assert.assertTrue(box.overlaps(farAway, 4));\n\n farAway = new BoundingBox(40, 5, 38, 4);\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n farAway = new BoundingBox(-40, 5, -42, 4);\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n\n }",
"class_method_signature": "BoundingBoxTest.testOverlapsDateLine2()",
"constructor": false,
"full_signature": "@Test public void testOverlapsDateLine2()",
"identifier": "testOverlapsDateLine2",
"invocations": [
"assertTrue",
"overlaps",
"assertFalse",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertFalse",
"overlaps",
"assertFalse",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOverlapsDateLine2()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_21 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private",
"original_string": "private Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileAreaTest.java",
"identifier": "MapTileAreaTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPerformances() {\n final MapTileList list = new MapTileList();\n final MapTileArea area = new MapTileArea();\n final int zoom = 10;\n final int size = 10;\n long start, end, duration1, duration2;\n\n // checking if area is faster than list during initialization\n list.ensureCapacity(size * size);\n start = System.nanoTime();\n list.put(zoom, 0, 0, size-1, size-1);\n end = System.nanoTime();\n duration1 = end - start;\n start = System.nanoTime();\n area.set(zoom, 0, 0, size-1, size-1);\n end = System.nanoTime();\n duration2 = end - start;\n checkDuration(duration1, duration2);\n\n // find all items of the list\n checkContainDuration(zoom, zoom, size - 1, size -1, list, area, true);\n\n // cannot find any item on lower zooms\n checkContainDuration(0, zoom - 1, 0, 0, list, area, false);\n\n // cannot find any item on higher zooms\n checkContainDuration(zoom + 1, TileSystem.getMaximumZoomLevel(), 0, 0, list, area, false);\n }",
"class_method_signature": "MapTileAreaTest.testPerformances()",
"constructor": false,
"full_signature": "@Test public void testPerformances()",
"identifier": "testPerformances",
"invocations": [
"ensureCapacity",
"nanoTime",
"put",
"nanoTime",
"nanoTime",
"set",
"nanoTime",
"checkDuration",
"checkContainDuration",
"checkContainDuration",
"checkContainDuration",
"getMaximumZoomLevel"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testPerformances()",
"testcase": true
} | {
"fields": [
{
"declarator": "mZoom",
"modifier": "private",
"original_string": "private int mZoom;",
"type": "int",
"var_name": "mZoom"
},
{
"declarator": "mLeft",
"modifier": "private",
"original_string": "private int mLeft;",
"type": "int",
"var_name": "mLeft"
},
{
"declarator": "mTop",
"modifier": "private",
"original_string": "private int mTop;",
"type": "int",
"var_name": "mTop"
},
{
"declarator": "mWidth",
"modifier": "private",
"original_string": "private int mWidth;",
"type": "int",
"var_name": "mWidth"
},
{
"declarator": "mHeight",
"modifier": "private",
"original_string": "private int mHeight;",
"type": "int",
"var_name": "mHeight"
},
{
"declarator": "mMapTileUpperBound",
"modifier": "private",
"original_string": "private int mMapTileUpperBound;",
"type": "int",
"var_name": "mMapTileUpperBound"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileArea.java",
"identifier": "MapTileArea",
"interfaces": "implements MapTileContainer, IterableWithSize<Long>",
"methods": [
{
"class_method_signature": "MapTileArea.set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.set(final int pZoom, final Rect pRect)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final Rect pRect)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final int pZoom, final Rect pRect)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final Rect pRect)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.set(final MapTileArea pArea)",
"constructor": false,
"full_signature": "public MapTileArea set(final MapTileArea pArea)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final MapTileArea pArea)",
"return": "MapTileArea",
"signature": "MapTileArea set(final MapTileArea pArea)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.reset()",
"constructor": false,
"full_signature": "public MapTileArea reset()",
"identifier": "reset",
"modifiers": "public",
"parameters": "()",
"return": "MapTileArea",
"signature": "MapTileArea reset()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getZoom()",
"constructor": false,
"full_signature": "public int getZoom()",
"identifier": "getZoom",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getZoom()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getLeft()",
"constructor": false,
"full_signature": "public int getLeft()",
"identifier": "getLeft",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getLeft()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getTop()",
"constructor": false,
"full_signature": "public int getTop()",
"identifier": "getTop",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getTop()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getWidth()",
"constructor": false,
"full_signature": "public int getWidth()",
"identifier": "getWidth",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getWidth()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getHeight()",
"constructor": false,
"full_signature": "public int getHeight()",
"identifier": "getHeight",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getHeight()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getRight()",
"constructor": false,
"full_signature": "public int getRight()",
"identifier": "getRight",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getRight()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getBottom()",
"constructor": false,
"full_signature": "public int getBottom()",
"identifier": "getBottom",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBottom()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.iterator()",
"constructor": false,
"full_signature": "@Override public Iterator<Long> iterator()",
"identifier": "iterator",
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterator<Long>",
"signature": "Iterator<Long> iterator()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.contains(long pTileIndex)",
"constructor": false,
"full_signature": "@Override public boolean contains(long pTileIndex)",
"identifier": "contains",
"modifiers": "@Override public",
"parameters": "(long pTileIndex)",
"return": "boolean",
"signature": "boolean contains(long pTileIndex)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.contains(int pValue, final int pFirst, final int pSize)",
"constructor": false,
"full_signature": "private boolean contains(int pValue, final int pFirst, final int pSize)",
"identifier": "contains",
"modifiers": "private",
"parameters": "(int pValue, final int pFirst, final int pSize)",
"return": "boolean",
"signature": "boolean contains(int pValue, final int pFirst, final int pSize)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.cleanValue(int pValue)",
"constructor": false,
"full_signature": "private int cleanValue(int pValue)",
"identifier": "cleanValue",
"modifiers": "private",
"parameters": "(int pValue)",
"return": "int",
"signature": "int cleanValue(int pValue)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.computeSize(final int pTopLeft, int pBottomRight)",
"constructor": false,
"full_signature": "private int computeSize(final int pTopLeft, int pBottomRight)",
"identifier": "computeSize",
"modifiers": "private",
"parameters": "(final int pTopLeft, int pBottomRight)",
"return": "int",
"signature": "int computeSize(final int pTopLeft, int pBottomRight)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom) {\n mZoom = pZoom;\n mMapTileUpperBound = 1 << mZoom;\n mWidth = computeSize(pLeft, pRight);\n mHeight = computeSize(pTop, pBottom);\n mLeft = cleanValue(pLeft);\n mTop = cleanValue(pTop);\n return this;\n }",
"class_method_signature": "MapTileArea.set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"identifier": "set",
"invocations": [
"computeSize",
"computeSize",
"cleanValue",
"cleanValue"
],
"modifiers": "public",
"parameters": "(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_60 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileListZoomComputerTest.java",
"identifier": "MapTileListZoomComputerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComputeFromSource() {\n final MapTileList source = new MapTileList();\n final MapTileList dest = new MapTileList();\n final HashSet<Long> set = new HashSet<>();\n final int sourceZoom = 5;\n final int sourceXMin = 10;\n final int sourceXMax = 15;\n final int sourceYMin = 20;\n final int sourceYMax = 22;\n final int destMinus1XMin = sourceXMin >> 1;\n final int destMinus1XMax = sourceXMax >> 1;\n final int destMinus1YMin = sourceYMin >> 1;\n final int destMinus1YMax = sourceYMax >> 1;\n final int destPlus1XMin = sourceXMin << 1;\n final int destPlus1XMax = (sourceXMax << 1) + 1;\n final int destPlus1YMin = sourceYMin << 1;\n final int destPlus1YMax = (sourceYMax << 1) + 1;\n for (int i = sourceXMin ; i <= sourceXMax ; i ++) {\n for (int j = sourceYMin ; j <= sourceYMax ; j ++) {\n source.put(MapTileIndex.getTileIndex(sourceZoom, i, j));\n }\n }\n Assert.assertEquals((sourceXMax - sourceXMin + 1) * (sourceYMax - sourceYMin + 1), source.getSize());\n\n // count checking\n final int minMaxDelta = 4;\n for (int zoomDelta = -minMaxDelta ; zoomDelta < minMaxDelta ; zoomDelta ++) {\n final MapTileListZoomComputer computer = new MapTileListZoomComputer(zoomDelta);\n dest.clear();\n computer.computeFromSource(source, dest);\n final String tag = \"zoomDelta=\" + zoomDelta;\n if (sourceZoom + zoomDelta < 0 || sourceZoom + zoomDelta > MapTileIndex.mMaxZoomLevel) {\n Assert.assertEquals(tag, 0, dest.getSize());\n } else if (zoomDelta <= 0) {\n Assert.assertEquals(tag, source.getSize(), dest.getSize());\n } else {\n Assert.assertEquals(tag, source.getSize() << (2 * zoomDelta), dest.getSize());\n }\n }\n\n MapTileListZoomComputer computer;\n // data checking for -1\n computer = new MapTileListZoomComputer(-1);\n dest.clear();\n computer.computeFromSource(source, dest);\n set.clear();\n populateSet(set, dest);\n check(set, sourceZoom + computer.getZoomDelta(), destMinus1XMin, destMinus1XMax, destMinus1YMin, destMinus1YMax);\n\n // data checking for +1\n computer = new MapTileListZoomComputer(1);\n dest.clear();\n computer.computeFromSource(source, dest);\n set.clear();\n populateSet(set, dest);\n check(set, sourceZoom + computer.getZoomDelta(), destPlus1XMin, destPlus1XMax, destPlus1YMin, destPlus1YMax);\n }",
"class_method_signature": "MapTileListZoomComputerTest.testComputeFromSource()",
"constructor": false,
"full_signature": "@Test public void testComputeFromSource()",
"identifier": "testComputeFromSource",
"invocations": [
"put",
"getTileIndex",
"assertEquals",
"getSize",
"clear",
"computeFromSource",
"assertEquals",
"getSize",
"assertEquals",
"getSize",
"getSize",
"assertEquals",
"getSize",
"getSize",
"clear",
"computeFromSource",
"clear",
"populateSet",
"check",
"getZoomDelta",
"clear",
"computeFromSource",
"clear",
"populateSet",
"check",
"getZoomDelta"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testComputeFromSource()",
"testcase": true
} | {
"fields": [
{
"declarator": "mZoomDelta",
"modifier": "private final",
"original_string": "private final int mZoomDelta;",
"type": "int",
"var_name": "mZoomDelta"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileListZoomComputer.java",
"identifier": "MapTileListZoomComputer",
"interfaces": "implements MapTileListComputer",
"methods": [
{
"class_method_signature": "MapTileListZoomComputer.MapTileListZoomComputer(final int pZoomDelta)",
"constructor": true,
"full_signature": "public MapTileListZoomComputer(final int pZoomDelta)",
"identifier": "MapTileListZoomComputer",
"modifiers": "public",
"parameters": "(final int pZoomDelta)",
"return": "",
"signature": " MapTileListZoomComputer(final int pZoomDelta)",
"testcase": false
},
{
"class_method_signature": "MapTileListZoomComputer.getZoomDelta()",
"constructor": false,
"full_signature": "public int getZoomDelta()",
"identifier": "getZoomDelta",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getZoomDelta()",
"testcase": false
},
{
"class_method_signature": "MapTileListZoomComputer.computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"identifier": "computeFromSource",
"modifiers": "@Override public",
"parameters": "(final MapTileList pSource, final MapTileList pReuse)",
"return": "MapTileList",
"signature": "MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse) {\n final MapTileList out = pReuse != null ? pReuse : new MapTileList();\n for (int i = 0 ; i < pSource.getSize() ; i ++) {\n final long sourceIndex = pSource.get(i);\n final int sourceZoom = MapTileIndex.getZoom(sourceIndex);\n final int destZoom = sourceZoom + mZoomDelta;\n if (destZoom < 0 || destZoom > MapTileIndex.mMaxZoomLevel) {\n continue;\n }\n final int sourceX = MapTileIndex.getX(sourceIndex);\n final int sourceY = MapTileIndex.getY(sourceIndex);\n if (mZoomDelta <= 0) {\n out.put(MapTileIndex.getTileIndex(destZoom, sourceX >> -mZoomDelta, sourceY >> -mZoomDelta));\n continue;\n }\n final int power = 1 << mZoomDelta;\n final int destX = sourceX << mZoomDelta;\n final int destY = sourceY << mZoomDelta;\n for (int j = 0 ; j < power ; j ++) {\n for (int k = 0 ; k < power ; k ++) {\n out.put(MapTileIndex.getTileIndex(destZoom, destX + j, destY + k));\n }\n }\n }\n return out;\n }",
"class_method_signature": "MapTileListZoomComputer.computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"identifier": "computeFromSource",
"invocations": [
"getSize",
"get",
"getZoom",
"getX",
"getY",
"put",
"getTileIndex",
"put",
"getTileIndex"
],
"modifiers": "@Override public",
"parameters": "(final MapTileList pSource, final MapTileList pReuse)",
"return": "MapTileList",
"signature": "MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_37 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_toFromString_withoutAltitude() {\n\t\tfinal GeoPoint in = new GeoPoint(52387524, 4891604);\n\t\tfinal GeoPoint out = GeoPoint.fromIntString(\"52387524,4891604\");\n\t\tassertEquals(\"toFromString without altitude\", in, out);\n\t}",
"class_method_signature": "GeoPointTest.test_toFromString_withoutAltitude()",
"constructor": false,
"full_signature": "@Test public void test_toFromString_withoutAltitude()",
"identifier": "test_toFromString_withoutAltitude",
"invocations": [
"fromIntString",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_toFromString_withoutAltitude()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Deprecated\n\tpublic static GeoPoint fromIntString(final String s) {\n\t\tfinal int commaPos1 = s.indexOf(',');\n\t\tfinal int commaPos2 = s.indexOf(',', commaPos1 + 1);\n\n\t\tif (commaPos2 == -1) {\n\t\t\treturn new GeoPoint(\n\t\t\t\t\tInteger.parseInt(s.substring(0, commaPos1)),\n\t\t\t\t\tInteger.parseInt(s.substring(commaPos1 + 1, s.length())));\n\t\t} else {\n\t\t\treturn new GeoPoint(\n\t\t\t\t\tInteger.parseInt(s.substring(0, commaPos1)),\n\t\t\t\t\tInteger.parseInt(s.substring(commaPos1 + 1, commaPos2)),\n\t\t\t\t\tInteger.parseInt(s.substring(commaPos2 + 1, s.length()))\n\t\t\t);\n\t\t}\n\t}",
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"invocations": [
"indexOf",
"indexOf",
"parseInt",
"substring",
"parseInt",
"substring",
"length",
"parseInt",
"substring",
"parseInt",
"substring",
"parseInt",
"substring",
"length"
],
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_40 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private static final",
"original_string": "private static final Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
},
{
"declarator": "mMaxCoordinate = 2000",
"modifier": "private static final",
"original_string": "private static final int mMaxCoordinate = 2000;",
"type": "int",
"var_name": "mMaxCoordinate"
},
{
"declarator": "mIterations = 100",
"modifier": "private static final",
"original_string": "private static final int mIterations = 100;",
"type": "int",
"var_name": "mIterations"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/RectLTest.java",
"identifier": "RectLTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetBounds0() {\n final double degrees = 0;\n final RectL in = new RectL();\n final RectL out = new RectL();\n for (int i = 0 ; i < mIterations ; i ++) {\n in.top = getRandomCoordinate();\n in.left = getRandomCoordinate();\n in.bottom = getRandomCoordinate();\n in.right = getRandomCoordinate();\n final long centerX = getRandomCoordinate();\n final long centerY = getRandomCoordinate();\n RectL.getBounds(in, centerX, centerY, degrees, out);\n Assert.assertEquals(in.top, out.top);\n Assert.assertEquals(in.left, out.left);\n Assert.assertEquals(in.bottom, out.bottom);\n Assert.assertEquals(in.right, out.right);\n }\n }",
"class_method_signature": "RectLTest.testGetBounds0()",
"constructor": false,
"full_signature": "@Test public void testGetBounds0()",
"identifier": "testGetBounds0",
"invocations": [
"getRandomCoordinate",
"getRandomCoordinate",
"getRandomCoordinate",
"getRandomCoordinate",
"getRandomCoordinate",
"getRandomCoordinate",
"getBounds",
"assertEquals",
"assertEquals",
"assertEquals",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetBounds0()",
"testcase": true
} | {
"fields": [
{
"declarator": "left",
"modifier": "public",
"original_string": "public long left;",
"type": "long",
"var_name": "left"
},
{
"declarator": "top",
"modifier": "public",
"original_string": "public long top;",
"type": "long",
"var_name": "top"
},
{
"declarator": "right",
"modifier": "public",
"original_string": "public long right;",
"type": "long",
"var_name": "right"
},
{
"declarator": "bottom",
"modifier": "public",
"original_string": "public long bottom;",
"type": "long",
"var_name": "bottom"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/RectL.java",
"identifier": "RectL",
"interfaces": "",
"methods": [
{
"class_method_signature": "RectL.RectL()",
"constructor": true,
"full_signature": "public RectL()",
"identifier": "RectL",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " RectL()",
"testcase": false
},
{
"class_method_signature": "RectL.RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": true,
"full_signature": "public RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "RectL",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "",
"signature": " RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.RectL(final RectL pOther)",
"constructor": true,
"full_signature": "public RectL(final RectL pOther)",
"identifier": "RectL",
"modifiers": "public",
"parameters": "(final RectL pOther)",
"return": "",
"signature": " RectL(final RectL pOther)",
"testcase": false
},
{
"class_method_signature": "RectL.set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": false,
"full_signature": "public void set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "void",
"signature": "void set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.set(final RectL pOther)",
"constructor": false,
"full_signature": "public void set(final RectL pOther)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final RectL pOther)",
"return": "void",
"signature": "void set(final RectL pOther)",
"testcase": false
},
{
"class_method_signature": "RectL.union(long x, long y)",
"constructor": false,
"full_signature": "public void union(long x, long y)",
"identifier": "union",
"modifiers": "public",
"parameters": "(long x, long y)",
"return": "void",
"signature": "void union(long x, long y)",
"testcase": false
},
{
"class_method_signature": "RectL.intersects(RectL a, RectL b)",
"constructor": false,
"full_signature": "public static boolean intersects(RectL a, RectL b)",
"identifier": "intersects",
"modifiers": "public static",
"parameters": "(RectL a, RectL b)",
"return": "boolean",
"signature": "boolean intersects(RectL a, RectL b)",
"testcase": false
},
{
"class_method_signature": "RectL.contains(long x, long y)",
"constructor": false,
"full_signature": "public boolean contains(long x, long y)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(long x, long y)",
"return": "boolean",
"signature": "boolean contains(long x, long y)",
"testcase": false
},
{
"class_method_signature": "RectL.inset(long dx, long dy)",
"constructor": false,
"full_signature": "public void inset(long dx, long dy)",
"identifier": "inset",
"modifiers": "public",
"parameters": "(long dx, long dy)",
"return": "void",
"signature": "void inset(long dx, long dy)",
"testcase": false
},
{
"class_method_signature": "RectL.width()",
"constructor": false,
"full_signature": "public final long width()",
"identifier": "width",
"modifiers": "public final",
"parameters": "()",
"return": "long",
"signature": "long width()",
"testcase": false
},
{
"class_method_signature": "RectL.height()",
"constructor": false,
"full_signature": "public final long height()",
"identifier": "height",
"modifiers": "public final",
"parameters": "()",
"return": "long",
"signature": "long height()",
"testcase": false
},
{
"class_method_signature": "RectL.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "RectL.equals(Object o)",
"constructor": false,
"full_signature": "@Override public boolean equals(Object o)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(Object o)",
"return": "boolean",
"signature": "boolean equals(Object o)",
"testcase": false
},
{
"class_method_signature": "RectL.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "RectL.getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"constructor": false,
"full_signature": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"identifier": "getBounds",
"modifiers": "public static",
"parameters": "(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"return": "RectL",
"signature": "RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"testcase": false
},
{
"class_method_signature": "RectL.getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"identifier": "getBounds",
"modifiers": "public static",
"parameters": "(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"return": "Rect",
"signature": "Rect getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"constructor": false,
"full_signature": "public static long getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"identifier": "getRotatedX",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"return": "long",
"signature": "long getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"constructor": false,
"full_signature": "public static long getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"identifier": "getRotatedY",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"return": "long",
"signature": "long getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"constructor": false,
"full_signature": "public static long getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"identifier": "getRotatedX",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"return": "long",
"signature": "long getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"constructor": false,
"full_signature": "public static long getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"identifier": "getRotatedY",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"return": "long",
"signature": "long getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"testcase": false
},
{
"class_method_signature": "RectL.offset(final long pDx, final long pDy)",
"constructor": false,
"full_signature": "public void offset(final long pDx, final long pDy)",
"identifier": "offset",
"modifiers": "public",
"parameters": "(final long pDx, final long pDy)",
"return": "void",
"signature": "void offset(final long pDx, final long pDy)",
"testcase": false
},
{
"class_method_signature": "RectL.union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": false,
"full_signature": "public void union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "union",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "void",
"signature": "void union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.union(final RectL pRect)",
"constructor": false,
"full_signature": "public void union(final RectL pRect)",
"identifier": "union",
"modifiers": "public",
"parameters": "(final RectL pRect)",
"return": "void",
"signature": "void union(final RectL pRect)",
"testcase": false
},
{
"class_method_signature": "RectL.centerX()",
"constructor": false,
"full_signature": "public long centerX()",
"identifier": "centerX",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long centerX()",
"testcase": false
},
{
"class_method_signature": "RectL.centerY()",
"constructor": false,
"full_signature": "public long centerY()",
"identifier": "centerY",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long centerY()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse) {\n final RectL out = pReuse != null ? pReuse : new RectL();\n if (pDegrees == 0) { // optimization\n out.top = pIn.top;\n out.left = pIn.left;\n out.bottom = pIn.bottom;\n out.right = pIn.right;\n return out;\n }\n final double radians = pDegrees * Math.PI / 180.;\n final double cos = Math.cos(radians);\n final double sin = Math.sin(radians);\n long inputX;\n long inputY;\n long outputX;\n long outputY;\n inputX = pIn.left; // corner 1\n inputY = pIn.top;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n out.top = out.bottom = outputY;\n out.left = out.right = outputX;\n inputX = pIn.right; // corner 2\n inputY = pIn.top;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n inputX = pIn.right; // corner 3\n inputY = pIn.bottom;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n inputX = pIn.left; // corner 4\n inputY = pIn.bottom;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n return out;\n }",
"class_method_signature": "RectL.getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"constructor": false,
"full_signature": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"identifier": "getBounds",
"invocations": [
"cos",
"sin",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY"
],
"modifiers": "public static",
"parameters": "(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"return": "RectL",
"signature": "RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_17 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/SpeechBalloonHelperTest.java",
"identifier": "SpeechBalloonHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCompute() {\n final SpeechBalloonHelper helper = new SpeechBalloonHelper();\n final long radius = 10;\n final RectL inputRect = new RectL();\n final PointL inputPoint = new PointL();\n final PointL intersection1 = new PointL();\n final PointL intersection2 = new PointL();\n inputRect.set(0, 0, 100, 100);\n\n inputPoint.set(1, 1);\n Assert.assertEquals(SpeechBalloonHelper.CORNER_INSIDE,\n helper.compute(inputRect, inputPoint, radius, intersection1, intersection2));\n\n inputPoint.set(50, 200);\n Assert.assertEquals(SpeechBalloonHelper.CORNER_NONE,\n helper.compute(inputRect, inputPoint, radius, intersection1, intersection2));\n Assert.assertEquals(100, intersection1.y);\n Assert.assertEquals(100, intersection2.y);\n\n inputPoint.set(50, -200);\n Assert.assertEquals(SpeechBalloonHelper.CORNER_NONE,\n helper.compute(inputRect, inputPoint, radius, intersection1, intersection2));\n Assert.assertEquals(0, intersection1.y);\n Assert.assertEquals(0, intersection2.y);\n\n inputPoint.set(110, 110);\n Assert.assertEquals(SpeechBalloonHelper.CORNER_BOTTOM |SpeechBalloonHelper.CORNER_RIGHT,\n helper.compute(inputRect, inputPoint, radius, intersection1, intersection2));\n Assert.assertEquals(100, intersection1.x);\n Assert.assertEquals(100, intersection2.y);\n\n inputPoint.set(-10, -10);\n Assert.assertEquals(SpeechBalloonHelper.CORNER_TOP |SpeechBalloonHelper.CORNER_LEFT,\n helper.compute(inputRect, inputPoint, radius, intersection1, intersection2));\n Assert.assertEquals(0, intersection1.x);\n Assert.assertEquals(0, intersection2.y);\n\n inputPoint.set(-10, 110);\n Assert.assertEquals(SpeechBalloonHelper.CORNER_BOTTOM |SpeechBalloonHelper.CORNER_LEFT,\n helper.compute(inputRect, inputPoint, radius, intersection1, intersection2));\n Assert.assertEquals(0, intersection2.x);\n Assert.assertEquals(100, intersection1.y);\n\n inputPoint.set(110, -10);\n Assert.assertEquals(SpeechBalloonHelper.CORNER_TOP |SpeechBalloonHelper.CORNER_RIGHT,\n helper.compute(inputRect, inputPoint, radius, intersection1, intersection2));\n Assert.assertEquals(100, intersection2.x);\n Assert.assertEquals(0, intersection1.y);\n }",
"class_method_signature": "SpeechBalloonHelperTest.testCompute()",
"constructor": false,
"full_signature": "@Test public void testCompute()",
"identifier": "testCompute",
"invocations": [
"set",
"set",
"assertEquals",
"compute",
"set",
"assertEquals",
"compute",
"assertEquals",
"assertEquals",
"set",
"assertEquals",
"compute",
"assertEquals",
"assertEquals",
"set",
"assertEquals",
"compute",
"assertEquals",
"assertEquals",
"set",
"assertEquals",
"compute",
"assertEquals",
"assertEquals",
"set",
"assertEquals",
"compute",
"assertEquals",
"assertEquals",
"set",
"assertEquals",
"compute",
"assertEquals",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCompute()",
"testcase": true
} | {
"fields": [
{
"declarator": "CORNER_INSIDE = -1",
"modifier": "public static final",
"original_string": "public static final int CORNER_INSIDE = -1;",
"type": "int",
"var_name": "CORNER_INSIDE"
},
{
"declarator": "CORNER_NONE = 0",
"modifier": "public static final",
"original_string": "public static final int CORNER_NONE = 0;",
"type": "int",
"var_name": "CORNER_NONE"
},
{
"declarator": "CORNER_LEFT = 1",
"modifier": "public static final",
"original_string": "public static final int CORNER_LEFT = 1;",
"type": "int",
"var_name": "CORNER_LEFT"
},
{
"declarator": "CORNER_RIGHT = 2",
"modifier": "public static final",
"original_string": "public static final int CORNER_RIGHT = 2;",
"type": "int",
"var_name": "CORNER_RIGHT"
},
{
"declarator": "CORNER_TOP = 4",
"modifier": "public static final",
"original_string": "public static final int CORNER_TOP = 4;",
"type": "int",
"var_name": "CORNER_TOP"
},
{
"declarator": "CORNER_BOTTOM = 8",
"modifier": "public static final",
"original_string": "public static final int CORNER_BOTTOM = 8;",
"type": "int",
"var_name": "CORNER_BOTTOM"
},
{
"declarator": "mTrianglePoint = new PointL()",
"modifier": "private final",
"original_string": "private final PointL mTrianglePoint = new PointL();",
"type": "PointL",
"var_name": "mTrianglePoint"
},
{
"declarator": "mRect",
"modifier": "private",
"original_string": "private RectL mRect;",
"type": "RectL",
"var_name": "mRect"
},
{
"declarator": "mPoint",
"modifier": "private",
"original_string": "private PointL mPoint;",
"type": "PointL",
"var_name": "mPoint"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/SpeechBalloonHelper.java",
"identifier": "SpeechBalloonHelper",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpeechBalloonHelper.compute(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2)",
"constructor": false,
"full_signature": "public int compute(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2)",
"identifier": "compute",
"modifiers": "public",
"parameters": "(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2)",
"return": "int",
"signature": "int compute(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2)",
"testcase": false
},
{
"class_method_signature": "SpeechBalloonHelper.checkIntersection(final PointL pIntersection)",
"constructor": false,
"full_signature": "private int checkIntersection(final PointL pIntersection)",
"identifier": "checkIntersection",
"modifiers": "private",
"parameters": "(final PointL pIntersection)",
"return": "int",
"signature": "int checkIntersection(final PointL pIntersection)",
"testcase": false
},
{
"class_method_signature": "SpeechBalloonHelper.checkIntersectionX(final long pX, final PointL pIntersection)",
"constructor": false,
"full_signature": "private boolean checkIntersectionX(final long pX, final PointL pIntersection)",
"identifier": "checkIntersectionX",
"modifiers": "private",
"parameters": "(final long pX, final PointL pIntersection)",
"return": "boolean",
"signature": "boolean checkIntersectionX(final long pX, final PointL pIntersection)",
"testcase": false
},
{
"class_method_signature": "SpeechBalloonHelper.checkIntersectionY(final long pY, final PointL pIntersection)",
"constructor": false,
"full_signature": "private boolean checkIntersectionY(final long pY, final PointL pIntersection)",
"identifier": "checkIntersectionY",
"modifiers": "private",
"parameters": "(final long pY, final PointL pIntersection)",
"return": "boolean",
"signature": "boolean checkIntersectionY(final long pY, final PointL pIntersection)",
"testcase": false
},
{
"class_method_signature": "SpeechBalloonHelper.computeCirclePoint(final PointL pDestination, final double pRadius,\n final double pAngle, final boolean pFirst)",
"constructor": false,
"full_signature": "private void computeCirclePoint(final PointL pDestination, final double pRadius,\n final double pAngle, final boolean pFirst)",
"identifier": "computeCirclePoint",
"modifiers": "private",
"parameters": "(final PointL pDestination, final double pRadius,\n final double pAngle, final boolean pFirst)",
"return": "void",
"signature": "void computeCirclePoint(final PointL pDestination, final double pRadius,\n final double pAngle, final boolean pFirst)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public int compute(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2) {\n mRect = pInputRect;\n mPoint = pInputPoint;\n\n if (pInputRect.contains(mPoint.x, mPoint.y)) {\n return CORNER_INSIDE;\n }\n\n final double angle = MyMath.computeAngle(mRect.centerX(), mRect.centerY(), mPoint.x, mPoint.y);\n\n computeCirclePoint(mTrianglePoint, pInputRadius, angle, false);\n final int corner1 = checkIntersection(pOutputIntersection1);\n computeCirclePoint(mTrianglePoint, pInputRadius, angle, true);\n final int corner2 = checkIntersection(pOutputIntersection2);\n if (corner1 == corner2) {\n return CORNER_NONE;\n }\n return corner1 | corner2;\n }",
"class_method_signature": "SpeechBalloonHelper.compute(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2)",
"constructor": false,
"full_signature": "public int compute(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2)",
"identifier": "compute",
"invocations": [
"contains",
"computeAngle",
"centerX",
"centerY",
"computeCirclePoint",
"checkIntersection",
"computeCirclePoint",
"checkIntersection"
],
"modifiers": "public",
"parameters": "(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2)",
"return": "int",
"signature": "int compute(final RectL pInputRect, final PointL pInputPoint, final double pInputRadius,\n final PointL pOutputIntersection1, final PointL pOutputIntersection2)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_56 | {
"fields": [
{
"declarator": "DELTA = 1E-20",
"modifier": "private static final",
"original_string": "private static final double DELTA = 1E-20;",
"type": "double",
"var_name": "DELTA"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MyMathTest.java",
"identifier": "MyMathTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComputeAngle() {\n final double delta = 1E-10;\n final long value = 10;\n Assert.assertEquals(0, MyMath.computeAngle(0, 0, value, 0), delta);\n Assert.assertEquals(Math.PI, MyMath.computeAngle(0, 0, -value, 0), delta);\n Assert.assertEquals(-Math.PI / 2, MyMath.computeAngle(0, 0, 0, -value), delta);\n Assert.assertEquals(Math.PI / 2, MyMath.computeAngle(0, 0, 0, value), delta);\n Assert.assertEquals(-Math.PI / 4, MyMath.computeAngle(0, 0, value, -value), delta);\n Assert.assertEquals(Math.PI / 4, MyMath.computeAngle(0, 0, value, value), delta);\n Assert.assertEquals(-3 * Math.PI / 4, MyMath.computeAngle(0, 0, -value, -value), delta);\n Assert.assertEquals(3 * Math.PI / 4, MyMath.computeAngle(0, 0, -value, value), delta);\n }",
"class_method_signature": "MyMathTest.testComputeAngle()",
"constructor": false,
"full_signature": "@Test public void testComputeAngle()",
"identifier": "testComputeAngle",
"invocations": [
"assertEquals",
"computeAngle",
"assertEquals",
"computeAngle",
"assertEquals",
"computeAngle",
"assertEquals",
"computeAngle",
"assertEquals",
"computeAngle",
"assertEquals",
"computeAngle",
"assertEquals",
"computeAngle",
"assertEquals",
"computeAngle"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testComputeAngle()",
"testcase": true
} | {
"fields": [],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MyMath.java",
"identifier": "MyMath",
"interfaces": "implements MathConstants",
"methods": [
{
"class_method_signature": "MyMath.MyMath()",
"constructor": true,
"full_signature": "private MyMath()",
"identifier": "MyMath",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " MyMath()",
"testcase": false
},
{
"class_method_signature": "MyMath.gudermannInverse(final double aLatitude)",
"constructor": false,
"full_signature": "public static double gudermannInverse(final double aLatitude)",
"identifier": "gudermannInverse",
"modifiers": "public static",
"parameters": "(final double aLatitude)",
"return": "double",
"signature": "double gudermannInverse(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "MyMath.gudermann(final double y)",
"constructor": false,
"full_signature": "public static double gudermann(final double y)",
"identifier": "gudermann",
"modifiers": "public static",
"parameters": "(final double y)",
"return": "double",
"signature": "double gudermann(final double y)",
"testcase": false
},
{
"class_method_signature": "MyMath.mod(int number, final int modulus)",
"constructor": false,
"full_signature": "public static int mod(int number, final int modulus)",
"identifier": "mod",
"modifiers": "public static",
"parameters": "(int number, final int modulus)",
"return": "int",
"signature": "int mod(int number, final int modulus)",
"testcase": false
},
{
"class_method_signature": "MyMath.floorToLong(final double pValue)",
"constructor": false,
"full_signature": "public static long floorToLong(final double pValue)",
"identifier": "floorToLong",
"modifiers": "public static",
"parameters": "(final double pValue)",
"return": "long",
"signature": "long floorToLong(final double pValue)",
"testcase": false
},
{
"class_method_signature": "MyMath.floorToInt(final double pValue)",
"constructor": false,
"full_signature": "public static int floorToInt(final double pValue)",
"identifier": "floorToInt",
"modifiers": "public static",
"parameters": "(final double pValue)",
"return": "int",
"signature": "int floorToInt(final double pValue)",
"testcase": false
},
{
"class_method_signature": "MyMath.getNextSquareNumberAbove(final float factor)",
"constructor": false,
"full_signature": "public static int getNextSquareNumberAbove(final float factor)",
"identifier": "getNextSquareNumberAbove",
"modifiers": "public static",
"parameters": "(final float factor)",
"return": "int",
"signature": "int getNextSquareNumberAbove(final float factor)",
"testcase": false
},
{
"class_method_signature": "MyMath.getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"constructor": false,
"full_signature": "public static double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"identifier": "getAngleDifference",
"modifiers": "public static",
"parameters": "(double pStart, double pEnd, final Boolean pClockwise)",
"return": "double",
"signature": "double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"testcase": false
},
{
"class_method_signature": "MyMath.cleanPositiveAngle(double pAngle)",
"constructor": false,
"full_signature": "public static double cleanPositiveAngle(double pAngle)",
"identifier": "cleanPositiveAngle",
"modifiers": "public static",
"parameters": "(double pAngle)",
"return": "double",
"signature": "double cleanPositiveAngle(double pAngle)",
"testcase": false
},
{
"class_method_signature": "MyMath.computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"constructor": false,
"full_signature": "public static double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"identifier": "computeAngle",
"modifiers": "public static",
"parameters": "(final long pX1, final long pY1, final long pX2, final long pY2)",
"return": "double",
"signature": "double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"testcase": false
},
{
"class_method_signature": "MyMath.computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"constructor": false,
"full_signature": "public static void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"identifier": "computeCirclePoint",
"modifiers": "public static",
"parameters": "(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"return": "void",
"signature": "void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2) {\n\t\treturn Math.atan2(pY2 - pY1, pX2 - pX1);\n\t}",
"class_method_signature": "MyMath.computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"constructor": false,
"full_signature": "public static double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"identifier": "computeAngle",
"invocations": [
"atan2"
],
"modifiers": "public static",
"parameters": "(final long pX1, final long pY1, final long pX2, final long pY2)",
"return": "double",
"signature": "double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_6 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "XY01Delta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double XY01Delta = 1E-10;",
"type": "double",
"var_name": "XY01Delta"
},
{
"declarator": "latLongDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double latLongDelta = 1E-10;",
"type": "double",
"var_name": "latLongDelta"
},
{
"declarator": "mMinZoomLevel = 0",
"modifier": "private static final",
"original_string": "private static final int mMinZoomLevel = 0;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel = TileSystem.getMaximumZoomLevel()",
"modifier": "private static final",
"original_string": "private static final int mMaxZoomLevel = TileSystem.getMaximumZoomLevel();",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/TileSystemTest.java",
"identifier": "TileSystemTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_groundResolution() {\n final double delta = 1e-4;\n\n for (int zoomLevel = mMinZoomLevel ; zoomLevel <= mMaxZoomLevel ; zoomLevel ++) {\n Assert.assertEquals(156543.034 / (1 << zoomLevel), TileSystem.GroundResolution(0, zoomLevel), delta);\n }\n }",
"class_method_signature": "TileSystemTest.test_groundResolution()",
"constructor": false,
"full_signature": "@Test public void test_groundResolution()",
"identifier": "test_groundResolution",
"invocations": [
"assertEquals",
"GroundResolution"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_groundResolution()",
"testcase": true
} | {
"fields": [
{
"declarator": "EarthRadius = GeoConstants.RADIUS_EARTH_METERS",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double EarthRadius = GeoConstants.RADIUS_EARTH_METERS;",
"type": "double",
"var_name": "EarthRadius"
},
{
"declarator": "MinLatitude = -85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLatitude = -85.05112877980659;",
"type": "double",
"var_name": "MinLatitude"
},
{
"declarator": "MaxLatitude = 85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLatitude = 85.05112877980659;",
"type": "double",
"var_name": "MaxLatitude"
},
{
"declarator": "MinLongitude = -180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLongitude = -180d;",
"type": "double",
"var_name": "MinLongitude"
},
{
"declarator": "MaxLongitude = 180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLongitude = 180d;",
"type": "double",
"var_name": "MaxLongitude"
},
{
"declarator": "mTileSize = 256",
"modifier": "private static",
"original_string": "private static int mTileSize = 256;",
"type": "int",
"var_name": "mTileSize"
},
{
"declarator": "primaryKeyMaxZoomLevel = 29",
"modifier": "public static final",
"original_string": "public static final int primaryKeyMaxZoomLevel = 29;",
"type": "int",
"var_name": "primaryKeyMaxZoomLevel"
},
{
"declarator": "projectionZoomLevel = primaryKeyMaxZoomLevel + 1",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final int projectionZoomLevel = primaryKeyMaxZoomLevel + 1;",
"type": "int",
"var_name": "projectionZoomLevel"
},
{
"declarator": "mMaxZoomLevel = primaryKeyMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mMaxZoomLevel = primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java",
"identifier": "TileSystem",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSystem.setTileSize(final int tileSize)",
"constructor": false,
"full_signature": "public static void setTileSize(final int tileSize)",
"identifier": "setTileSize",
"modifiers": "public static",
"parameters": "(final int tileSize)",
"return": "void",
"signature": "void setTileSize(final int tileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize()",
"constructor": false,
"full_signature": "public static int getTileSize()",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getTileSize()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaximumZoomLevel()",
"constructor": false,
"full_signature": "public static int getMaximumZoomLevel()",
"identifier": "getMaximumZoomLevel",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getMaximumZoomLevel()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getTileSize(final double pZoomLevel)",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getTileSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getInputTileZoomLevel(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static int getInputTileZoomLevel(final double pZoomLevel)",
"identifier": "getInputTileZoomLevel",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "int",
"signature": "int getInputTileZoomLevel(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double MapSize(final double pZoomLevel)",
"identifier": "MapSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double MapSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getFactor(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getFactor(final double pZoomLevel)",
"identifier": "getFactor",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getFactor(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final double zoomLevel)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final double zoomLevel)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final double zoomLevel)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final double zoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolutionMapSize(double latitude, final double mapSize)",
"constructor": false,
"full_signature": "public static double GroundResolutionMapSize(double latitude, final double mapSize)",
"identifier": "GroundResolutionMapSize",
"modifiers": "public static",
"parameters": "(double latitude, final double mapSize)",
"return": "double",
"signature": "double GroundResolutionMapSize(double latitude, final double mapSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"return": "Point",
"signature": "Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"identifier": "LatLongToPixelXYMapSize",
"modifiers": "@Deprecated public",
"parameters": "(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongWithoutWrap",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude)",
"constructor": false,
"full_signature": "abstract public double getX01FromLongitude(double longitude)",
"identifier": "getX01FromLongitude",
"modifiers": "abstract public",
"parameters": "(double longitude)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "abstract public double getY01FromLatitude(final double pLatitude)",
"identifier": "getY01FromLatitude",
"modifiers": "abstract public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double getY01FromLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"identifier": "PixelXYToLatLongMapSize",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongMapSizeWithoutWrap",
"modifiers": "public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final double n, final double minValue, final double maxValue)",
"constructor": false,
"full_signature": "public static double Clip(final double n, final double minValue, final double maxValue)",
"identifier": "Clip",
"modifiers": "public static",
"parameters": "(final double n, final double minValue, final double maxValue)",
"return": "double",
"signature": "double Clip(final double n, final double minValue, final double maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY, final Point reuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final Rect rect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int tileX, final int tileY, final Point reuse)",
"return": "Point",
"signature": "Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"return": "PointL",
"signature": "PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"identifier": "TileXYToQuadKey",
"modifiers": "public static",
"parameters": "(final int tileX, final int tileY, final int levelOfDetail)",
"return": "String",
"signature": "String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.QuadKeyToTileXY(final String quadKey, final Point reuse)",
"constructor": false,
"full_signature": "public static Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"identifier": "QuadKeyToTileXY",
"modifiers": "public static",
"parameters": "(final String quadKey, final Point reuse)",
"return": "Point",
"signature": "Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"constructor": false,
"full_signature": "public double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"identifier": "getLongitudeZoom",
"modifiers": "public",
"parameters": "(final double pEast, final double pWest, final int pScreenWidth)",
"return": "double",
"signature": "double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"identifier": "getLatitudeZoom",
"modifiers": "public",
"parameters": "(final double pNorth, final double pSouth, final int pScreenHeight)",
"return": "double",
"signature": "double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.wrap(double n, final double minValue, final double maxValue, final double interval)",
"constructor": false,
"full_signature": "private static double wrap(double n, final double minValue, final double maxValue, final double interval)",
"identifier": "wrap",
"modifiers": "private static",
"parameters": "(double n, final double minValue, final double maxValue, final double interval)",
"return": "double",
"signature": "double wrap(double n, final double minValue, final double maxValue, final double interval)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorFromXY01",
"modifiers": "public",
"parameters": "(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01)",
"constructor": false,
"full_signature": "abstract public double getLatitudeFromY01(final double pY01)",
"identifier": "getLatitudeFromY01",
"modifiers": "abstract public",
"parameters": "(final double pY01)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01)",
"constructor": false,
"full_signature": "abstract public double getLongitudeFromX01(final double pX01)",
"identifier": "getLongitudeFromX01",
"modifiers": "abstract public",
"parameters": "(final double pX01)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"identifier": "getCleanMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"constructor": false,
"full_signature": "public static long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"identifier": "ClipToLong",
"modifiers": "public static",
"parameters": "(final double pValue, final double pMax, final boolean pWrapEnabled)",
"return": "long",
"signature": "long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final long n, final long minValue, final long maxValue)",
"constructor": false,
"full_signature": "@Deprecated public static long Clip(final long n, final long minValue, final long maxValue)",
"identifier": "Clip",
"modifiers": "@Deprecated public static",
"parameters": "(final long n, final long minValue, final long maxValue)",
"return": "long",
"signature": "long Clip(final long n, final long minValue, final long maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.truncateToInt(final long value)",
"constructor": false,
"full_signature": "public static int truncateToInt(final long value)",
"identifier": "truncateToInt",
"modifiers": "public static",
"parameters": "(final long value)",
"return": "int",
"signature": "int truncateToInt(final long value)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"identifier": "getMercatorFromGeo",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"return": "PointL",
"signature": "PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "public GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"identifier": "getGeoFromMercator",
"modifiers": "public",
"parameters": "(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"identifier": "getXY01FromMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"return": "double",
"signature": "double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLongitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLongitude(final double pRandom01)",
"identifier": "getRandomLongitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLongitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01, final double pMinLatitude)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final long pMercator, final double pTileSize)",
"constructor": false,
"full_signature": "public static int getTileFromMercator(final long pMercator, final double pTileSize)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final long pMercator, final double pTileSize)",
"return": "int",
"signature": "int getTileFromMercator(final long pMercator, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromTile(final int pTile, final double pTileSize)",
"constructor": false,
"full_signature": "public static long getMercatorFromTile(final int pTile, final double pTileSize)",
"identifier": "getMercatorFromTile",
"modifiers": "public static",
"parameters": "(final int pTile, final double pTileSize)",
"return": "long",
"signature": "long getMercatorFromTile(final int pTile, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLatitude()",
"constructor": false,
"full_signature": "abstract public double getMinLatitude()",
"identifier": "getMinLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLatitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLatitude()",
"identifier": "getMaxLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLongitude()",
"constructor": false,
"full_signature": "abstract public double getMinLongitude()",
"identifier": "getMinLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLongitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLongitude()",
"identifier": "getMaxLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public double cleanLongitude(final double pLongitude)",
"identifier": "cleanLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "double",
"signature": "double cleanLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public double cleanLatitude(final double pLatitude)",
"identifier": "cleanLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double cleanLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public boolean isValidLongitude(final double pLongitude)",
"identifier": "isValidLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "boolean",
"signature": "boolean isValidLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public boolean isValidLatitude(final double pLatitude)",
"identifier": "isValidLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "boolean",
"signature": "boolean isValidLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLongitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLongitudeSpan()",
"identifier": "toStringLongitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLatitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLatitudeSpan()",
"identifier": "toStringLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileXFromLongitude(final double pLongitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"identifier": "getTileXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final int pZoom)",
"return": "int",
"signature": "int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileYFromLatitude(final double pLatitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"identifier": "getTileYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final int pZoom)",
"return": "int",
"signature": "int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromTileY(final int pY, final int pZoom)",
"constructor": false,
"full_signature": "public double getLatitudeFromTileY(final int pY, final int pZoom)",
"identifier": "getLatitudeFromTileY",
"modifiers": "public",
"parameters": "(final int pY, final int pZoom)",
"return": "double",
"signature": "double getLatitudeFromTileY(final int pY, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromTileX(final int pX, final int pZoom)",
"constructor": false,
"full_signature": "public double getLongitudeFromTileX(final int pX, final int pZoom)",
"identifier": "getLongitudeFromTileX",
"modifiers": "public",
"parameters": "(final int pX, final int pZoom)",
"return": "double",
"signature": "double getLongitudeFromTileX(final int pX, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.clipTile(final int pTile, final int pZoom)",
"constructor": false,
"full_signature": "private int clipTile(final int pTile, final int pZoom)",
"identifier": "clipTile",
"modifiers": "private",
"parameters": "(final int pTile, final int pZoom)",
"return": "int",
"signature": "int clipTile(final int pTile, final int pZoom)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static double GroundResolution(final double latitude, final int levelOfDetail) {\n\t\treturn GroundResolution(latitude, (double)levelOfDetail);\n\t}",
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"invocations": [
"GroundResolution"
],
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_7 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "XY01Delta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double XY01Delta = 1E-10;",
"type": "double",
"var_name": "XY01Delta"
},
{
"declarator": "latLongDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double latLongDelta = 1E-10;",
"type": "double",
"var_name": "latLongDelta"
},
{
"declarator": "mMinZoomLevel = 0",
"modifier": "private static final",
"original_string": "private static final int mMinZoomLevel = 0;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel = TileSystem.getMaximumZoomLevel()",
"modifier": "private static final",
"original_string": "private static final int mMaxZoomLevel = TileSystem.getMaximumZoomLevel();",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/TileSystemTest.java",
"identifier": "TileSystemTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_groundMapScale() {\n final double delta = 1e-2;\n\n for (int zoomLevel = mMinZoomLevel ; zoomLevel <= mMaxZoomLevel ; zoomLevel ++) {\n Assert.assertEquals(591658710.9 / (1 << zoomLevel), TileSystem.MapScale(0, zoomLevel, 96), delta);\n }\n }",
"class_method_signature": "TileSystemTest.test_groundMapScale()",
"constructor": false,
"full_signature": "@Test public void test_groundMapScale()",
"identifier": "test_groundMapScale",
"invocations": [
"assertEquals",
"MapScale"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_groundMapScale()",
"testcase": true
} | {
"fields": [
{
"declarator": "EarthRadius = GeoConstants.RADIUS_EARTH_METERS",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double EarthRadius = GeoConstants.RADIUS_EARTH_METERS;",
"type": "double",
"var_name": "EarthRadius"
},
{
"declarator": "MinLatitude = -85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLatitude = -85.05112877980659;",
"type": "double",
"var_name": "MinLatitude"
},
{
"declarator": "MaxLatitude = 85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLatitude = 85.05112877980659;",
"type": "double",
"var_name": "MaxLatitude"
},
{
"declarator": "MinLongitude = -180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLongitude = -180d;",
"type": "double",
"var_name": "MinLongitude"
},
{
"declarator": "MaxLongitude = 180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLongitude = 180d;",
"type": "double",
"var_name": "MaxLongitude"
},
{
"declarator": "mTileSize = 256",
"modifier": "private static",
"original_string": "private static int mTileSize = 256;",
"type": "int",
"var_name": "mTileSize"
},
{
"declarator": "primaryKeyMaxZoomLevel = 29",
"modifier": "public static final",
"original_string": "public static final int primaryKeyMaxZoomLevel = 29;",
"type": "int",
"var_name": "primaryKeyMaxZoomLevel"
},
{
"declarator": "projectionZoomLevel = primaryKeyMaxZoomLevel + 1",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final int projectionZoomLevel = primaryKeyMaxZoomLevel + 1;",
"type": "int",
"var_name": "projectionZoomLevel"
},
{
"declarator": "mMaxZoomLevel = primaryKeyMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mMaxZoomLevel = primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java",
"identifier": "TileSystem",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSystem.setTileSize(final int tileSize)",
"constructor": false,
"full_signature": "public static void setTileSize(final int tileSize)",
"identifier": "setTileSize",
"modifiers": "public static",
"parameters": "(final int tileSize)",
"return": "void",
"signature": "void setTileSize(final int tileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize()",
"constructor": false,
"full_signature": "public static int getTileSize()",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getTileSize()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaximumZoomLevel()",
"constructor": false,
"full_signature": "public static int getMaximumZoomLevel()",
"identifier": "getMaximumZoomLevel",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getMaximumZoomLevel()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getTileSize(final double pZoomLevel)",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getTileSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getInputTileZoomLevel(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static int getInputTileZoomLevel(final double pZoomLevel)",
"identifier": "getInputTileZoomLevel",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "int",
"signature": "int getInputTileZoomLevel(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double MapSize(final double pZoomLevel)",
"identifier": "MapSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double MapSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getFactor(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getFactor(final double pZoomLevel)",
"identifier": "getFactor",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getFactor(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final double zoomLevel)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final double zoomLevel)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final double zoomLevel)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final double zoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolutionMapSize(double latitude, final double mapSize)",
"constructor": false,
"full_signature": "public static double GroundResolutionMapSize(double latitude, final double mapSize)",
"identifier": "GroundResolutionMapSize",
"modifiers": "public static",
"parameters": "(double latitude, final double mapSize)",
"return": "double",
"signature": "double GroundResolutionMapSize(double latitude, final double mapSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"return": "Point",
"signature": "Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"identifier": "LatLongToPixelXYMapSize",
"modifiers": "@Deprecated public",
"parameters": "(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongWithoutWrap",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude)",
"constructor": false,
"full_signature": "abstract public double getX01FromLongitude(double longitude)",
"identifier": "getX01FromLongitude",
"modifiers": "abstract public",
"parameters": "(double longitude)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "abstract public double getY01FromLatitude(final double pLatitude)",
"identifier": "getY01FromLatitude",
"modifiers": "abstract public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double getY01FromLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"identifier": "PixelXYToLatLongMapSize",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongMapSizeWithoutWrap",
"modifiers": "public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final double n, final double minValue, final double maxValue)",
"constructor": false,
"full_signature": "public static double Clip(final double n, final double minValue, final double maxValue)",
"identifier": "Clip",
"modifiers": "public static",
"parameters": "(final double n, final double minValue, final double maxValue)",
"return": "double",
"signature": "double Clip(final double n, final double minValue, final double maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY, final Point reuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final Rect rect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int tileX, final int tileY, final Point reuse)",
"return": "Point",
"signature": "Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"return": "PointL",
"signature": "PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"identifier": "TileXYToQuadKey",
"modifiers": "public static",
"parameters": "(final int tileX, final int tileY, final int levelOfDetail)",
"return": "String",
"signature": "String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.QuadKeyToTileXY(final String quadKey, final Point reuse)",
"constructor": false,
"full_signature": "public static Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"identifier": "QuadKeyToTileXY",
"modifiers": "public static",
"parameters": "(final String quadKey, final Point reuse)",
"return": "Point",
"signature": "Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"constructor": false,
"full_signature": "public double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"identifier": "getLongitudeZoom",
"modifiers": "public",
"parameters": "(final double pEast, final double pWest, final int pScreenWidth)",
"return": "double",
"signature": "double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"identifier": "getLatitudeZoom",
"modifiers": "public",
"parameters": "(final double pNorth, final double pSouth, final int pScreenHeight)",
"return": "double",
"signature": "double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.wrap(double n, final double minValue, final double maxValue, final double interval)",
"constructor": false,
"full_signature": "private static double wrap(double n, final double minValue, final double maxValue, final double interval)",
"identifier": "wrap",
"modifiers": "private static",
"parameters": "(double n, final double minValue, final double maxValue, final double interval)",
"return": "double",
"signature": "double wrap(double n, final double minValue, final double maxValue, final double interval)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorFromXY01",
"modifiers": "public",
"parameters": "(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01)",
"constructor": false,
"full_signature": "abstract public double getLatitudeFromY01(final double pY01)",
"identifier": "getLatitudeFromY01",
"modifiers": "abstract public",
"parameters": "(final double pY01)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01)",
"constructor": false,
"full_signature": "abstract public double getLongitudeFromX01(final double pX01)",
"identifier": "getLongitudeFromX01",
"modifiers": "abstract public",
"parameters": "(final double pX01)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"identifier": "getCleanMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"constructor": false,
"full_signature": "public static long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"identifier": "ClipToLong",
"modifiers": "public static",
"parameters": "(final double pValue, final double pMax, final boolean pWrapEnabled)",
"return": "long",
"signature": "long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final long n, final long minValue, final long maxValue)",
"constructor": false,
"full_signature": "@Deprecated public static long Clip(final long n, final long minValue, final long maxValue)",
"identifier": "Clip",
"modifiers": "@Deprecated public static",
"parameters": "(final long n, final long minValue, final long maxValue)",
"return": "long",
"signature": "long Clip(final long n, final long minValue, final long maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.truncateToInt(final long value)",
"constructor": false,
"full_signature": "public static int truncateToInt(final long value)",
"identifier": "truncateToInt",
"modifiers": "public static",
"parameters": "(final long value)",
"return": "int",
"signature": "int truncateToInt(final long value)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"identifier": "getMercatorFromGeo",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"return": "PointL",
"signature": "PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "public GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"identifier": "getGeoFromMercator",
"modifiers": "public",
"parameters": "(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"identifier": "getXY01FromMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"return": "double",
"signature": "double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLongitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLongitude(final double pRandom01)",
"identifier": "getRandomLongitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLongitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01, final double pMinLatitude)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final long pMercator, final double pTileSize)",
"constructor": false,
"full_signature": "public static int getTileFromMercator(final long pMercator, final double pTileSize)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final long pMercator, final double pTileSize)",
"return": "int",
"signature": "int getTileFromMercator(final long pMercator, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromTile(final int pTile, final double pTileSize)",
"constructor": false,
"full_signature": "public static long getMercatorFromTile(final int pTile, final double pTileSize)",
"identifier": "getMercatorFromTile",
"modifiers": "public static",
"parameters": "(final int pTile, final double pTileSize)",
"return": "long",
"signature": "long getMercatorFromTile(final int pTile, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLatitude()",
"constructor": false,
"full_signature": "abstract public double getMinLatitude()",
"identifier": "getMinLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLatitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLatitude()",
"identifier": "getMaxLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLongitude()",
"constructor": false,
"full_signature": "abstract public double getMinLongitude()",
"identifier": "getMinLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLongitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLongitude()",
"identifier": "getMaxLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public double cleanLongitude(final double pLongitude)",
"identifier": "cleanLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "double",
"signature": "double cleanLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public double cleanLatitude(final double pLatitude)",
"identifier": "cleanLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double cleanLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public boolean isValidLongitude(final double pLongitude)",
"identifier": "isValidLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "boolean",
"signature": "boolean isValidLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public boolean isValidLatitude(final double pLatitude)",
"identifier": "isValidLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "boolean",
"signature": "boolean isValidLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLongitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLongitudeSpan()",
"identifier": "toStringLongitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLatitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLatitudeSpan()",
"identifier": "toStringLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileXFromLongitude(final double pLongitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"identifier": "getTileXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final int pZoom)",
"return": "int",
"signature": "int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileYFromLatitude(final double pLatitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"identifier": "getTileYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final int pZoom)",
"return": "int",
"signature": "int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromTileY(final int pY, final int pZoom)",
"constructor": false,
"full_signature": "public double getLatitudeFromTileY(final int pY, final int pZoom)",
"identifier": "getLatitudeFromTileY",
"modifiers": "public",
"parameters": "(final int pY, final int pZoom)",
"return": "double",
"signature": "double getLatitudeFromTileY(final int pY, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromTileX(final int pX, final int pZoom)",
"constructor": false,
"full_signature": "public double getLongitudeFromTileX(final int pX, final int pZoom)",
"identifier": "getLongitudeFromTileX",
"modifiers": "public",
"parameters": "(final int pX, final int pZoom)",
"return": "double",
"signature": "double getLongitudeFromTileX(final int pX, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.clipTile(final int pTile, final int pZoom)",
"constructor": false,
"full_signature": "private int clipTile(final int pTile, final int pZoom)",
"identifier": "clipTile",
"modifiers": "private",
"parameters": "(final int pTile, final int pZoom)",
"return": "int",
"signature": "int clipTile(final int pTile, final int pZoom)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi) {\n\t\treturn GroundResolution(latitude, levelOfDetail) * screenDpi / 0.0254;\n\t}",
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"invocations": [
"GroundResolution"
],
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_57 | {
"fields": [
{
"declarator": "DELTA = 1E-20",
"modifier": "private static final",
"original_string": "private static final double DELTA = 1E-20;",
"type": "double",
"var_name": "DELTA"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MyMathTest.java",
"identifier": "MyMathTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComputeCirclePoint() {\n final PointL output = new PointL();\n final long radius = 10;\n\n MyMath.computeCirclePoint(0, 0, radius, Math.PI, output);\n Assert.assertEquals(-radius, output.x);\n Assert.assertEquals(0, output.y);\n\n MyMath.computeCirclePoint(0, 0, radius, 0, output);\n Assert.assertEquals(radius, output.x);\n Assert.assertEquals(0, output.y);\n\n MyMath.computeCirclePoint(0, 0, radius, Math.PI / 2, output);\n Assert.assertEquals(0, output.x);\n Assert.assertEquals(-radius, -output.y);\n\n MyMath.computeCirclePoint(0, 0, radius, -Math.PI / 2, output);\n Assert.assertEquals(0, output.x);\n Assert.assertEquals(radius, -output.y);\n\n MyMath.computeCirclePoint(0, 0, radius, Math.PI / 4, output);\n Assert.assertEquals((long)(radius * Math.sqrt(2) / 2), output.x);\n Assert.assertEquals((long)(-radius * Math.sqrt(2) / 2), -output.y);\n }",
"class_method_signature": "MyMathTest.testComputeCirclePoint()",
"constructor": false,
"full_signature": "@Test public void testComputeCirclePoint()",
"identifier": "testComputeCirclePoint",
"invocations": [
"computeCirclePoint",
"assertEquals",
"assertEquals",
"computeCirclePoint",
"assertEquals",
"assertEquals",
"computeCirclePoint",
"assertEquals",
"assertEquals",
"computeCirclePoint",
"assertEquals",
"assertEquals",
"computeCirclePoint",
"assertEquals",
"sqrt",
"assertEquals",
"sqrt"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testComputeCirclePoint()",
"testcase": true
} | {
"fields": [],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MyMath.java",
"identifier": "MyMath",
"interfaces": "implements MathConstants",
"methods": [
{
"class_method_signature": "MyMath.MyMath()",
"constructor": true,
"full_signature": "private MyMath()",
"identifier": "MyMath",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " MyMath()",
"testcase": false
},
{
"class_method_signature": "MyMath.gudermannInverse(final double aLatitude)",
"constructor": false,
"full_signature": "public static double gudermannInverse(final double aLatitude)",
"identifier": "gudermannInverse",
"modifiers": "public static",
"parameters": "(final double aLatitude)",
"return": "double",
"signature": "double gudermannInverse(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "MyMath.gudermann(final double y)",
"constructor": false,
"full_signature": "public static double gudermann(final double y)",
"identifier": "gudermann",
"modifiers": "public static",
"parameters": "(final double y)",
"return": "double",
"signature": "double gudermann(final double y)",
"testcase": false
},
{
"class_method_signature": "MyMath.mod(int number, final int modulus)",
"constructor": false,
"full_signature": "public static int mod(int number, final int modulus)",
"identifier": "mod",
"modifiers": "public static",
"parameters": "(int number, final int modulus)",
"return": "int",
"signature": "int mod(int number, final int modulus)",
"testcase": false
},
{
"class_method_signature": "MyMath.floorToLong(final double pValue)",
"constructor": false,
"full_signature": "public static long floorToLong(final double pValue)",
"identifier": "floorToLong",
"modifiers": "public static",
"parameters": "(final double pValue)",
"return": "long",
"signature": "long floorToLong(final double pValue)",
"testcase": false
},
{
"class_method_signature": "MyMath.floorToInt(final double pValue)",
"constructor": false,
"full_signature": "public static int floorToInt(final double pValue)",
"identifier": "floorToInt",
"modifiers": "public static",
"parameters": "(final double pValue)",
"return": "int",
"signature": "int floorToInt(final double pValue)",
"testcase": false
},
{
"class_method_signature": "MyMath.getNextSquareNumberAbove(final float factor)",
"constructor": false,
"full_signature": "public static int getNextSquareNumberAbove(final float factor)",
"identifier": "getNextSquareNumberAbove",
"modifiers": "public static",
"parameters": "(final float factor)",
"return": "int",
"signature": "int getNextSquareNumberAbove(final float factor)",
"testcase": false
},
{
"class_method_signature": "MyMath.getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"constructor": false,
"full_signature": "public static double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"identifier": "getAngleDifference",
"modifiers": "public static",
"parameters": "(double pStart, double pEnd, final Boolean pClockwise)",
"return": "double",
"signature": "double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"testcase": false
},
{
"class_method_signature": "MyMath.cleanPositiveAngle(double pAngle)",
"constructor": false,
"full_signature": "public static double cleanPositiveAngle(double pAngle)",
"identifier": "cleanPositiveAngle",
"modifiers": "public static",
"parameters": "(double pAngle)",
"return": "double",
"signature": "double cleanPositiveAngle(double pAngle)",
"testcase": false
},
{
"class_method_signature": "MyMath.computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"constructor": false,
"full_signature": "public static double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"identifier": "computeAngle",
"modifiers": "public static",
"parameters": "(final long pX1, final long pY1, final long pX2, final long pY2)",
"return": "double",
"signature": "double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"testcase": false
},
{
"class_method_signature": "MyMath.computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"constructor": false,
"full_signature": "public static void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"identifier": "computeCirclePoint",
"modifiers": "public static",
"parameters": "(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"return": "void",
"signature": "void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput) {\n\t\tpOutput.x = pCenterX + (long) (pRadius * Math.cos(pAngle));\n\t\tpOutput.y = pCenterY + (long) (pRadius * Math.sin(pAngle));\n\t}",
"class_method_signature": "MyMath.computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"constructor": false,
"full_signature": "public static void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"identifier": "computeCirclePoint",
"invocations": [
"cos",
"sin"
],
"modifiers": "public static",
"parameters": "(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"return": "void",
"signature": "void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_16 | {
"fields": [
{
"declarator": "mDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double mDelta = 1E-10;",
"type": "double",
"var_name": "mDelta"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/DistanceTest.java",
"identifier": "DistanceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_getSquareDistanceToLine() {\n\t\tfinal int xA = 100;\n\t\tfinal int yA = 200;\n\t\tfinal int deltaX = 10;\n\t\tfinal int deltaY = 20;\n\t\tAssert.assertEquals(0,\n\t\t\t\tDistance.getSquaredDistanceToLine(xA, yA, xA, yA, xA, yA), mDelta);\n\t\tAssert.assertEquals(deltaX * deltaX,\n\t\t\t\tDistance.getSquaredDistanceToLine(xA, yA, xA + deltaX, yA, xA + deltaX, yA), mDelta);\n\t\tAssert.assertEquals(deltaY * deltaY,\n\t\t\t\tDistance.getSquaredDistanceToLine(xA, yA, xA, yA + deltaY, xA, yA + deltaY), mDelta);\n\t\tAssert.assertEquals(20 * 20,\n\t\t\t\tDistance.getSquaredDistanceToLine(xA, yA + 20, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(30 * 30,\n\t\t\t\tDistance.getSquaredDistanceToLine(xA - 10, yA - 30, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(70 * 70,\n\t\t\t\tDistance.getSquaredDistanceToLine(xA + 200, yA - 70, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(7000 * 7000,\n\t\t\t\tDistance.getSquaredDistanceToLine(xA + 200, yA - 7000, xA, yA, xA + 200, yA), mDelta);\n\t\tAssert.assertEquals(7000 * 7000,\n\t\t\t\tDistance.getSquaredDistanceToLine(xA + 200, yA - 7000, xA, yA, xA + 1000, yA), mDelta);\n\t}",
"class_method_signature": "DistanceTest.test_getSquareDistanceToLine()",
"constructor": false,
"full_signature": "@Test public void test_getSquareDistanceToLine()",
"identifier": "test_getSquareDistanceToLine",
"invocations": [
"assertEquals",
"getSquaredDistanceToLine",
"assertEquals",
"getSquaredDistanceToLine",
"assertEquals",
"getSquaredDistanceToLine",
"assertEquals",
"getSquaredDistanceToLine",
"assertEquals",
"getSquaredDistanceToLine",
"assertEquals",
"getSquaredDistanceToLine",
"assertEquals",
"getSquaredDistanceToLine",
"assertEquals",
"getSquaredDistanceToLine"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_getSquareDistanceToLine()",
"testcase": true
} | {
"fields": [],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/Distance.java",
"identifier": "Distance",
"interfaces": "",
"methods": [
{
"class_method_signature": "Distance.getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"identifier": "getSquaredDistanceToPoint",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"return": "double",
"signature": "double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToLine",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToSegment",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"identifier": "getSquaredDistanceToProjection",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"return": "double",
"signature": "double getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToLine",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToSegment",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"constructor": false,
"full_signature": "private static double dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"identifier": "dotProduct",
"modifiers": "private static",
"parameters": "(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"return": "double",
"signature": "double dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n ) {\n return getSquaredDistanceToProjection(pFromX, pFromY, pAX, pAY, pBX, pBY,\n getProjectionFactorToLine(pFromX, pFromY, pAX, pAY, pBX, pBY));\n }",
"class_method_signature": "Distance.getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToLine",
"invocations": [
"getSquaredDistanceToProjection",
"getProjectionFactorToLine"
],
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_41 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private static final",
"original_string": "private static final Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
},
{
"declarator": "mMaxCoordinate = 2000",
"modifier": "private static final",
"original_string": "private static final int mMaxCoordinate = 2000;",
"type": "int",
"var_name": "mMaxCoordinate"
},
{
"declarator": "mIterations = 100",
"modifier": "private static final",
"original_string": "private static final int mIterations = 100;",
"type": "int",
"var_name": "mIterations"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/RectLTest.java",
"identifier": "RectLTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetBounds180() {\n final double degrees = 180;\n final RectL in = new RectL();\n final RectL out = new RectL();\n for (int i = 0 ; i < mIterations ; i ++) {\n in.top = getRandomCoordinate();\n in.left = getRandomCoordinate();\n in.bottom = getRandomCoordinate();\n in.right = getRandomCoordinate();\n final long centerX = getRandomCoordinate();\n final long centerY = getRandomCoordinate();\n RectL.getBounds(in, centerX, centerY, degrees, out);\n final long top = centerY - (in.top - centerY);\n final long bottom = centerY - (in.bottom - centerY);\n final long left = centerX - (in.left - centerX);\n final long right = centerX - (in.right - centerX);\n Assert.assertEquals(Math.min(top, bottom), out.top);\n Assert.assertEquals(Math.min(left, right), out.left);\n Assert.assertEquals(Math.max(top, bottom), out.bottom);\n Assert.assertEquals(Math.max(left, right), out.right);\n }\n }",
"class_method_signature": "RectLTest.testGetBounds180()",
"constructor": false,
"full_signature": "@Test public void testGetBounds180()",
"identifier": "testGetBounds180",
"invocations": [
"getRandomCoordinate",
"getRandomCoordinate",
"getRandomCoordinate",
"getRandomCoordinate",
"getRandomCoordinate",
"getRandomCoordinate",
"getBounds",
"assertEquals",
"min",
"assertEquals",
"min",
"assertEquals",
"max",
"assertEquals",
"max"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetBounds180()",
"testcase": true
} | {
"fields": [
{
"declarator": "left",
"modifier": "public",
"original_string": "public long left;",
"type": "long",
"var_name": "left"
},
{
"declarator": "top",
"modifier": "public",
"original_string": "public long top;",
"type": "long",
"var_name": "top"
},
{
"declarator": "right",
"modifier": "public",
"original_string": "public long right;",
"type": "long",
"var_name": "right"
},
{
"declarator": "bottom",
"modifier": "public",
"original_string": "public long bottom;",
"type": "long",
"var_name": "bottom"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/RectL.java",
"identifier": "RectL",
"interfaces": "",
"methods": [
{
"class_method_signature": "RectL.RectL()",
"constructor": true,
"full_signature": "public RectL()",
"identifier": "RectL",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " RectL()",
"testcase": false
},
{
"class_method_signature": "RectL.RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": true,
"full_signature": "public RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "RectL",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "",
"signature": " RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.RectL(final RectL pOther)",
"constructor": true,
"full_signature": "public RectL(final RectL pOther)",
"identifier": "RectL",
"modifiers": "public",
"parameters": "(final RectL pOther)",
"return": "",
"signature": " RectL(final RectL pOther)",
"testcase": false
},
{
"class_method_signature": "RectL.set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": false,
"full_signature": "public void set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "void",
"signature": "void set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.set(final RectL pOther)",
"constructor": false,
"full_signature": "public void set(final RectL pOther)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final RectL pOther)",
"return": "void",
"signature": "void set(final RectL pOther)",
"testcase": false
},
{
"class_method_signature": "RectL.union(long x, long y)",
"constructor": false,
"full_signature": "public void union(long x, long y)",
"identifier": "union",
"modifiers": "public",
"parameters": "(long x, long y)",
"return": "void",
"signature": "void union(long x, long y)",
"testcase": false
},
{
"class_method_signature": "RectL.intersects(RectL a, RectL b)",
"constructor": false,
"full_signature": "public static boolean intersects(RectL a, RectL b)",
"identifier": "intersects",
"modifiers": "public static",
"parameters": "(RectL a, RectL b)",
"return": "boolean",
"signature": "boolean intersects(RectL a, RectL b)",
"testcase": false
},
{
"class_method_signature": "RectL.contains(long x, long y)",
"constructor": false,
"full_signature": "public boolean contains(long x, long y)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(long x, long y)",
"return": "boolean",
"signature": "boolean contains(long x, long y)",
"testcase": false
},
{
"class_method_signature": "RectL.inset(long dx, long dy)",
"constructor": false,
"full_signature": "public void inset(long dx, long dy)",
"identifier": "inset",
"modifiers": "public",
"parameters": "(long dx, long dy)",
"return": "void",
"signature": "void inset(long dx, long dy)",
"testcase": false
},
{
"class_method_signature": "RectL.width()",
"constructor": false,
"full_signature": "public final long width()",
"identifier": "width",
"modifiers": "public final",
"parameters": "()",
"return": "long",
"signature": "long width()",
"testcase": false
},
{
"class_method_signature": "RectL.height()",
"constructor": false,
"full_signature": "public final long height()",
"identifier": "height",
"modifiers": "public final",
"parameters": "()",
"return": "long",
"signature": "long height()",
"testcase": false
},
{
"class_method_signature": "RectL.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "RectL.equals(Object o)",
"constructor": false,
"full_signature": "@Override public boolean equals(Object o)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(Object o)",
"return": "boolean",
"signature": "boolean equals(Object o)",
"testcase": false
},
{
"class_method_signature": "RectL.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "RectL.getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"constructor": false,
"full_signature": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"identifier": "getBounds",
"modifiers": "public static",
"parameters": "(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"return": "RectL",
"signature": "RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"testcase": false
},
{
"class_method_signature": "RectL.getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"identifier": "getBounds",
"modifiers": "public static",
"parameters": "(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"return": "Rect",
"signature": "Rect getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"constructor": false,
"full_signature": "public static long getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"identifier": "getRotatedX",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"return": "long",
"signature": "long getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"constructor": false,
"full_signature": "public static long getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"identifier": "getRotatedY",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"return": "long",
"signature": "long getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"constructor": false,
"full_signature": "public static long getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"identifier": "getRotatedX",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"return": "long",
"signature": "long getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"constructor": false,
"full_signature": "public static long getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"identifier": "getRotatedY",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"return": "long",
"signature": "long getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"testcase": false
},
{
"class_method_signature": "RectL.offset(final long pDx, final long pDy)",
"constructor": false,
"full_signature": "public void offset(final long pDx, final long pDy)",
"identifier": "offset",
"modifiers": "public",
"parameters": "(final long pDx, final long pDy)",
"return": "void",
"signature": "void offset(final long pDx, final long pDy)",
"testcase": false
},
{
"class_method_signature": "RectL.union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": false,
"full_signature": "public void union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "union",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "void",
"signature": "void union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.union(final RectL pRect)",
"constructor": false,
"full_signature": "public void union(final RectL pRect)",
"identifier": "union",
"modifiers": "public",
"parameters": "(final RectL pRect)",
"return": "void",
"signature": "void union(final RectL pRect)",
"testcase": false
},
{
"class_method_signature": "RectL.centerX()",
"constructor": false,
"full_signature": "public long centerX()",
"identifier": "centerX",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long centerX()",
"testcase": false
},
{
"class_method_signature": "RectL.centerY()",
"constructor": false,
"full_signature": "public long centerY()",
"identifier": "centerY",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long centerY()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse) {\n final RectL out = pReuse != null ? pReuse : new RectL();\n if (pDegrees == 0) { // optimization\n out.top = pIn.top;\n out.left = pIn.left;\n out.bottom = pIn.bottom;\n out.right = pIn.right;\n return out;\n }\n final double radians = pDegrees * Math.PI / 180.;\n final double cos = Math.cos(radians);\n final double sin = Math.sin(radians);\n long inputX;\n long inputY;\n long outputX;\n long outputY;\n inputX = pIn.left; // corner 1\n inputY = pIn.top;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n out.top = out.bottom = outputY;\n out.left = out.right = outputX;\n inputX = pIn.right; // corner 2\n inputY = pIn.top;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n inputX = pIn.right; // corner 3\n inputY = pIn.bottom;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n inputX = pIn.left; // corner 4\n inputY = pIn.bottom;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n return out;\n }",
"class_method_signature": "RectL.getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"constructor": false,
"full_signature": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"identifier": "getBounds",
"invocations": [
"cos",
"sin",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY"
],
"modifiers": "public static",
"parameters": "(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"return": "RectL",
"signature": "RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_36 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_destinationPoint_north_west_here() {\n\t\t// this test is based on the actual result, not calculated expectations,\n\t\t// but it is at least a basic sanity check for rounding errors and regression\n\t\tfinal GeoPoint start = new GeoPoint(52.387524, 4.891604);\n\t\tfinal GeoPoint end = new GeoPoint(52.3906999098817, 4.886399738626785);\n\t\tassertEquals(\"destinationPoint north west\", end, start.destinationPoint(500, -45));\n\t}",
"class_method_signature": "GeoPointTest.test_destinationPoint_north_west_here()",
"constructor": false,
"full_signature": "@Test public void test_destinationPoint_north_west_here()",
"identifier": "test_destinationPoint_north_west_here",
"invocations": [
"assertEquals",
"destinationPoint"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_destinationPoint_north_west_here()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees) {\n\n\t\t// convert distance to angular distance\n\t\tfinal double dist = aDistanceInMeters / RADIUS_EARTH_METERS;\n\n\t\t// convert bearing to radians\n\t\tfinal double brng = DEG2RAD * aBearingInDegrees;\n\n\t\t// get current location in radians\n\t\tfinal double lat1 = DEG2RAD * getLatitude();\n\t\tfinal double lon1 = DEG2RAD * getLongitude();\n\n\t\tfinal double lat2 = Math.asin(Math.sin(lat1) * Math.cos(dist) + Math.cos(lat1)\n\t\t\t\t* Math.sin(dist) * Math.cos(brng));\n\t\tfinal double lon2 = lon1\n\t\t+ Math.atan2(Math.sin(brng) * Math.sin(dist) * Math.cos(lat1), Math.cos(dist)\n\t\t\t\t- Math.sin(lat1) * Math.sin(lat2));\n\n\t\tfinal double lat2deg = lat2 / DEG2RAD;\n\t\tfinal double lon2deg = lon2 / DEG2RAD;\n\n\t\treturn new GeoPoint(lat2deg, lon2deg);\n\t}",
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"invocations": [
"getLatitude",
"getLongitude",
"asin",
"sin",
"cos",
"cos",
"sin",
"cos",
"atan2",
"sin",
"sin",
"cos",
"cos",
"sin",
"sin"
],
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_61 | {
"fields": [
{
"declarator": "LOOPS = 10000",
"modifier": "private static final",
"original_string": "private static final int LOOPS = 10000;",
"type": "int",
"var_name": "LOOPS"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/views/overlay/DefaultOverlayManagerTest.java",
"identifier": "DefaultOverlayManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOverlaysReversed() {\n final ListTest<Overlay> list = new ListTest<Overlay>() {\n\n private final DefaultOverlayManager defaultOverlayManager = new DefaultOverlayManager(null);\n\n @Override\n public void add() {\n defaultOverlayManager.add(new Overlay() {});\n }\n\n @Override\n public void remove() {\n defaultOverlayManager.remove(0);\n }\n\n @Override\n public Iterable<Overlay> reverseOrder() {\n return defaultOverlayManager.overlaysReversed();\n }\n\n @Override\n protected ListIterator<Overlay> unprotectedReverseListIterator() {\n throw new IllegalArgumentException(); // not to be used here\n }\n\n @Override\n public ListIterator<Overlay> reverseIterator() {\n throw new IllegalArgumentException(); // not to be used here\n }\n };\n\n final ListTester<Overlay> tester = new ListTester<>();\n tester.test(list);\n }",
"class_method_signature": "DefaultOverlayManagerTest.testOverlaysReversed()",
"constructor": false,
"full_signature": "@Test public void testOverlaysReversed()",
"identifier": "testOverlaysReversed",
"invocations": [
"add",
"remove",
"overlaysReversed",
"test"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOverlaysReversed()",
"testcase": true
} | {
"fields": [
{
"declarator": "mTilesOverlay",
"modifier": "private",
"original_string": "private TilesOverlay mTilesOverlay;",
"type": "TilesOverlay",
"var_name": "mTilesOverlay"
},
{
"declarator": "mOverlayList",
"modifier": "private final",
"original_string": "private final CopyOnWriteArrayList<Overlay> mOverlayList;",
"type": "CopyOnWriteArrayList<Overlay>",
"var_name": "mOverlayList"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/views/overlay/DefaultOverlayManager.java",
"identifier": "DefaultOverlayManager",
"interfaces": "implements OverlayManager",
"methods": [
{
"class_method_signature": "DefaultOverlayManager.DefaultOverlayManager(final TilesOverlay tilesOverlay)",
"constructor": true,
"full_signature": "public DefaultOverlayManager(final TilesOverlay tilesOverlay)",
"identifier": "DefaultOverlayManager",
"modifiers": "public",
"parameters": "(final TilesOverlay tilesOverlay)",
"return": "",
"signature": " DefaultOverlayManager(final TilesOverlay tilesOverlay)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.get(final int pIndex)",
"constructor": false,
"full_signature": "@Override public Overlay get(final int pIndex)",
"identifier": "get",
"modifiers": "@Override public",
"parameters": "(final int pIndex)",
"return": "Overlay",
"signature": "Overlay get(final int pIndex)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.add(final int pIndex, final Overlay pElement)",
"constructor": false,
"full_signature": "@Override public void add(final int pIndex, final Overlay pElement)",
"identifier": "add",
"modifiers": "@Override public",
"parameters": "(final int pIndex, final Overlay pElement)",
"return": "void",
"signature": "void add(final int pIndex, final Overlay pElement)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.remove(final int pIndex)",
"constructor": false,
"full_signature": "@Override public Overlay remove(final int pIndex)",
"identifier": "remove",
"modifiers": "@Override public",
"parameters": "(final int pIndex)",
"return": "Overlay",
"signature": "Overlay remove(final int pIndex)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.set(final int pIndex, final Overlay pElement)",
"constructor": false,
"full_signature": "@Override public Overlay set(final int pIndex, final Overlay pElement)",
"identifier": "set",
"modifiers": "@Override public",
"parameters": "(final int pIndex, final Overlay pElement)",
"return": "Overlay",
"signature": "Overlay set(final int pIndex, final Overlay pElement)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.getTilesOverlay()",
"constructor": false,
"full_signature": "@Override public TilesOverlay getTilesOverlay()",
"identifier": "getTilesOverlay",
"modifiers": "@Override public",
"parameters": "()",
"return": "TilesOverlay",
"signature": "TilesOverlay getTilesOverlay()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.setTilesOverlay(final TilesOverlay tilesOverlay)",
"constructor": false,
"full_signature": "@Override public void setTilesOverlay(final TilesOverlay tilesOverlay)",
"identifier": "setTilesOverlay",
"modifiers": "@Override public",
"parameters": "(final TilesOverlay tilesOverlay)",
"return": "void",
"signature": "void setTilesOverlay(final TilesOverlay tilesOverlay)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.overlaysReversed()",
"constructor": false,
"full_signature": "@Override public Iterable<Overlay> overlaysReversed()",
"identifier": "overlaysReversed",
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterable<Overlay>",
"signature": "Iterable<Overlay> overlaysReversed()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.overlays()",
"constructor": false,
"full_signature": "@Override public List<Overlay> overlays()",
"identifier": "overlays",
"modifiers": "@Override public",
"parameters": "()",
"return": "List<Overlay>",
"signature": "List<Overlay> overlays()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDraw(final Canvas c, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public void onDraw(final Canvas c, final MapView pMapView)",
"identifier": "onDraw",
"modifiers": "@Override public",
"parameters": "(final Canvas c, final MapView pMapView)",
"return": "void",
"signature": "void onDraw(final Canvas c, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDraw(final Canvas c, final Projection pProjection)",
"constructor": false,
"full_signature": "@Override public void onDraw(final Canvas c, final Projection pProjection)",
"identifier": "onDraw",
"modifiers": "@Override public",
"parameters": "(final Canvas c, final Projection pProjection)",
"return": "void",
"signature": "void onDraw(final Canvas c, final Projection pProjection)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDrawHelper(final Canvas c, final MapView pMapView, final Projection pProjection)",
"constructor": false,
"full_signature": "private void onDrawHelper(final Canvas c, final MapView pMapView, final Projection pProjection)",
"identifier": "onDrawHelper",
"modifiers": "private",
"parameters": "(final Canvas c, final MapView pMapView, final Projection pProjection)",
"return": "void",
"signature": "void onDrawHelper(final Canvas c, final MapView pMapView, final Projection pProjection)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDetach(final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public void onDetach(final MapView pMapView)",
"identifier": "onDetach",
"modifiers": "@Override public",
"parameters": "(final MapView pMapView)",
"return": "void",
"signature": "void onDetach(final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onPause()",
"constructor": false,
"full_signature": "@Override public void onPause()",
"identifier": "onPause",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void onPause()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onResume()",
"constructor": false,
"full_signature": "@Override public void onResume()",
"identifier": "onResume",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void onResume()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onKeyDown(final int keyCode, final KeyEvent event, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onKeyDown(final int keyCode, final KeyEvent event, final MapView pMapView)",
"identifier": "onKeyDown",
"modifiers": "@Override public",
"parameters": "(final int keyCode, final KeyEvent event, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onKeyDown(final int keyCode, final KeyEvent event, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onKeyUp(final int keyCode, final KeyEvent event, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onKeyUp(final int keyCode, final KeyEvent event, final MapView pMapView)",
"identifier": "onKeyUp",
"modifiers": "@Override public",
"parameters": "(final int keyCode, final KeyEvent event, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onKeyUp(final int keyCode, final KeyEvent event, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onTouchEvent(final MotionEvent event, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onTouchEvent(final MotionEvent event, final MapView pMapView)",
"identifier": "onTouchEvent",
"modifiers": "@Override public",
"parameters": "(final MotionEvent event, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onTouchEvent(final MotionEvent event, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onTrackballEvent(final MotionEvent event, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onTrackballEvent(final MotionEvent event, final MapView pMapView)",
"identifier": "onTrackballEvent",
"modifiers": "@Override public",
"parameters": "(final MotionEvent event, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onTrackballEvent(final MotionEvent event, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onSnapToItem(final int x, final int y, final Point snapPoint, final IMapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onSnapToItem(final int x, final int y, final Point snapPoint, final IMapView pMapView)",
"identifier": "onSnapToItem",
"modifiers": "@Override public",
"parameters": "(final int x, final int y, final Point snapPoint, final IMapView pMapView)",
"return": "boolean",
"signature": "boolean onSnapToItem(final int x, final int y, final Point snapPoint, final IMapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDoubleTap(final MotionEvent e, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onDoubleTap(final MotionEvent e, final MapView pMapView)",
"identifier": "onDoubleTap",
"modifiers": "@Override public",
"parameters": "(final MotionEvent e, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onDoubleTap(final MotionEvent e, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDoubleTapEvent(final MotionEvent e, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onDoubleTapEvent(final MotionEvent e, final MapView pMapView)",
"identifier": "onDoubleTapEvent",
"modifiers": "@Override public",
"parameters": "(final MotionEvent e, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onDoubleTapEvent(final MotionEvent e, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onSingleTapConfirmed(final MotionEvent e, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onSingleTapConfirmed(final MotionEvent e, final MapView pMapView)",
"identifier": "onSingleTapConfirmed",
"modifiers": "@Override public",
"parameters": "(final MotionEvent e, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onSingleTapConfirmed(final MotionEvent e, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDown(final MotionEvent pEvent, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onDown(final MotionEvent pEvent, final MapView pMapView)",
"identifier": "onDown",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onDown(final MotionEvent pEvent, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onFling(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pVelocityX, final float pVelocityY, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onFling(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pVelocityX, final float pVelocityY, final MapView pMapView)",
"identifier": "onFling",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pVelocityX, final float pVelocityY, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onFling(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pVelocityX, final float pVelocityY, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onLongPress(final MotionEvent pEvent, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onLongPress(final MotionEvent pEvent, final MapView pMapView)",
"identifier": "onLongPress",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onLongPress(final MotionEvent pEvent, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onScroll(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pDistanceX, final float pDistanceY, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onScroll(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pDistanceX, final float pDistanceY, final MapView pMapView)",
"identifier": "onScroll",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pDistanceX, final float pDistanceY, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onScroll(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pDistanceX, final float pDistanceY, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onShowPress(final MotionEvent pEvent, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public void onShowPress(final MotionEvent pEvent, final MapView pMapView)",
"identifier": "onShowPress",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent, final MapView pMapView)",
"return": "void",
"signature": "void onShowPress(final MotionEvent pEvent, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onSingleTapUp(final MotionEvent pEvent, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onSingleTapUp(final MotionEvent pEvent, final MapView pMapView)",
"identifier": "onSingleTapUp",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onSingleTapUp(final MotionEvent pEvent, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.setOptionsMenusEnabled(final boolean pEnabled)",
"constructor": false,
"full_signature": "@Override public void setOptionsMenusEnabled(final boolean pEnabled)",
"identifier": "setOptionsMenusEnabled",
"modifiers": "@Override public",
"parameters": "(final boolean pEnabled)",
"return": "void",
"signature": "void setOptionsMenusEnabled(final boolean pEnabled)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onCreateOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"constructor": false,
"full_signature": "@Override public boolean onCreateOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"identifier": "onCreateOptionsMenu",
"modifiers": "@Override public",
"parameters": "(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"return": "boolean",
"signature": "boolean onCreateOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onPrepareOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"constructor": false,
"full_signature": "@Override public boolean onPrepareOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"identifier": "onPrepareOptionsMenu",
"modifiers": "@Override public",
"parameters": "(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"return": "boolean",
"signature": "boolean onPrepareOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onOptionsItemSelected(final MenuItem item, final int menuIdOffset, final MapView mapView)",
"constructor": false,
"full_signature": "@Override public boolean onOptionsItemSelected(final MenuItem item, final int menuIdOffset, final MapView mapView)",
"identifier": "onOptionsItemSelected",
"modifiers": "@Override public",
"parameters": "(final MenuItem item, final int menuIdOffset, final MapView mapView)",
"return": "boolean",
"signature": "boolean onOptionsItemSelected(final MenuItem item, final int menuIdOffset, final MapView mapView)",
"testcase": false
}
],
"superclass": "extends AbstractList<Overlay>"
} | {
"body": "@Override\n public Iterable<Overlay> overlaysReversed() {\n return new Iterable<Overlay>() {\n\n /**\n * @since 6.1.0\n */\n private ListIterator<Overlay> bulletProofReverseListIterator() {\n while (true) {\n try {\n return mOverlayList.listIterator(mOverlayList.size());\n } catch (final IndexOutOfBoundsException e) {\n // thread-concurrency fix - in case an item is removed in a very inappropriate time\n // cf. https://github.com/osmdroid/osmdroid/issues/1260\n }\n }\n }\n\n @Override\n public Iterator<Overlay> iterator() {\n final ListIterator<Overlay> i = bulletProofReverseListIterator();\n\n return new Iterator<Overlay>() {\n @Override\n public boolean hasNext() {\n return i.hasPrevious();\n }\n\n @Override\n public Overlay next() {\n return i.previous();\n }\n\n @Override\n public void remove() {\n i.remove();\n }\n };\n }\n };\n }",
"class_method_signature": "DefaultOverlayManager.overlaysReversed()",
"constructor": false,
"full_signature": "@Override public Iterable<Overlay> overlaysReversed()",
"identifier": "overlaysReversed",
"invocations": [
"listIterator",
"size",
"bulletProofReverseListIterator",
"hasPrevious",
"previous",
"remove"
],
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterable<Overlay>",
"signature": "Iterable<Overlay> overlaysReversed()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_20 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private",
"original_string": "private Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileAreaTest.java",
"identifier": "MapTileAreaTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCorners() {\n final MapTileArea area = new MapTileArea();\n for (int zoom = 0; zoom <= TileSystem.getMaximumZoomLevel(); zoom++) {\n final int mapTileUpperBound = getMapTileUpperBound(zoom);\n final int max = mapTileUpperBound - 1;\n setNewWorld(area, zoom);\n Assert.assertTrue(area.contains(MapTileIndex.getTileIndex(zoom, 0, 0)));\n Assert.assertTrue(area.contains(MapTileIndex.getTileIndex(zoom, 0, max)));\n Assert.assertTrue(area.contains(MapTileIndex.getTileIndex(zoom, max, max)));\n Assert.assertTrue(area.contains(MapTileIndex.getTileIndex(zoom, max, 0)));\n }\n }",
"class_method_signature": "MapTileAreaTest.testCorners()",
"constructor": false,
"full_signature": "@Test public void testCorners()",
"identifier": "testCorners",
"invocations": [
"getMaximumZoomLevel",
"getMapTileUpperBound",
"setNewWorld",
"assertTrue",
"contains",
"getTileIndex",
"assertTrue",
"contains",
"getTileIndex",
"assertTrue",
"contains",
"getTileIndex",
"assertTrue",
"contains",
"getTileIndex"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCorners()",
"testcase": true
} | {
"fields": [
{
"declarator": "mZoom",
"modifier": "private",
"original_string": "private int mZoom;",
"type": "int",
"var_name": "mZoom"
},
{
"declarator": "mLeft",
"modifier": "private",
"original_string": "private int mLeft;",
"type": "int",
"var_name": "mLeft"
},
{
"declarator": "mTop",
"modifier": "private",
"original_string": "private int mTop;",
"type": "int",
"var_name": "mTop"
},
{
"declarator": "mWidth",
"modifier": "private",
"original_string": "private int mWidth;",
"type": "int",
"var_name": "mWidth"
},
{
"declarator": "mHeight",
"modifier": "private",
"original_string": "private int mHeight;",
"type": "int",
"var_name": "mHeight"
},
{
"declarator": "mMapTileUpperBound",
"modifier": "private",
"original_string": "private int mMapTileUpperBound;",
"type": "int",
"var_name": "mMapTileUpperBound"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileArea.java",
"identifier": "MapTileArea",
"interfaces": "implements MapTileContainer, IterableWithSize<Long>",
"methods": [
{
"class_method_signature": "MapTileArea.set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.set(final int pZoom, final Rect pRect)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final Rect pRect)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final int pZoom, final Rect pRect)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final Rect pRect)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.set(final MapTileArea pArea)",
"constructor": false,
"full_signature": "public MapTileArea set(final MapTileArea pArea)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final MapTileArea pArea)",
"return": "MapTileArea",
"signature": "MapTileArea set(final MapTileArea pArea)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.reset()",
"constructor": false,
"full_signature": "public MapTileArea reset()",
"identifier": "reset",
"modifiers": "public",
"parameters": "()",
"return": "MapTileArea",
"signature": "MapTileArea reset()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getZoom()",
"constructor": false,
"full_signature": "public int getZoom()",
"identifier": "getZoom",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getZoom()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getLeft()",
"constructor": false,
"full_signature": "public int getLeft()",
"identifier": "getLeft",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getLeft()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getTop()",
"constructor": false,
"full_signature": "public int getTop()",
"identifier": "getTop",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getTop()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getWidth()",
"constructor": false,
"full_signature": "public int getWidth()",
"identifier": "getWidth",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getWidth()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getHeight()",
"constructor": false,
"full_signature": "public int getHeight()",
"identifier": "getHeight",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getHeight()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getRight()",
"constructor": false,
"full_signature": "public int getRight()",
"identifier": "getRight",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getRight()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getBottom()",
"constructor": false,
"full_signature": "public int getBottom()",
"identifier": "getBottom",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBottom()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.iterator()",
"constructor": false,
"full_signature": "@Override public Iterator<Long> iterator()",
"identifier": "iterator",
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterator<Long>",
"signature": "Iterator<Long> iterator()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.contains(long pTileIndex)",
"constructor": false,
"full_signature": "@Override public boolean contains(long pTileIndex)",
"identifier": "contains",
"modifiers": "@Override public",
"parameters": "(long pTileIndex)",
"return": "boolean",
"signature": "boolean contains(long pTileIndex)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.contains(int pValue, final int pFirst, final int pSize)",
"constructor": false,
"full_signature": "private boolean contains(int pValue, final int pFirst, final int pSize)",
"identifier": "contains",
"modifiers": "private",
"parameters": "(int pValue, final int pFirst, final int pSize)",
"return": "boolean",
"signature": "boolean contains(int pValue, final int pFirst, final int pSize)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.cleanValue(int pValue)",
"constructor": false,
"full_signature": "private int cleanValue(int pValue)",
"identifier": "cleanValue",
"modifiers": "private",
"parameters": "(int pValue)",
"return": "int",
"signature": "int cleanValue(int pValue)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.computeSize(final int pTopLeft, int pBottomRight)",
"constructor": false,
"full_signature": "private int computeSize(final int pTopLeft, int pBottomRight)",
"identifier": "computeSize",
"modifiers": "private",
"parameters": "(final int pTopLeft, int pBottomRight)",
"return": "int",
"signature": "int computeSize(final int pTopLeft, int pBottomRight)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public boolean contains(long pTileIndex) {\n if (MapTileIndex.getZoom(pTileIndex) != mZoom) {\n return false;\n }\n if (!contains(MapTileIndex.getX(pTileIndex), mLeft, mWidth)) {\n return false;\n }\n return contains(MapTileIndex.getY(pTileIndex), mTop, mHeight);\n }",
"class_method_signature": "MapTileArea.contains(long pTileIndex)",
"constructor": false,
"full_signature": "@Override public boolean contains(long pTileIndex)",
"identifier": "contains",
"invocations": [
"getZoom",
"contains",
"getX",
"contains",
"getY"
],
"modifiers": "@Override public",
"parameters": "(long pTileIndex)",
"return": "boolean",
"signature": "boolean contains(long pTileIndex)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_35 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_bearingTo_north_west() {\n\t\tfinal GeoPoint target = new GeoPoint(0.0, 0.0);\n\t\tfinal GeoPoint other = new GeoPoint(-10.0, -10.0);\n\t\tassertEquals(\"north west\", 180 + 45, Math.round(target.bearingTo(other)));\n\t}",
"class_method_signature": "GeoPointTest.test_bearingTo_north_west()",
"constructor": false,
"full_signature": "@Test public void test_bearingTo_north_west()",
"identifier": "test_bearingTo_north_west",
"invocations": [
"assertEquals",
"round",
"bearingTo"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_bearingTo_north_west()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double bearingTo(final IGeoPoint other) {\n\t\tfinal double lat1 = Math.toRadians(this.mLatitude);\n\t\tfinal double long1 = Math.toRadians(this.mLongitude);\n\t\tfinal double lat2 = Math.toRadians(other.getLatitude());\n\t\tfinal double long2 = Math.toRadians(other.getLongitude());\n\t\tfinal double delta_long = long2 - long1;\n\t\tfinal double a = Math.sin(delta_long) * Math.cos(lat2);\n\t\tfinal double b = Math.cos(lat1) * Math.sin(lat2) -\n\t\t\t\t\t\t Math.sin(lat1) * Math.cos(lat2) * Math.cos(delta_long);\n\t\tfinal double bearing = Math.toDegrees(Math.atan2(a, b));\n\t\tfinal double bearing_normalized = (bearing + 360) % 360;\n\t\treturn bearing_normalized;\n\t}",
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"invocations": [
"toRadians",
"toRadians",
"toRadians",
"getLatitude",
"toRadians",
"getLongitude",
"sin",
"cos",
"cos",
"sin",
"sin",
"cos",
"cos",
"toDegrees",
"atan2"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_8 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileAreaBorderComputerTest.java",
"identifier": "MapTileAreaBorderComputerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOnePointModulo() {\n final MapTileArea source = new MapTileArea();\n final MapTileArea dest = new MapTileArea();\n final Set<Long> set = new HashSet<>();\n final int border = 2;\n final MapTileAreaBorderComputer computer = new MapTileAreaBorderComputer(border);\n final int zoom = 5;\n final int sourceX = 1;\n final int sourceY = 31;\n source.set(zoom, sourceX, sourceY, sourceX, sourceY);\n add(set, zoom, sourceX, sourceY, border);\n computer.computeFromSource(source, dest);\n check(dest, set, zoom);\n }",
"class_method_signature": "MapTileAreaBorderComputerTest.testOnePointModulo()",
"constructor": false,
"full_signature": "@Test public void testOnePointModulo()",
"identifier": "testOnePointModulo",
"invocations": [
"set",
"add",
"computeFromSource",
"check"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOnePointModulo()",
"testcase": true
} | {
"fields": [
{
"declarator": "mBorder",
"modifier": "private final",
"original_string": "private final int mBorder;",
"type": "int",
"var_name": "mBorder"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileAreaBorderComputer.java",
"identifier": "MapTileAreaBorderComputer",
"interfaces": "implements MapTileAreaComputer",
"methods": [
{
"class_method_signature": "MapTileAreaBorderComputer.MapTileAreaBorderComputer(final int pBorder)",
"constructor": true,
"full_signature": "public MapTileAreaBorderComputer(final int pBorder)",
"identifier": "MapTileAreaBorderComputer",
"modifiers": "public",
"parameters": "(final int pBorder)",
"return": "",
"signature": " MapTileAreaBorderComputer(final int pBorder)",
"testcase": false
},
{
"class_method_signature": "MapTileAreaBorderComputer.getBorder()",
"constructor": false,
"full_signature": "public int getBorder()",
"identifier": "getBorder",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBorder()",
"testcase": false
},
{
"class_method_signature": "MapTileAreaBorderComputer.computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"identifier": "computeFromSource",
"modifiers": "@Override public",
"parameters": "(final MapTileArea pSource, final MapTileArea pReuse)",
"return": "MapTileArea",
"signature": "MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse) {\n final MapTileArea out = pReuse != null ? pReuse : new MapTileArea();\n if (pSource.size() == 0) {\n out.reset();\n return out;\n }\n final int left = pSource.getLeft() - mBorder;\n final int top = pSource.getTop() - mBorder;\n final int additional = 2 * mBorder - 1;\n out.set(pSource.getZoom(),\n left, top,\n left + pSource.getWidth() + additional, top + pSource.getHeight() + additional);\n return out;\n }",
"class_method_signature": "MapTileAreaBorderComputer.computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"identifier": "computeFromSource",
"invocations": [
"size",
"reset",
"getLeft",
"getTop",
"set",
"getZoom",
"getWidth",
"getHeight"
],
"modifiers": "@Override public",
"parameters": "(final MapTileArea pSource, final MapTileArea pReuse)",
"return": "MapTileArea",
"signature": "MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_62 | {
"fields": [
{
"declarator": "LOOPS = 10000",
"modifier": "private static final",
"original_string": "private static final int LOOPS = 10000;",
"type": "int",
"var_name": "LOOPS"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/views/overlay/DefaultOverlayManagerTest.java",
"identifier": "DefaultOverlayManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntegerReversed() {\n ListTest<Integer> list;\n final ListTester<Integer> tester = new ListTester<>();\n\n // best version ever\n list = new ListTest<>();\n tester.test(list);\n\n // synchronized version: slower, and not bullet-proof in the real world\n list = new ListTest<Integer>() {\n @Override\n public void remove() {\n synchronized (mList) {\n super.remove();\n }\n }\n\n @Override\n public ListIterator<Integer> reverseIterator() {\n synchronized (mList) {\n return unprotectedReverseListIterator();\n }\n }\n };\n tester.test(list);\n\n // half synchronized version: prone to crash because the item removal is not synchronized\n list = new ListTest<Integer>() {\n @Override\n public ListIterator<Integer> reverseIterator() {\n synchronized (mList) {\n return unprotectedReverseListIterator();\n }\n }\n };\n //tester.test(list); // don't run this, it would crash!\n }",
"class_method_signature": "DefaultOverlayManagerTest.testIntegerReversed()",
"constructor": false,
"full_signature": "@Test public void testIntegerReversed()",
"identifier": "testIntegerReversed",
"invocations": [
"test",
"remove",
"unprotectedReverseListIterator",
"test",
"unprotectedReverseListIterator"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testIntegerReversed()",
"testcase": true
} | {
"fields": [
{
"declarator": "mTilesOverlay",
"modifier": "private",
"original_string": "private TilesOverlay mTilesOverlay;",
"type": "TilesOverlay",
"var_name": "mTilesOverlay"
},
{
"declarator": "mOverlayList",
"modifier": "private final",
"original_string": "private final CopyOnWriteArrayList<Overlay> mOverlayList;",
"type": "CopyOnWriteArrayList<Overlay>",
"var_name": "mOverlayList"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/views/overlay/DefaultOverlayManager.java",
"identifier": "DefaultOverlayManager",
"interfaces": "implements OverlayManager",
"methods": [
{
"class_method_signature": "DefaultOverlayManager.DefaultOverlayManager(final TilesOverlay tilesOverlay)",
"constructor": true,
"full_signature": "public DefaultOverlayManager(final TilesOverlay tilesOverlay)",
"identifier": "DefaultOverlayManager",
"modifiers": "public",
"parameters": "(final TilesOverlay tilesOverlay)",
"return": "",
"signature": " DefaultOverlayManager(final TilesOverlay tilesOverlay)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.get(final int pIndex)",
"constructor": false,
"full_signature": "@Override public Overlay get(final int pIndex)",
"identifier": "get",
"modifiers": "@Override public",
"parameters": "(final int pIndex)",
"return": "Overlay",
"signature": "Overlay get(final int pIndex)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.add(final int pIndex, final Overlay pElement)",
"constructor": false,
"full_signature": "@Override public void add(final int pIndex, final Overlay pElement)",
"identifier": "add",
"modifiers": "@Override public",
"parameters": "(final int pIndex, final Overlay pElement)",
"return": "void",
"signature": "void add(final int pIndex, final Overlay pElement)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.remove(final int pIndex)",
"constructor": false,
"full_signature": "@Override public Overlay remove(final int pIndex)",
"identifier": "remove",
"modifiers": "@Override public",
"parameters": "(final int pIndex)",
"return": "Overlay",
"signature": "Overlay remove(final int pIndex)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.set(final int pIndex, final Overlay pElement)",
"constructor": false,
"full_signature": "@Override public Overlay set(final int pIndex, final Overlay pElement)",
"identifier": "set",
"modifiers": "@Override public",
"parameters": "(final int pIndex, final Overlay pElement)",
"return": "Overlay",
"signature": "Overlay set(final int pIndex, final Overlay pElement)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.getTilesOverlay()",
"constructor": false,
"full_signature": "@Override public TilesOverlay getTilesOverlay()",
"identifier": "getTilesOverlay",
"modifiers": "@Override public",
"parameters": "()",
"return": "TilesOverlay",
"signature": "TilesOverlay getTilesOverlay()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.setTilesOverlay(final TilesOverlay tilesOverlay)",
"constructor": false,
"full_signature": "@Override public void setTilesOverlay(final TilesOverlay tilesOverlay)",
"identifier": "setTilesOverlay",
"modifiers": "@Override public",
"parameters": "(final TilesOverlay tilesOverlay)",
"return": "void",
"signature": "void setTilesOverlay(final TilesOverlay tilesOverlay)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.overlaysReversed()",
"constructor": false,
"full_signature": "@Override public Iterable<Overlay> overlaysReversed()",
"identifier": "overlaysReversed",
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterable<Overlay>",
"signature": "Iterable<Overlay> overlaysReversed()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.overlays()",
"constructor": false,
"full_signature": "@Override public List<Overlay> overlays()",
"identifier": "overlays",
"modifiers": "@Override public",
"parameters": "()",
"return": "List<Overlay>",
"signature": "List<Overlay> overlays()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDraw(final Canvas c, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public void onDraw(final Canvas c, final MapView pMapView)",
"identifier": "onDraw",
"modifiers": "@Override public",
"parameters": "(final Canvas c, final MapView pMapView)",
"return": "void",
"signature": "void onDraw(final Canvas c, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDraw(final Canvas c, final Projection pProjection)",
"constructor": false,
"full_signature": "@Override public void onDraw(final Canvas c, final Projection pProjection)",
"identifier": "onDraw",
"modifiers": "@Override public",
"parameters": "(final Canvas c, final Projection pProjection)",
"return": "void",
"signature": "void onDraw(final Canvas c, final Projection pProjection)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDrawHelper(final Canvas c, final MapView pMapView, final Projection pProjection)",
"constructor": false,
"full_signature": "private void onDrawHelper(final Canvas c, final MapView pMapView, final Projection pProjection)",
"identifier": "onDrawHelper",
"modifiers": "private",
"parameters": "(final Canvas c, final MapView pMapView, final Projection pProjection)",
"return": "void",
"signature": "void onDrawHelper(final Canvas c, final MapView pMapView, final Projection pProjection)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDetach(final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public void onDetach(final MapView pMapView)",
"identifier": "onDetach",
"modifiers": "@Override public",
"parameters": "(final MapView pMapView)",
"return": "void",
"signature": "void onDetach(final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onPause()",
"constructor": false,
"full_signature": "@Override public void onPause()",
"identifier": "onPause",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void onPause()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onResume()",
"constructor": false,
"full_signature": "@Override public void onResume()",
"identifier": "onResume",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void onResume()",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onKeyDown(final int keyCode, final KeyEvent event, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onKeyDown(final int keyCode, final KeyEvent event, final MapView pMapView)",
"identifier": "onKeyDown",
"modifiers": "@Override public",
"parameters": "(final int keyCode, final KeyEvent event, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onKeyDown(final int keyCode, final KeyEvent event, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onKeyUp(final int keyCode, final KeyEvent event, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onKeyUp(final int keyCode, final KeyEvent event, final MapView pMapView)",
"identifier": "onKeyUp",
"modifiers": "@Override public",
"parameters": "(final int keyCode, final KeyEvent event, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onKeyUp(final int keyCode, final KeyEvent event, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onTouchEvent(final MotionEvent event, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onTouchEvent(final MotionEvent event, final MapView pMapView)",
"identifier": "onTouchEvent",
"modifiers": "@Override public",
"parameters": "(final MotionEvent event, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onTouchEvent(final MotionEvent event, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onTrackballEvent(final MotionEvent event, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onTrackballEvent(final MotionEvent event, final MapView pMapView)",
"identifier": "onTrackballEvent",
"modifiers": "@Override public",
"parameters": "(final MotionEvent event, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onTrackballEvent(final MotionEvent event, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onSnapToItem(final int x, final int y, final Point snapPoint, final IMapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onSnapToItem(final int x, final int y, final Point snapPoint, final IMapView pMapView)",
"identifier": "onSnapToItem",
"modifiers": "@Override public",
"parameters": "(final int x, final int y, final Point snapPoint, final IMapView pMapView)",
"return": "boolean",
"signature": "boolean onSnapToItem(final int x, final int y, final Point snapPoint, final IMapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDoubleTap(final MotionEvent e, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onDoubleTap(final MotionEvent e, final MapView pMapView)",
"identifier": "onDoubleTap",
"modifiers": "@Override public",
"parameters": "(final MotionEvent e, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onDoubleTap(final MotionEvent e, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDoubleTapEvent(final MotionEvent e, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onDoubleTapEvent(final MotionEvent e, final MapView pMapView)",
"identifier": "onDoubleTapEvent",
"modifiers": "@Override public",
"parameters": "(final MotionEvent e, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onDoubleTapEvent(final MotionEvent e, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onSingleTapConfirmed(final MotionEvent e, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onSingleTapConfirmed(final MotionEvent e, final MapView pMapView)",
"identifier": "onSingleTapConfirmed",
"modifiers": "@Override public",
"parameters": "(final MotionEvent e, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onSingleTapConfirmed(final MotionEvent e, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onDown(final MotionEvent pEvent, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onDown(final MotionEvent pEvent, final MapView pMapView)",
"identifier": "onDown",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onDown(final MotionEvent pEvent, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onFling(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pVelocityX, final float pVelocityY, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onFling(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pVelocityX, final float pVelocityY, final MapView pMapView)",
"identifier": "onFling",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pVelocityX, final float pVelocityY, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onFling(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pVelocityX, final float pVelocityY, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onLongPress(final MotionEvent pEvent, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onLongPress(final MotionEvent pEvent, final MapView pMapView)",
"identifier": "onLongPress",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onLongPress(final MotionEvent pEvent, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onScroll(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pDistanceX, final float pDistanceY, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onScroll(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pDistanceX, final float pDistanceY, final MapView pMapView)",
"identifier": "onScroll",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pDistanceX, final float pDistanceY, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onScroll(final MotionEvent pEvent1, final MotionEvent pEvent2,\n final float pDistanceX, final float pDistanceY, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onShowPress(final MotionEvent pEvent, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public void onShowPress(final MotionEvent pEvent, final MapView pMapView)",
"identifier": "onShowPress",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent, final MapView pMapView)",
"return": "void",
"signature": "void onShowPress(final MotionEvent pEvent, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onSingleTapUp(final MotionEvent pEvent, final MapView pMapView)",
"constructor": false,
"full_signature": "@Override public boolean onSingleTapUp(final MotionEvent pEvent, final MapView pMapView)",
"identifier": "onSingleTapUp",
"modifiers": "@Override public",
"parameters": "(final MotionEvent pEvent, final MapView pMapView)",
"return": "boolean",
"signature": "boolean onSingleTapUp(final MotionEvent pEvent, final MapView pMapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.setOptionsMenusEnabled(final boolean pEnabled)",
"constructor": false,
"full_signature": "@Override public void setOptionsMenusEnabled(final boolean pEnabled)",
"identifier": "setOptionsMenusEnabled",
"modifiers": "@Override public",
"parameters": "(final boolean pEnabled)",
"return": "void",
"signature": "void setOptionsMenusEnabled(final boolean pEnabled)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onCreateOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"constructor": false,
"full_signature": "@Override public boolean onCreateOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"identifier": "onCreateOptionsMenu",
"modifiers": "@Override public",
"parameters": "(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"return": "boolean",
"signature": "boolean onCreateOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onPrepareOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"constructor": false,
"full_signature": "@Override public boolean onPrepareOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"identifier": "onPrepareOptionsMenu",
"modifiers": "@Override public",
"parameters": "(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"return": "boolean",
"signature": "boolean onPrepareOptionsMenu(final Menu pMenu, final int menuIdOffset, final MapView mapView)",
"testcase": false
},
{
"class_method_signature": "DefaultOverlayManager.onOptionsItemSelected(final MenuItem item, final int menuIdOffset, final MapView mapView)",
"constructor": false,
"full_signature": "@Override public boolean onOptionsItemSelected(final MenuItem item, final int menuIdOffset, final MapView mapView)",
"identifier": "onOptionsItemSelected",
"modifiers": "@Override public",
"parameters": "(final MenuItem item, final int menuIdOffset, final MapView mapView)",
"return": "boolean",
"signature": "boolean onOptionsItemSelected(final MenuItem item, final int menuIdOffset, final MapView mapView)",
"testcase": false
}
],
"superclass": "extends AbstractList<Overlay>"
} | {
"body": "@Override\n public Overlay remove(final int pIndex) {\n return mOverlayList.remove(pIndex);\n }",
"class_method_signature": "DefaultOverlayManager.remove(final int pIndex)",
"constructor": false,
"full_signature": "@Override public Overlay remove(final int pIndex)",
"identifier": "remove",
"invocations": [
"remove"
],
"modifiers": "@Override public",
"parameters": "(final int pIndex)",
"return": "Overlay",
"signature": "Overlay remove(final int pIndex)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_23 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileIndexTest.java",
"identifier": "MapTileIndexTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIndex() {\n final int iterations = 1000;\n for (int i = 0 ; i < iterations ; i ++) {\n final int zoom = getRandomZoom();\n final int x = getRandomXY(zoom);\n final int y = getRandomXY(zoom);\n final long index = MapTileIndex.getTileIndex(zoom, x, y);\n checkIndex(index, zoom, x, y);\n }\n }",
"class_method_signature": "MapTileIndexTest.testIndex()",
"constructor": false,
"full_signature": "@Test public void testIndex()",
"identifier": "testIndex",
"invocations": [
"getRandomZoom",
"getRandomXY",
"getRandomXY",
"getTileIndex",
"checkIndex"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testIndex()",
"testcase": true
} | {
"fields": [
{
"declarator": "mMaxZoomLevel = TileSystem.primaryKeyMaxZoomLevel",
"modifier": "public static",
"original_string": "public static int mMaxZoomLevel = TileSystem.primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "mModulo = 1 << mMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mModulo = 1 << mMaxZoomLevel;",
"type": "int",
"var_name": "mModulo"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileIndex.java",
"identifier": "MapTileIndex",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapTileIndex.getTileIndex(final int pZoom, final int pX, final int pY)",
"constructor": false,
"full_signature": "public static long getTileIndex(final int pZoom, final int pX, final int pY)",
"identifier": "getTileIndex",
"modifiers": "public static",
"parameters": "(final int pZoom, final int pX, final int pY)",
"return": "long",
"signature": "long getTileIndex(final int pZoom, final int pX, final int pY)",
"testcase": false
},
{
"class_method_signature": "MapTileIndex.getZoom(final long pTileIndex)",
"constructor": false,
"full_signature": "public static int getZoom(final long pTileIndex)",
"identifier": "getZoom",
"modifiers": "public static",
"parameters": "(final long pTileIndex)",
"return": "int",
"signature": "int getZoom(final long pTileIndex)",
"testcase": false
},
{
"class_method_signature": "MapTileIndex.getX(final long pTileIndex)",
"constructor": false,
"full_signature": "public static int getX(final long pTileIndex)",
"identifier": "getX",
"modifiers": "public static",
"parameters": "(final long pTileIndex)",
"return": "int",
"signature": "int getX(final long pTileIndex)",
"testcase": false
},
{
"class_method_signature": "MapTileIndex.getY(final long pTileIndex)",
"constructor": false,
"full_signature": "public static int getY(final long pTileIndex)",
"identifier": "getY",
"modifiers": "public static",
"parameters": "(final long pTileIndex)",
"return": "int",
"signature": "int getY(final long pTileIndex)",
"testcase": false
},
{
"class_method_signature": "MapTileIndex.toString(final int pZoom, final int pX, final int pY)",
"constructor": false,
"full_signature": "public static String toString(final int pZoom, final int pX, final int pY)",
"identifier": "toString",
"modifiers": "public static",
"parameters": "(final int pZoom, final int pX, final int pY)",
"return": "String",
"signature": "String toString(final int pZoom, final int pX, final int pY)",
"testcase": false
},
{
"class_method_signature": "MapTileIndex.toString(final long pIndex)",
"constructor": false,
"full_signature": "public static String toString(final long pIndex)",
"identifier": "toString",
"modifiers": "public static",
"parameters": "(final long pIndex)",
"return": "String",
"signature": "String toString(final long pIndex)",
"testcase": false
},
{
"class_method_signature": "MapTileIndex.checkValues(final int pZoom, final int pX, final int pY)",
"constructor": false,
"full_signature": "private static void checkValues(final int pZoom, final int pX, final int pY)",
"identifier": "checkValues",
"modifiers": "private static",
"parameters": "(final int pZoom, final int pX, final int pY)",
"return": "void",
"signature": "void checkValues(final int pZoom, final int pX, final int pY)",
"testcase": false
},
{
"class_method_signature": "MapTileIndex.throwIllegalValue(final int pZoom, final int pValue, final String pTag)",
"constructor": false,
"full_signature": "private static void throwIllegalValue(final int pZoom, final int pValue, final String pTag)",
"identifier": "throwIllegalValue",
"modifiers": "private static",
"parameters": "(final int pZoom, final int pValue, final String pTag)",
"return": "void",
"signature": "void throwIllegalValue(final int pZoom, final int pValue, final String pTag)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static long getTileIndex(final int pZoom, final int pX, final int pY) {\n checkValues(pZoom, pX, pY);\n return (((long)pZoom) << (mMaxZoomLevel * 2))\n + (((long)pX) << mMaxZoomLevel)\n + (long)pY;\n }",
"class_method_signature": "MapTileIndex.getTileIndex(final int pZoom, final int pX, final int pY)",
"constructor": false,
"full_signature": "public static long getTileIndex(final int pZoom, final int pX, final int pY)",
"identifier": "getTileIndex",
"invocations": [
"checkValues"
],
"modifiers": "public static",
"parameters": "(final int pZoom, final int pX, final int pY)",
"return": "long",
"signature": "long getTileIndex(final int pZoom, final int pX, final int pY)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_58 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileAreaZoomComputerTest.java",
"identifier": "MapTileAreaZoomComputerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWorld() {\n final MapTileArea src = new MapTileArea();\n final MapTileArea dst = new MapTileArea();\n long size;\n int mapTileUpperBound;\n for (int zoom = 0 ; zoom <= TileSystem.getMaximumZoomLevel() ; zoom ++) {\n mapTileUpperBound = getMapTileUpperBound(zoom);\n size = ((long)mapTileUpperBound) * mapTileUpperBound;\n if (size >= Integer.MAX_VALUE) {\n return;\n }\n for (int i = 0 ; i <= 1 ; i ++) {\n final Rect rect = new Rect();\n switch(i) {\n case 0: // the world\n rect.left = 0; // remember: don't use the rect.set() syntax for unit test (cf. ProjectionTest)\n rect.top = 0;\n rect.right = mapTileUpperBound - 1;\n rect.bottom = mapTileUpperBound - 1;\n break;\n case 1: // top-left quarter of the world\n if (zoom == 0) { // top-left quarter makes no sense in zoom 0\n continue;\n }\n rect.left = 0;\n rect.top = 0;\n rect.right = mapTileUpperBound / 2 - 1;\n rect.bottom = mapTileUpperBound / 2 - 1;\n break;\n }\n src.set(zoom, rect);\n final long srcSize = src.size();\n for (int zoomDelta = 0; zoomDelta <= TileSystem.getMaximumZoomLevel(); zoomDelta++) {\n final int newZoom = zoom + zoomDelta;\n if (newZoom < 0 || newZoom > TileSystem.getMaximumZoomLevel()) {\n continue;\n }\n mapTileUpperBound = getMapTileUpperBound(newZoom);\n size = ((long)mapTileUpperBound) * mapTileUpperBound;\n if (size >= Integer.MAX_VALUE) {\n return;\n }\n final MapTileAreaZoomComputer computer = new MapTileAreaZoomComputer(zoomDelta);\n computer.computeFromSource(src, dst);\n final long dstSize = dst.size();\n final String message = \"zoom=\" + zoom + \", delta=\" + zoomDelta;\n if (zoomDelta == 0) {\n Assert.assertEquals(message, srcSize, dstSize);\n } else if (zoomDelta < 0) {\n Assert.assertEquals(message, srcSize * (1 >> -zoomDelta) * (1 >> -zoomDelta), dstSize);\n } else {\n Assert.assertEquals(message, srcSize * (1 << zoomDelta) * (1 << zoomDelta), dstSize);\n }\n }\n }\n }\n }",
"class_method_signature": "MapTileAreaZoomComputerTest.testWorld()",
"constructor": false,
"full_signature": "@Test public void testWorld()",
"identifier": "testWorld",
"invocations": [
"getMaximumZoomLevel",
"getMapTileUpperBound",
"set",
"size",
"getMaximumZoomLevel",
"getMaximumZoomLevel",
"getMapTileUpperBound",
"computeFromSource",
"size",
"assertEquals",
"assertEquals",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testWorld()",
"testcase": true
} | {
"fields": [
{
"declarator": "mZoomDelta",
"modifier": "private final",
"original_string": "private final int mZoomDelta;",
"type": "int",
"var_name": "mZoomDelta"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileAreaZoomComputer.java",
"identifier": "MapTileAreaZoomComputer",
"interfaces": "implements MapTileAreaComputer",
"methods": [
{
"class_method_signature": "MapTileAreaZoomComputer.MapTileAreaZoomComputer(final int pZoomDelta)",
"constructor": true,
"full_signature": "public MapTileAreaZoomComputer(final int pZoomDelta)",
"identifier": "MapTileAreaZoomComputer",
"modifiers": "public",
"parameters": "(final int pZoomDelta)",
"return": "",
"signature": " MapTileAreaZoomComputer(final int pZoomDelta)",
"testcase": false
},
{
"class_method_signature": "MapTileAreaZoomComputer.computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"identifier": "computeFromSource",
"modifiers": "@Override public",
"parameters": "(final MapTileArea pSource, final MapTileArea pReuse)",
"return": "MapTileArea",
"signature": "MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse) {\n final MapTileArea out = pReuse != null ? pReuse : new MapTileArea();\n if (pSource.size() == 0) {\n out.reset();\n return out;\n }\n final int sourceZoom = pSource.getZoom();\n int destZoom = sourceZoom + mZoomDelta;\n if (destZoom < 0 || destZoom > MapTileIndex.mMaxZoomLevel) {\n out.reset();\n return out;\n }\n if (mZoomDelta <= 0) {\n out.set(destZoom,\n pSource.getLeft() >> -mZoomDelta, pSource.getTop() >> -mZoomDelta,\n pSource.getRight() >> -mZoomDelta, pSource.getBottom() >> -mZoomDelta);\n return out;\n }\n out.set(destZoom,\n pSource.getLeft() << mZoomDelta, pSource.getTop() << mZoomDelta,\n ((1 + pSource.getRight()) << mZoomDelta) - 1, ((1 + pSource.getBottom()) << mZoomDelta) -1\n );\n return out;\n }",
"class_method_signature": "MapTileAreaZoomComputer.computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"identifier": "computeFromSource",
"invocations": [
"size",
"reset",
"getZoom",
"reset",
"set",
"getLeft",
"getTop",
"getRight",
"getBottom",
"set",
"getLeft",
"getTop",
"getRight",
"getBottom"
],
"modifiers": "@Override public",
"parameters": "(final MapTileArea pSource, final MapTileArea pReuse)",
"return": "MapTileArea",
"signature": "MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_19 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private",
"original_string": "private Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileAreaTest.java",
"identifier": "MapTileAreaTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSize() {\n final MapTileArea area = new MapTileArea();\n for (int zoom = 0; zoom <= TileSystem.getMaximumZoomLevel(); zoom++) {\n final int mapTileUpperBound = getMapTileUpperBound(zoom);\n final long size = ((long)mapTileUpperBound) * mapTileUpperBound;\n if (size >= Integer.MAX_VALUE) {\n return;\n }\n setNewWorld(area, zoom);\n Assert.assertEquals(size, area.size());\n Assert.assertTrue(area.iterator().hasNext());\n }\n }",
"class_method_signature": "MapTileAreaTest.testSize()",
"constructor": false,
"full_signature": "@Test public void testSize()",
"identifier": "testSize",
"invocations": [
"getMaximumZoomLevel",
"getMapTileUpperBound",
"setNewWorld",
"assertEquals",
"size",
"assertTrue",
"hasNext",
"iterator"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testSize()",
"testcase": true
} | {
"fields": [
{
"declarator": "mZoom",
"modifier": "private",
"original_string": "private int mZoom;",
"type": "int",
"var_name": "mZoom"
},
{
"declarator": "mLeft",
"modifier": "private",
"original_string": "private int mLeft;",
"type": "int",
"var_name": "mLeft"
},
{
"declarator": "mTop",
"modifier": "private",
"original_string": "private int mTop;",
"type": "int",
"var_name": "mTop"
},
{
"declarator": "mWidth",
"modifier": "private",
"original_string": "private int mWidth;",
"type": "int",
"var_name": "mWidth"
},
{
"declarator": "mHeight",
"modifier": "private",
"original_string": "private int mHeight;",
"type": "int",
"var_name": "mHeight"
},
{
"declarator": "mMapTileUpperBound",
"modifier": "private",
"original_string": "private int mMapTileUpperBound;",
"type": "int",
"var_name": "mMapTileUpperBound"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileArea.java",
"identifier": "MapTileArea",
"interfaces": "implements MapTileContainer, IterableWithSize<Long>",
"methods": [
{
"class_method_signature": "MapTileArea.set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.set(final int pZoom, final Rect pRect)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final Rect pRect)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final int pZoom, final Rect pRect)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final Rect pRect)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.set(final MapTileArea pArea)",
"constructor": false,
"full_signature": "public MapTileArea set(final MapTileArea pArea)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final MapTileArea pArea)",
"return": "MapTileArea",
"signature": "MapTileArea set(final MapTileArea pArea)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.reset()",
"constructor": false,
"full_signature": "public MapTileArea reset()",
"identifier": "reset",
"modifiers": "public",
"parameters": "()",
"return": "MapTileArea",
"signature": "MapTileArea reset()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getZoom()",
"constructor": false,
"full_signature": "public int getZoom()",
"identifier": "getZoom",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getZoom()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getLeft()",
"constructor": false,
"full_signature": "public int getLeft()",
"identifier": "getLeft",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getLeft()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getTop()",
"constructor": false,
"full_signature": "public int getTop()",
"identifier": "getTop",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getTop()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getWidth()",
"constructor": false,
"full_signature": "public int getWidth()",
"identifier": "getWidth",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getWidth()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getHeight()",
"constructor": false,
"full_signature": "public int getHeight()",
"identifier": "getHeight",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getHeight()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getRight()",
"constructor": false,
"full_signature": "public int getRight()",
"identifier": "getRight",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getRight()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getBottom()",
"constructor": false,
"full_signature": "public int getBottom()",
"identifier": "getBottom",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBottom()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.iterator()",
"constructor": false,
"full_signature": "@Override public Iterator<Long> iterator()",
"identifier": "iterator",
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterator<Long>",
"signature": "Iterator<Long> iterator()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.contains(long pTileIndex)",
"constructor": false,
"full_signature": "@Override public boolean contains(long pTileIndex)",
"identifier": "contains",
"modifiers": "@Override public",
"parameters": "(long pTileIndex)",
"return": "boolean",
"signature": "boolean contains(long pTileIndex)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.contains(int pValue, final int pFirst, final int pSize)",
"constructor": false,
"full_signature": "private boolean contains(int pValue, final int pFirst, final int pSize)",
"identifier": "contains",
"modifiers": "private",
"parameters": "(int pValue, final int pFirst, final int pSize)",
"return": "boolean",
"signature": "boolean contains(int pValue, final int pFirst, final int pSize)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.cleanValue(int pValue)",
"constructor": false,
"full_signature": "private int cleanValue(int pValue)",
"identifier": "cleanValue",
"modifiers": "private",
"parameters": "(int pValue)",
"return": "int",
"signature": "int cleanValue(int pValue)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.computeSize(final int pTopLeft, int pBottomRight)",
"constructor": false,
"full_signature": "private int computeSize(final int pTopLeft, int pBottomRight)",
"identifier": "computeSize",
"modifiers": "private",
"parameters": "(final int pTopLeft, int pBottomRight)",
"return": "int",
"signature": "int computeSize(final int pTopLeft, int pBottomRight)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public int size() {\n return mWidth * mHeight;\n }",
"class_method_signature": "MapTileArea.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_39 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_toFromInvertedDoubleString_withoutAltitude() {\n\t\tfinal GeoPoint in = new GeoPoint(-117.123, 33.123);\n\t\tfinal GeoPoint out = GeoPoint.fromInvertedDoubleString(\"33.123,-117.123\", ',');\n\t\tassertEquals(\"toFromString without altitude\", in, out);\n\t}",
"class_method_signature": "GeoPointTest.test_toFromInvertedDoubleString_withoutAltitude()",
"constructor": false,
"full_signature": "@Test public void test_toFromInvertedDoubleString_withoutAltitude()",
"identifier": "test_toFromInvertedDoubleString_withoutAltitude",
"invocations": [
"fromInvertedDoubleString",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_toFromInvertedDoubleString_withoutAltitude()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer) {\n\t\tfinal int spacerPos1 = s.indexOf(spacer);\n\t\tfinal int spacerPos2 = s.indexOf(spacer, spacerPos1 + 1);\n\n\t\tif (spacerPos2 == -1) {\n\t\t\treturn new GeoPoint(\n\t\t\t\t\tDouble.parseDouble(s.substring(spacerPos1 + 1, s.length())),\n\t\t\t\t\tDouble.parseDouble(s.substring(0, spacerPos1)));\n\t\t} else {\n\t\t\treturn new GeoPoint(\n\t\t\t\t\tDouble.parseDouble(s.substring(spacerPos1 + 1, spacerPos2)),\n\t\t\t\t\tDouble.parseDouble(s.substring(0, spacerPos1)),\n\t\t\t\t\tDouble.parseDouble(s.substring(spacerPos2 + 1, s.length())));\n\n\t\t}\n\t}",
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"invocations": [
"indexOf",
"indexOf",
"parseDouble",
"substring",
"length",
"parseDouble",
"substring",
"parseDouble",
"substring",
"parseDouble",
"substring",
"parseDouble",
"substring",
"length"
],
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_4 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "XY01Delta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double XY01Delta = 1E-10;",
"type": "double",
"var_name": "XY01Delta"
},
{
"declarator": "latLongDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double latLongDelta = 1E-10;",
"type": "double",
"var_name": "latLongDelta"
},
{
"declarator": "mMinZoomLevel = 0",
"modifier": "private static final",
"original_string": "private static final int mMinZoomLevel = 0;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel = TileSystem.getMaximumZoomLevel()",
"modifier": "private static final",
"original_string": "private static final int mMaxZoomLevel = TileSystem.getMaximumZoomLevel();",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/TileSystemTest.java",
"identifier": "TileSystemTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetBoundingBoxZoom() {\n final int tileSize = 256;\n final int screenWidth = tileSize * 2;\n final int screenHeight = screenWidth * 2;\n TileSystem.setTileSize(tileSize);\n\n final int iterations = 2000;\n for (int i = 0 ; i < iterations ; i ++) {\n final double north = getRandomLatitude();\n final double south = getRandomLatitude();\n final double east = getRandomLongitude();\n final double west = getRandomLongitude();\n final BoundingBox boundingBox = new BoundingBox(north, east, south, west);\n final double zoom = tileSystem.getBoundingBoxZoom(boundingBox, screenWidth, screenHeight);\n if (zoom == Double.MIN_VALUE) {\n Assert.assertTrue(north <= south || east == west);\n continue;\n }\n final double mapSize = TileSystem.MapSize(zoom);\n final long left = tileSystem.getMercatorXFromLongitude(west, mapSize, true);\n final long top = tileSystem.getMercatorYFromLatitude(north, mapSize, true);\n final long right = tileSystem.getMercatorXFromLongitude(east, mapSize, true);\n final long bottom = tileSystem.getMercatorYFromLatitude(south, mapSize, true);\n long width = right - left;\n if (east < west) {\n width += mapSize;\n }\n final long height = bottom - top;\n checkSize(width, height, screenWidth, screenHeight);\n }\n }",
"class_method_signature": "TileSystemTest.testGetBoundingBoxZoom()",
"constructor": false,
"full_signature": "@Test public void testGetBoundingBoxZoom()",
"identifier": "testGetBoundingBoxZoom",
"invocations": [
"setTileSize",
"getRandomLatitude",
"getRandomLatitude",
"getRandomLongitude",
"getRandomLongitude",
"getBoundingBoxZoom",
"assertTrue",
"MapSize",
"getMercatorXFromLongitude",
"getMercatorYFromLatitude",
"getMercatorXFromLongitude",
"getMercatorYFromLatitude",
"checkSize"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetBoundingBoxZoom()",
"testcase": true
} | {
"fields": [
{
"declarator": "EarthRadius = GeoConstants.RADIUS_EARTH_METERS",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double EarthRadius = GeoConstants.RADIUS_EARTH_METERS;",
"type": "double",
"var_name": "EarthRadius"
},
{
"declarator": "MinLatitude = -85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLatitude = -85.05112877980659;",
"type": "double",
"var_name": "MinLatitude"
},
{
"declarator": "MaxLatitude = 85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLatitude = 85.05112877980659;",
"type": "double",
"var_name": "MaxLatitude"
},
{
"declarator": "MinLongitude = -180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLongitude = -180d;",
"type": "double",
"var_name": "MinLongitude"
},
{
"declarator": "MaxLongitude = 180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLongitude = 180d;",
"type": "double",
"var_name": "MaxLongitude"
},
{
"declarator": "mTileSize = 256",
"modifier": "private static",
"original_string": "private static int mTileSize = 256;",
"type": "int",
"var_name": "mTileSize"
},
{
"declarator": "primaryKeyMaxZoomLevel = 29",
"modifier": "public static final",
"original_string": "public static final int primaryKeyMaxZoomLevel = 29;",
"type": "int",
"var_name": "primaryKeyMaxZoomLevel"
},
{
"declarator": "projectionZoomLevel = primaryKeyMaxZoomLevel + 1",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final int projectionZoomLevel = primaryKeyMaxZoomLevel + 1;",
"type": "int",
"var_name": "projectionZoomLevel"
},
{
"declarator": "mMaxZoomLevel = primaryKeyMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mMaxZoomLevel = primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java",
"identifier": "TileSystem",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSystem.setTileSize(final int tileSize)",
"constructor": false,
"full_signature": "public static void setTileSize(final int tileSize)",
"identifier": "setTileSize",
"modifiers": "public static",
"parameters": "(final int tileSize)",
"return": "void",
"signature": "void setTileSize(final int tileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize()",
"constructor": false,
"full_signature": "public static int getTileSize()",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getTileSize()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaximumZoomLevel()",
"constructor": false,
"full_signature": "public static int getMaximumZoomLevel()",
"identifier": "getMaximumZoomLevel",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getMaximumZoomLevel()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getTileSize(final double pZoomLevel)",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getTileSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getInputTileZoomLevel(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static int getInputTileZoomLevel(final double pZoomLevel)",
"identifier": "getInputTileZoomLevel",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "int",
"signature": "int getInputTileZoomLevel(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double MapSize(final double pZoomLevel)",
"identifier": "MapSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double MapSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getFactor(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getFactor(final double pZoomLevel)",
"identifier": "getFactor",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getFactor(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final double zoomLevel)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final double zoomLevel)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final double zoomLevel)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final double zoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolutionMapSize(double latitude, final double mapSize)",
"constructor": false,
"full_signature": "public static double GroundResolutionMapSize(double latitude, final double mapSize)",
"identifier": "GroundResolutionMapSize",
"modifiers": "public static",
"parameters": "(double latitude, final double mapSize)",
"return": "double",
"signature": "double GroundResolutionMapSize(double latitude, final double mapSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"return": "Point",
"signature": "Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"identifier": "LatLongToPixelXYMapSize",
"modifiers": "@Deprecated public",
"parameters": "(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongWithoutWrap",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude)",
"constructor": false,
"full_signature": "abstract public double getX01FromLongitude(double longitude)",
"identifier": "getX01FromLongitude",
"modifiers": "abstract public",
"parameters": "(double longitude)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "abstract public double getY01FromLatitude(final double pLatitude)",
"identifier": "getY01FromLatitude",
"modifiers": "abstract public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double getY01FromLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"identifier": "PixelXYToLatLongMapSize",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongMapSizeWithoutWrap",
"modifiers": "public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final double n, final double minValue, final double maxValue)",
"constructor": false,
"full_signature": "public static double Clip(final double n, final double minValue, final double maxValue)",
"identifier": "Clip",
"modifiers": "public static",
"parameters": "(final double n, final double minValue, final double maxValue)",
"return": "double",
"signature": "double Clip(final double n, final double minValue, final double maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY, final Point reuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final Rect rect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int tileX, final int tileY, final Point reuse)",
"return": "Point",
"signature": "Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"return": "PointL",
"signature": "PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"identifier": "TileXYToQuadKey",
"modifiers": "public static",
"parameters": "(final int tileX, final int tileY, final int levelOfDetail)",
"return": "String",
"signature": "String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.QuadKeyToTileXY(final String quadKey, final Point reuse)",
"constructor": false,
"full_signature": "public static Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"identifier": "QuadKeyToTileXY",
"modifiers": "public static",
"parameters": "(final String quadKey, final Point reuse)",
"return": "Point",
"signature": "Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"constructor": false,
"full_signature": "public double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"identifier": "getLongitudeZoom",
"modifiers": "public",
"parameters": "(final double pEast, final double pWest, final int pScreenWidth)",
"return": "double",
"signature": "double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"identifier": "getLatitudeZoom",
"modifiers": "public",
"parameters": "(final double pNorth, final double pSouth, final int pScreenHeight)",
"return": "double",
"signature": "double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.wrap(double n, final double minValue, final double maxValue, final double interval)",
"constructor": false,
"full_signature": "private static double wrap(double n, final double minValue, final double maxValue, final double interval)",
"identifier": "wrap",
"modifiers": "private static",
"parameters": "(double n, final double minValue, final double maxValue, final double interval)",
"return": "double",
"signature": "double wrap(double n, final double minValue, final double maxValue, final double interval)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorFromXY01",
"modifiers": "public",
"parameters": "(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01)",
"constructor": false,
"full_signature": "abstract public double getLatitudeFromY01(final double pY01)",
"identifier": "getLatitudeFromY01",
"modifiers": "abstract public",
"parameters": "(final double pY01)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01)",
"constructor": false,
"full_signature": "abstract public double getLongitudeFromX01(final double pX01)",
"identifier": "getLongitudeFromX01",
"modifiers": "abstract public",
"parameters": "(final double pX01)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"identifier": "getCleanMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"constructor": false,
"full_signature": "public static long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"identifier": "ClipToLong",
"modifiers": "public static",
"parameters": "(final double pValue, final double pMax, final boolean pWrapEnabled)",
"return": "long",
"signature": "long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final long n, final long minValue, final long maxValue)",
"constructor": false,
"full_signature": "@Deprecated public static long Clip(final long n, final long minValue, final long maxValue)",
"identifier": "Clip",
"modifiers": "@Deprecated public static",
"parameters": "(final long n, final long minValue, final long maxValue)",
"return": "long",
"signature": "long Clip(final long n, final long minValue, final long maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.truncateToInt(final long value)",
"constructor": false,
"full_signature": "public static int truncateToInt(final long value)",
"identifier": "truncateToInt",
"modifiers": "public static",
"parameters": "(final long value)",
"return": "int",
"signature": "int truncateToInt(final long value)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"identifier": "getMercatorFromGeo",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"return": "PointL",
"signature": "PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "public GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"identifier": "getGeoFromMercator",
"modifiers": "public",
"parameters": "(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"identifier": "getXY01FromMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"return": "double",
"signature": "double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLongitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLongitude(final double pRandom01)",
"identifier": "getRandomLongitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLongitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01, final double pMinLatitude)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final long pMercator, final double pTileSize)",
"constructor": false,
"full_signature": "public static int getTileFromMercator(final long pMercator, final double pTileSize)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final long pMercator, final double pTileSize)",
"return": "int",
"signature": "int getTileFromMercator(final long pMercator, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromTile(final int pTile, final double pTileSize)",
"constructor": false,
"full_signature": "public static long getMercatorFromTile(final int pTile, final double pTileSize)",
"identifier": "getMercatorFromTile",
"modifiers": "public static",
"parameters": "(final int pTile, final double pTileSize)",
"return": "long",
"signature": "long getMercatorFromTile(final int pTile, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLatitude()",
"constructor": false,
"full_signature": "abstract public double getMinLatitude()",
"identifier": "getMinLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLatitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLatitude()",
"identifier": "getMaxLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLongitude()",
"constructor": false,
"full_signature": "abstract public double getMinLongitude()",
"identifier": "getMinLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLongitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLongitude()",
"identifier": "getMaxLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public double cleanLongitude(final double pLongitude)",
"identifier": "cleanLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "double",
"signature": "double cleanLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public double cleanLatitude(final double pLatitude)",
"identifier": "cleanLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double cleanLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public boolean isValidLongitude(final double pLongitude)",
"identifier": "isValidLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "boolean",
"signature": "boolean isValidLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public boolean isValidLatitude(final double pLatitude)",
"identifier": "isValidLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "boolean",
"signature": "boolean isValidLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLongitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLongitudeSpan()",
"identifier": "toStringLongitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLatitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLatitudeSpan()",
"identifier": "toStringLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileXFromLongitude(final double pLongitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"identifier": "getTileXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final int pZoom)",
"return": "int",
"signature": "int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileYFromLatitude(final double pLatitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"identifier": "getTileYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final int pZoom)",
"return": "int",
"signature": "int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromTileY(final int pY, final int pZoom)",
"constructor": false,
"full_signature": "public double getLatitudeFromTileY(final int pY, final int pZoom)",
"identifier": "getLatitudeFromTileY",
"modifiers": "public",
"parameters": "(final int pY, final int pZoom)",
"return": "double",
"signature": "double getLatitudeFromTileY(final int pY, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromTileX(final int pX, final int pZoom)",
"constructor": false,
"full_signature": "public double getLongitudeFromTileX(final int pX, final int pZoom)",
"identifier": "getLongitudeFromTileX",
"modifiers": "public",
"parameters": "(final int pX, final int pZoom)",
"return": "double",
"signature": "double getLongitudeFromTileX(final int pX, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.clipTile(final int pTile, final int pZoom)",
"constructor": false,
"full_signature": "private int clipTile(final int pTile, final int pZoom)",
"identifier": "clipTile",
"modifiers": "private",
"parameters": "(final int pTile, final int pZoom)",
"return": "int",
"signature": "int clipTile(final int pTile, final int pZoom)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight) {\n\t\tfinal double longitudeZoom = getLongitudeZoom(pBoundingBox.getLonEast(), pBoundingBox.getLonWest(), pScreenWidth);\n\t\tfinal double latitudeZoom = getLatitudeZoom(pBoundingBox.getLatNorth(), pBoundingBox.getLatSouth(), pScreenHeight);\n\t\tif (longitudeZoom == Double.MIN_VALUE) {\n\t\t\treturn latitudeZoom;\n\t\t}\n\t\tif (latitudeZoom == Double.MIN_VALUE) {\n\t\t\treturn longitudeZoom;\n\t\t}\n\t\treturn Math.min(latitudeZoom, longitudeZoom);\n\t}",
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"invocations": [
"getLongitudeZoom",
"getLonEast",
"getLonWest",
"getLatitudeZoom",
"getLatNorth",
"getLatSouth",
"min"
],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_54 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void increaseByScale() {\n BoundingBox bb = new BoundingBox(10, 20, 0, 0).increaseByScale(1.2f);\n assertEquals(11, bb.getLatNorth(), TOLERANCE);\n assertEquals(22, bb.getLonEast(), TOLERANCE);\n assertEquals(-1, bb.getLatSouth(), TOLERANCE);\n assertEquals(-2, bb.getLonWest(), TOLERANCE);\n }",
"class_method_signature": "BoundingBoxTest.increaseByScale()",
"constructor": false,
"full_signature": "@Test public void increaseByScale()",
"identifier": "increaseByScale",
"invocations": [
"increaseByScale",
"assertEquals",
"getLatNorth",
"assertEquals",
"getLonEast",
"assertEquals",
"getLatSouth",
"assertEquals",
"getLonWest"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void increaseByScale()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale) {\n if (pBoundingboxPaddingRelativeScale <= 0)\n throw new IllegalArgumentException(\"pBoundingboxPaddingRelativeScale must be positive\");\n final TileSystem tileSystem = org.osmdroid.views.MapView.getTileSystem();\n // out-of-bounds latitude will be clipped\n final double latCenter = getCenterLatitude();\n final double latSpanHalf = getLatitudeSpan() / 2 * pBoundingboxPaddingRelativeScale;\n final double latNorth = tileSystem.cleanLatitude(latCenter + latSpanHalf);\n final double latSouth = tileSystem.cleanLatitude(latCenter - latSpanHalf);\n // out-of-bounds longitude will be wrapped around\n final double lonCenter = getCenterLongitude();\n final double lonSpanHalf = getLongitudeSpanWithDateLine() / 2 * pBoundingboxPaddingRelativeScale;\n final double latEast = tileSystem.cleanLongitude(lonCenter + lonSpanHalf);\n final double latWest = tileSystem.cleanLongitude(lonCenter - lonSpanHalf);\n return new BoundingBox(latNorth, latEast, latSouth, latWest);\n }",
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"invocations": [
"getTileSystem",
"getCenterLatitude",
"getLatitudeSpan",
"cleanLatitude",
"cleanLatitude",
"getCenterLongitude",
"getLongitudeSpanWithDateLine",
"cleanLongitude",
"cleanLongitude"
],
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_15 | {
"fields": [
{
"declarator": "mDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double mDelta = 1E-10;",
"type": "double",
"var_name": "mDelta"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/DistanceTest.java",
"identifier": "DistanceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_getProjectionFactorToLine() {\n\t\tfinal int xA = 100;\n\t\tfinal int yA = 200;\n\t\tAssert.assertEquals(0,\n\t\t\t\tDistance.getProjectionFactorToLine(xA, yA, xA, yA, xA, yA), mDelta);\n\t\tAssert.assertEquals(0,\n\t\t\t\tDistance.getProjectionFactorToLine(xA, yA, xA + 10, yA, xA + 10, yA), mDelta);\n\t\tAssert.assertEquals(0,\n\t\t\t\tDistance.getProjectionFactorToLine(xA, yA, xA, yA + 20, xA, yA + 20), mDelta);\n\t\tAssert.assertEquals(0,\n\t\t\t\tDistance.getProjectionFactorToLine(xA, yA + 20, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(-10./100, // < 0\n\t\t\t\tDistance.getProjectionFactorToLine(xA - 10, yA - 30, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(2, // > 1\n\t\t\t\tDistance.getProjectionFactorToLine(xA + 200, yA - 70, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(1, // 1\n\t\t\t\tDistance.getProjectionFactorToLine(xA + 200, yA - 7000, xA, yA, xA + 200, yA), mDelta);\n\t\tAssert.assertEquals(.2, // ]0,1[\n\t\t\t\tDistance.getProjectionFactorToLine(xA + 200, yA - 7000, xA, yA, xA + 1000, yA), mDelta);\n\t}",
"class_method_signature": "DistanceTest.test_getProjectionFactorToLine()",
"constructor": false,
"full_signature": "@Test public void test_getProjectionFactorToLine()",
"identifier": "test_getProjectionFactorToLine",
"invocations": [
"assertEquals",
"getProjectionFactorToLine",
"assertEquals",
"getProjectionFactorToLine",
"assertEquals",
"getProjectionFactorToLine",
"assertEquals",
"getProjectionFactorToLine",
"assertEquals",
"getProjectionFactorToLine",
"assertEquals",
"getProjectionFactorToLine",
"assertEquals",
"getProjectionFactorToLine",
"assertEquals",
"getProjectionFactorToLine"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_getProjectionFactorToLine()",
"testcase": true
} | {
"fields": [],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/Distance.java",
"identifier": "Distance",
"interfaces": "",
"methods": [
{
"class_method_signature": "Distance.getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"identifier": "getSquaredDistanceToPoint",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"return": "double",
"signature": "double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToLine",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToSegment",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"identifier": "getSquaredDistanceToProjection",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"return": "double",
"signature": "double getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToLine",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToSegment",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"constructor": false,
"full_signature": "private static double dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"identifier": "dotProduct",
"modifiers": "private static",
"parameters": "(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"return": "double",
"signature": "double dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n ) {\n if (pAX == pBX && pAY == pBY) {\n return 0;\n }\n return dotProduct(pAX, pAY, pBX, pBY, pFromX, pFromY)\n / getSquaredDistanceToPoint(pAX, pAY, pBX, pBY);\n }",
"class_method_signature": "Distance.getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToLine",
"invocations": [
"dotProduct",
"getSquaredDistanceToPoint"
],
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_42 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private static final",
"original_string": "private static final Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
},
{
"declarator": "mMaxCoordinate = 2000",
"modifier": "private static final",
"original_string": "private static final int mMaxCoordinate = 2000;",
"type": "int",
"var_name": "mMaxCoordinate"
},
{
"declarator": "mIterations = 100",
"modifier": "private static final",
"original_string": "private static final int mIterations = 100;",
"type": "int",
"var_name": "mIterations"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/RectLTest.java",
"identifier": "RectLTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetBoundsSamplesRect() {\n final Rect in = new Rect();\n final Rect out = new Rect();\n in.top = 0; // lousy member setting for Rect - see javadoc comments on class\n in.left = 0;\n\n in.bottom = 6;\n in.right = 4;\n RectL.getBounds(in, 0,0, 180, out);\n Assert.assertEquals(-6, out.top);\n Assert.assertEquals(0, out.bottom);\n Assert.assertEquals(-4, out.left);\n Assert.assertEquals(0, out.right);\n\n in.bottom = 7;\n in.right = 5;\n RectL.getBounds(in, 0,0, 90, out);\n Assert.assertEquals(0, out.top);\n Assert.assertEquals(-7, out.left);\n Assert.assertEquals(5, out.bottom);\n Assert.assertEquals(0, out.right);\n\n in.bottom = 8;\n in.right = 8;\n RectL.getBounds(in, 0,0, 45, out);\n Assert.assertEquals(0, out.top);\n Assert.assertEquals(- Math.round(8 * Math.sqrt(2) / 2.), out.left);\n Assert.assertEquals(Math.round(8 * Math.sqrt(2)), out.bottom);\n Assert.assertEquals(Math.round(8 * Math.sqrt(2) / 2.), out.right);\n }",
"class_method_signature": "RectLTest.testGetBoundsSamplesRect()",
"constructor": false,
"full_signature": "@Test public void testGetBoundsSamplesRect()",
"identifier": "testGetBoundsSamplesRect",
"invocations": [
"getBounds",
"assertEquals",
"assertEquals",
"assertEquals",
"assertEquals",
"getBounds",
"assertEquals",
"assertEquals",
"assertEquals",
"assertEquals",
"getBounds",
"assertEquals",
"assertEquals",
"round",
"sqrt",
"assertEquals",
"round",
"sqrt",
"assertEquals",
"round",
"sqrt"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetBoundsSamplesRect()",
"testcase": true
} | {
"fields": [
{
"declarator": "left",
"modifier": "public",
"original_string": "public long left;",
"type": "long",
"var_name": "left"
},
{
"declarator": "top",
"modifier": "public",
"original_string": "public long top;",
"type": "long",
"var_name": "top"
},
{
"declarator": "right",
"modifier": "public",
"original_string": "public long right;",
"type": "long",
"var_name": "right"
},
{
"declarator": "bottom",
"modifier": "public",
"original_string": "public long bottom;",
"type": "long",
"var_name": "bottom"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/RectL.java",
"identifier": "RectL",
"interfaces": "",
"methods": [
{
"class_method_signature": "RectL.RectL()",
"constructor": true,
"full_signature": "public RectL()",
"identifier": "RectL",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " RectL()",
"testcase": false
},
{
"class_method_signature": "RectL.RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": true,
"full_signature": "public RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "RectL",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "",
"signature": " RectL(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.RectL(final RectL pOther)",
"constructor": true,
"full_signature": "public RectL(final RectL pOther)",
"identifier": "RectL",
"modifiers": "public",
"parameters": "(final RectL pOther)",
"return": "",
"signature": " RectL(final RectL pOther)",
"testcase": false
},
{
"class_method_signature": "RectL.set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": false,
"full_signature": "public void set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "void",
"signature": "void set(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.set(final RectL pOther)",
"constructor": false,
"full_signature": "public void set(final RectL pOther)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final RectL pOther)",
"return": "void",
"signature": "void set(final RectL pOther)",
"testcase": false
},
{
"class_method_signature": "RectL.union(long x, long y)",
"constructor": false,
"full_signature": "public void union(long x, long y)",
"identifier": "union",
"modifiers": "public",
"parameters": "(long x, long y)",
"return": "void",
"signature": "void union(long x, long y)",
"testcase": false
},
{
"class_method_signature": "RectL.intersects(RectL a, RectL b)",
"constructor": false,
"full_signature": "public static boolean intersects(RectL a, RectL b)",
"identifier": "intersects",
"modifiers": "public static",
"parameters": "(RectL a, RectL b)",
"return": "boolean",
"signature": "boolean intersects(RectL a, RectL b)",
"testcase": false
},
{
"class_method_signature": "RectL.contains(long x, long y)",
"constructor": false,
"full_signature": "public boolean contains(long x, long y)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(long x, long y)",
"return": "boolean",
"signature": "boolean contains(long x, long y)",
"testcase": false
},
{
"class_method_signature": "RectL.inset(long dx, long dy)",
"constructor": false,
"full_signature": "public void inset(long dx, long dy)",
"identifier": "inset",
"modifiers": "public",
"parameters": "(long dx, long dy)",
"return": "void",
"signature": "void inset(long dx, long dy)",
"testcase": false
},
{
"class_method_signature": "RectL.width()",
"constructor": false,
"full_signature": "public final long width()",
"identifier": "width",
"modifiers": "public final",
"parameters": "()",
"return": "long",
"signature": "long width()",
"testcase": false
},
{
"class_method_signature": "RectL.height()",
"constructor": false,
"full_signature": "public final long height()",
"identifier": "height",
"modifiers": "public final",
"parameters": "()",
"return": "long",
"signature": "long height()",
"testcase": false
},
{
"class_method_signature": "RectL.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "RectL.equals(Object o)",
"constructor": false,
"full_signature": "@Override public boolean equals(Object o)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(Object o)",
"return": "boolean",
"signature": "boolean equals(Object o)",
"testcase": false
},
{
"class_method_signature": "RectL.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "RectL.getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"constructor": false,
"full_signature": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"identifier": "getBounds",
"modifiers": "public static",
"parameters": "(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"return": "RectL",
"signature": "RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"testcase": false
},
{
"class_method_signature": "RectL.getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"identifier": "getBounds",
"modifiers": "public static",
"parameters": "(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"return": "Rect",
"signature": "Rect getBounds(final Rect pIn,\n final int pCenterX, final int pCenterY, final double pDegrees,\n final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"constructor": false,
"full_signature": "public static long getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"identifier": "getRotatedX",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"return": "long",
"signature": "long getRotatedX(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"constructor": false,
"full_signature": "public static long getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"identifier": "getRotatedY",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"return": "long",
"signature": "long getRotatedY(final long pX, final long pY,\n final double pDegrees, final long pCenterX, final long pCenterY)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"constructor": false,
"full_signature": "public static long getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"identifier": "getRotatedX",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"return": "long",
"signature": "long getRotatedX(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"testcase": false
},
{
"class_method_signature": "RectL.getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"constructor": false,
"full_signature": "public static long getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"identifier": "getRotatedY",
"modifiers": "public static",
"parameters": "(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"return": "long",
"signature": "long getRotatedY(final long pX, final long pY,\n final long pCenterX, final long pCenterY,\n final double pCos, final double pSin)",
"testcase": false
},
{
"class_method_signature": "RectL.offset(final long pDx, final long pDy)",
"constructor": false,
"full_signature": "public void offset(final long pDx, final long pDy)",
"identifier": "offset",
"modifiers": "public",
"parameters": "(final long pDx, final long pDy)",
"return": "void",
"signature": "void offset(final long pDx, final long pDy)",
"testcase": false
},
{
"class_method_signature": "RectL.union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"constructor": false,
"full_signature": "public void union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"identifier": "union",
"modifiers": "public",
"parameters": "(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"return": "void",
"signature": "void union(final long pLeft, final long pTop, final long pRight, final long pBottom)",
"testcase": false
},
{
"class_method_signature": "RectL.union(final RectL pRect)",
"constructor": false,
"full_signature": "public void union(final RectL pRect)",
"identifier": "union",
"modifiers": "public",
"parameters": "(final RectL pRect)",
"return": "void",
"signature": "void union(final RectL pRect)",
"testcase": false
},
{
"class_method_signature": "RectL.centerX()",
"constructor": false,
"full_signature": "public long centerX()",
"identifier": "centerX",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long centerX()",
"testcase": false
},
{
"class_method_signature": "RectL.centerY()",
"constructor": false,
"full_signature": "public long centerY()",
"identifier": "centerY",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long centerY()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse) {\n final RectL out = pReuse != null ? pReuse : new RectL();\n if (pDegrees == 0) { // optimization\n out.top = pIn.top;\n out.left = pIn.left;\n out.bottom = pIn.bottom;\n out.right = pIn.right;\n return out;\n }\n final double radians = pDegrees * Math.PI / 180.;\n final double cos = Math.cos(radians);\n final double sin = Math.sin(radians);\n long inputX;\n long inputY;\n long outputX;\n long outputY;\n inputX = pIn.left; // corner 1\n inputY = pIn.top;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n out.top = out.bottom = outputY;\n out.left = out.right = outputX;\n inputX = pIn.right; // corner 2\n inputY = pIn.top;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n inputX = pIn.right; // corner 3\n inputY = pIn.bottom;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n inputX = pIn.left; // corner 4\n inputY = pIn.bottom;\n outputX = getRotatedX(inputX, inputY, pCenterX, pCenterY, cos, sin);\n outputY = getRotatedY(inputX, inputY, pCenterX, pCenterY, cos, sin);\n if (out.top > outputY) {\n out.top = outputY;\n }\n if (out.bottom < outputY) {\n out.bottom = outputY;\n }\n if (out.left > outputX) {\n out.left = outputX;\n }\n if (out.right < outputX) {\n out.right = outputX;\n }\n return out;\n }",
"class_method_signature": "RectL.getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"constructor": false,
"full_signature": "public static RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"identifier": "getBounds",
"invocations": [
"cos",
"sin",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY",
"getRotatedX",
"getRotatedY"
],
"modifiers": "public static",
"parameters": "(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"return": "RectL",
"signature": "RectL getBounds(final RectL pIn,\n final long pCenterX, final long pCenterY, final double pDegrees,\n final RectL pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_43 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetCenterLongitude() {\n assertEquals(1.5, BoundingBox.getCenterLongitude(1, 2), TOLERANCE);\n assertEquals(-178.5, BoundingBox.getCenterLongitude(2, 1), TOLERANCE);\n }",
"class_method_signature": "BoundingBoxTest.testGetCenterLongitude()",
"constructor": false,
"full_signature": "@Test public void testGetCenterLongitude()",
"identifier": "testGetCenterLongitude",
"invocations": [
"assertEquals",
"getCenterLongitude",
"assertEquals",
"getCenterLongitude"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetCenterLongitude()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double getCenterLongitude() {\n\t\treturn getCenterLongitude(mLonWest, mLonEast);\n\t}",
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"invocations": [
"getCenterLongitude"
],
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_14 | {
"fields": [
{
"declarator": "mDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double mDelta = 1E-10;",
"type": "double",
"var_name": "mDelta"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/DistanceTest.java",
"identifier": "DistanceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_getSquareDistanceToSegment() {\n\t\tfinal int xA = 100;\n\t\tfinal int yA = 200;\n\t\tAssert.assertEquals(0,\n\t\t\t\tDistance.getSquaredDistanceToSegment(xA, yA, xA, yA, xA, yA), mDelta);\n\t\tAssert.assertEquals(10 * 10,\n\t\t\t\tDistance.getSquaredDistanceToSegment(xA, yA, xA + 10, yA, xA + 10, yA), mDelta);\n\t\tAssert.assertEquals(20 * 20,\n\t\t\t\tDistance.getSquaredDistanceToSegment(xA, yA, xA, yA + 20, xA, yA + 20), mDelta);\n\t\tAssert.assertEquals(20 * 20,\n\t\t\t\tDistance.getSquaredDistanceToSegment(xA, yA + 20, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(10 * 10 + 30 * 30,\n\t\t\t\tDistance.getSquaredDistanceToSegment(xA - 10, yA - 30, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(100 * 100 + 70 * 70,\n\t\t\t\tDistance.getSquaredDistanceToSegment(xA + 200, yA - 70, xA, yA, xA + 100, yA), mDelta);\n\t\tAssert.assertEquals(7000 * 7000,\n\t\t\t\tDistance.getSquaredDistanceToSegment(xA + 200, yA - 7000, xA, yA, xA + 200, yA), mDelta);\n\t\tAssert.assertEquals(7000 * 7000,\n\t\t\t\tDistance.getSquaredDistanceToSegment(xA + 200, yA - 7000, xA, yA, xA + 1000, yA), mDelta);\n\t}",
"class_method_signature": "DistanceTest.test_getSquareDistanceToSegment()",
"constructor": false,
"full_signature": "@Test public void test_getSquareDistanceToSegment()",
"identifier": "test_getSquareDistanceToSegment",
"invocations": [
"assertEquals",
"getSquaredDistanceToSegment",
"assertEquals",
"getSquaredDistanceToSegment",
"assertEquals",
"getSquaredDistanceToSegment",
"assertEquals",
"getSquaredDistanceToSegment",
"assertEquals",
"getSquaredDistanceToSegment",
"assertEquals",
"getSquaredDistanceToSegment",
"assertEquals",
"getSquaredDistanceToSegment",
"assertEquals",
"getSquaredDistanceToSegment"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_getSquareDistanceToSegment()",
"testcase": true
} | {
"fields": [],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/Distance.java",
"identifier": "Distance",
"interfaces": "",
"methods": [
{
"class_method_signature": "Distance.getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"identifier": "getSquaredDistanceToPoint",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"return": "double",
"signature": "double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToLine",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToSegment",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"identifier": "getSquaredDistanceToProjection",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"return": "double",
"signature": "double getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToLine",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToSegment",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"constructor": false,
"full_signature": "private static double dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"identifier": "dotProduct",
"modifiers": "private static",
"parameters": "(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"return": "double",
"signature": "double dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n ) {\n return getSquaredDistanceToProjection(pFromX, pFromY, pAX, pAY, pBX, pBY,\n getProjectionFactorToSegment(pFromX, pFromY, pAX, pAY, pBX, pBY));\n }",
"class_method_signature": "Distance.getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToSegment",
"invocations": [
"getSquaredDistanceToProjection",
"getProjectionFactorToSegment"
],
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_55 | {
"fields": [
{
"declarator": "DELTA = 1E-20",
"modifier": "private static final",
"original_string": "private static final double DELTA = 1E-20;",
"type": "double",
"var_name": "DELTA"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MyMathTest.java",
"identifier": "MyMathTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetAngleDifference() {\n Assert.assertEquals(20, MyMath.getAngleDifference(10, 30, null), DELTA);\n Assert.assertEquals(20, MyMath.getAngleDifference(10, 30, Boolean.TRUE), DELTA);\n Assert.assertEquals(-340, MyMath.getAngleDifference(10, 30, Boolean.FALSE), DELTA);\n\n Assert.assertEquals(-20, MyMath.getAngleDifference(30, 10, null), DELTA);\n Assert.assertEquals(340, MyMath.getAngleDifference(30, 10, Boolean.TRUE), DELTA);\n Assert.assertEquals(-20, MyMath.getAngleDifference(30, 10, Boolean.FALSE), DELTA);\n\n Assert.assertEquals(2, MyMath.getAngleDifference(179, -179, null), DELTA);\n Assert.assertEquals(2, MyMath.getAngleDifference(179, -179, Boolean.TRUE), DELTA);\n Assert.assertEquals(-358, MyMath.getAngleDifference(179, -179, Boolean.FALSE), DELTA);\n\n Assert.assertEquals(2, MyMath.getAngleDifference(359, 1, null), DELTA);\n Assert.assertEquals(2, MyMath.getAngleDifference(359, 1, Boolean.TRUE), DELTA);\n Assert.assertEquals(-358, MyMath.getAngleDifference(359, 1, Boolean.FALSE), DELTA);\n }",
"class_method_signature": "MyMathTest.testGetAngleDifference()",
"constructor": false,
"full_signature": "@Test public void testGetAngleDifference()",
"identifier": "testGetAngleDifference",
"invocations": [
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference",
"assertEquals",
"getAngleDifference"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetAngleDifference()",
"testcase": true
} | {
"fields": [],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MyMath.java",
"identifier": "MyMath",
"interfaces": "implements MathConstants",
"methods": [
{
"class_method_signature": "MyMath.MyMath()",
"constructor": true,
"full_signature": "private MyMath()",
"identifier": "MyMath",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " MyMath()",
"testcase": false
},
{
"class_method_signature": "MyMath.gudermannInverse(final double aLatitude)",
"constructor": false,
"full_signature": "public static double gudermannInverse(final double aLatitude)",
"identifier": "gudermannInverse",
"modifiers": "public static",
"parameters": "(final double aLatitude)",
"return": "double",
"signature": "double gudermannInverse(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "MyMath.gudermann(final double y)",
"constructor": false,
"full_signature": "public static double gudermann(final double y)",
"identifier": "gudermann",
"modifiers": "public static",
"parameters": "(final double y)",
"return": "double",
"signature": "double gudermann(final double y)",
"testcase": false
},
{
"class_method_signature": "MyMath.mod(int number, final int modulus)",
"constructor": false,
"full_signature": "public static int mod(int number, final int modulus)",
"identifier": "mod",
"modifiers": "public static",
"parameters": "(int number, final int modulus)",
"return": "int",
"signature": "int mod(int number, final int modulus)",
"testcase": false
},
{
"class_method_signature": "MyMath.floorToLong(final double pValue)",
"constructor": false,
"full_signature": "public static long floorToLong(final double pValue)",
"identifier": "floorToLong",
"modifiers": "public static",
"parameters": "(final double pValue)",
"return": "long",
"signature": "long floorToLong(final double pValue)",
"testcase": false
},
{
"class_method_signature": "MyMath.floorToInt(final double pValue)",
"constructor": false,
"full_signature": "public static int floorToInt(final double pValue)",
"identifier": "floorToInt",
"modifiers": "public static",
"parameters": "(final double pValue)",
"return": "int",
"signature": "int floorToInt(final double pValue)",
"testcase": false
},
{
"class_method_signature": "MyMath.getNextSquareNumberAbove(final float factor)",
"constructor": false,
"full_signature": "public static int getNextSquareNumberAbove(final float factor)",
"identifier": "getNextSquareNumberAbove",
"modifiers": "public static",
"parameters": "(final float factor)",
"return": "int",
"signature": "int getNextSquareNumberAbove(final float factor)",
"testcase": false
},
{
"class_method_signature": "MyMath.getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"constructor": false,
"full_signature": "public static double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"identifier": "getAngleDifference",
"modifiers": "public static",
"parameters": "(double pStart, double pEnd, final Boolean pClockwise)",
"return": "double",
"signature": "double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"testcase": false
},
{
"class_method_signature": "MyMath.cleanPositiveAngle(double pAngle)",
"constructor": false,
"full_signature": "public static double cleanPositiveAngle(double pAngle)",
"identifier": "cleanPositiveAngle",
"modifiers": "public static",
"parameters": "(double pAngle)",
"return": "double",
"signature": "double cleanPositiveAngle(double pAngle)",
"testcase": false
},
{
"class_method_signature": "MyMath.computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"constructor": false,
"full_signature": "public static double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"identifier": "computeAngle",
"modifiers": "public static",
"parameters": "(final long pX1, final long pY1, final long pX2, final long pY2)",
"return": "double",
"signature": "double computeAngle(final long pX1, final long pY1, final long pX2, final long pY2)",
"testcase": false
},
{
"class_method_signature": "MyMath.computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"constructor": false,
"full_signature": "public static void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"identifier": "computeCirclePoint",
"modifiers": "public static",
"parameters": "(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"return": "void",
"signature": "void computeCirclePoint(final long pCenterX, final long pCenterY, final double pRadius,\n\t\t\t\t\t\t\t\t\t\t final double pAngle, final PointL pOutput)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise) {\n\t\tfinal double difference = cleanPositiveAngle(pEnd - pStart);\n\t\tif (pClockwise != null) {\n\t\t\tif (pClockwise) {\n\t\t\t\treturn difference;\n\t\t\t} else {\n\t\t\t\treturn difference - 360;\n\t\t\t}\n\t\t}\n\t\tif (difference < 180) {\n\t\t\treturn difference;\n\t\t}\n\t\treturn difference - 360;\n\t}",
"class_method_signature": "MyMath.getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"constructor": false,
"full_signature": "public static double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"identifier": "getAngleDifference",
"invocations": [
"cleanPositiveAngle"
],
"modifiers": "public static",
"parameters": "(double pStart, double pEnd, final Boolean pClockwise)",
"return": "double",
"signature": "double getAngleDifference(double pStart, double pEnd, final Boolean pClockwise)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_38 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_toFromDoubleString_withoutAltitude() {\n\t\tfinal GeoPoint in = new GeoPoint(-117.123, 33.123);\n\t\tfinal GeoPoint out = GeoPoint.fromDoubleString(\"-117.123,33.123\", ',');\n\t\tassertEquals(\"toFromString without altitude\", in, out);\n\t}",
"class_method_signature": "GeoPointTest.test_toFromDoubleString_withoutAltitude()",
"constructor": false,
"full_signature": "@Test public void test_toFromDoubleString_withoutAltitude()",
"identifier": "test_toFromDoubleString_withoutAltitude",
"invocations": [
"fromDoubleString",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_toFromDoubleString_withoutAltitude()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static GeoPoint fromDoubleString(final String s, final char spacer) {\n\t\tfinal int spacerPos1 = s.indexOf(spacer);\n\t\tfinal int spacerPos2 = s.indexOf(spacer, spacerPos1 + 1);\n\n\t\tif (spacerPos2 == -1) {\n\t\t\treturn new GeoPoint(\n\t\t\t\t\t (Double.parseDouble(s.substring(0, spacerPos1))),\n\t\t\t\t\t (Double.parseDouble(s.substring(spacerPos1 + 1, s.length()))));\n\t\t} else {\n\t\t\treturn new GeoPoint(\n\t\t\t\t\t (Double.parseDouble(s.substring(0, spacerPos1))),\n\t\t\t\t\t (Double.parseDouble(s.substring(spacerPos1 + 1, spacerPos2))),\n\t\t\t\t\t Double.parseDouble(s.substring(spacerPos2 + 1, s.length())));\n\t\t}\n\t}",
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"invocations": [
"indexOf",
"indexOf",
"parseDouble",
"substring",
"parseDouble",
"substring",
"length",
"parseDouble",
"substring",
"parseDouble",
"substring",
"parseDouble",
"substring",
"length"
],
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_5 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "XY01Delta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double XY01Delta = 1E-10;",
"type": "double",
"var_name": "XY01Delta"
},
{
"declarator": "latLongDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double latLongDelta = 1E-10;",
"type": "double",
"var_name": "latLongDelta"
},
{
"declarator": "mMinZoomLevel = 0",
"modifier": "private static final",
"original_string": "private static final int mMinZoomLevel = 0;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel = TileSystem.getMaximumZoomLevel()",
"modifier": "private static final",
"original_string": "private static final int mMaxZoomLevel = TileSystem.getMaximumZoomLevel();",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/TileSystemTest.java",
"identifier": "TileSystemTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test_MapSize() {\n for (int zoomLevel = mMinZoomLevel ; zoomLevel <= mMaxZoomLevel ; zoomLevel ++) {\n Assert.assertEquals(256L << zoomLevel, (long)TileSystem.MapSize((double)zoomLevel));\n }\n }",
"class_method_signature": "TileSystemTest.test_MapSize()",
"constructor": false,
"full_signature": "@Test public void test_MapSize()",
"identifier": "test_MapSize",
"invocations": [
"assertEquals",
"MapSize"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_MapSize()",
"testcase": true
} | {
"fields": [
{
"declarator": "EarthRadius = GeoConstants.RADIUS_EARTH_METERS",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double EarthRadius = GeoConstants.RADIUS_EARTH_METERS;",
"type": "double",
"var_name": "EarthRadius"
},
{
"declarator": "MinLatitude = -85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLatitude = -85.05112877980659;",
"type": "double",
"var_name": "MinLatitude"
},
{
"declarator": "MaxLatitude = 85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLatitude = 85.05112877980659;",
"type": "double",
"var_name": "MaxLatitude"
},
{
"declarator": "MinLongitude = -180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLongitude = -180d;",
"type": "double",
"var_name": "MinLongitude"
},
{
"declarator": "MaxLongitude = 180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLongitude = 180d;",
"type": "double",
"var_name": "MaxLongitude"
},
{
"declarator": "mTileSize = 256",
"modifier": "private static",
"original_string": "private static int mTileSize = 256;",
"type": "int",
"var_name": "mTileSize"
},
{
"declarator": "primaryKeyMaxZoomLevel = 29",
"modifier": "public static final",
"original_string": "public static final int primaryKeyMaxZoomLevel = 29;",
"type": "int",
"var_name": "primaryKeyMaxZoomLevel"
},
{
"declarator": "projectionZoomLevel = primaryKeyMaxZoomLevel + 1",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final int projectionZoomLevel = primaryKeyMaxZoomLevel + 1;",
"type": "int",
"var_name": "projectionZoomLevel"
},
{
"declarator": "mMaxZoomLevel = primaryKeyMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mMaxZoomLevel = primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java",
"identifier": "TileSystem",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSystem.setTileSize(final int tileSize)",
"constructor": false,
"full_signature": "public static void setTileSize(final int tileSize)",
"identifier": "setTileSize",
"modifiers": "public static",
"parameters": "(final int tileSize)",
"return": "void",
"signature": "void setTileSize(final int tileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize()",
"constructor": false,
"full_signature": "public static int getTileSize()",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getTileSize()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaximumZoomLevel()",
"constructor": false,
"full_signature": "public static int getMaximumZoomLevel()",
"identifier": "getMaximumZoomLevel",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getMaximumZoomLevel()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getTileSize(final double pZoomLevel)",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getTileSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getInputTileZoomLevel(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static int getInputTileZoomLevel(final double pZoomLevel)",
"identifier": "getInputTileZoomLevel",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "int",
"signature": "int getInputTileZoomLevel(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double MapSize(final double pZoomLevel)",
"identifier": "MapSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double MapSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getFactor(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getFactor(final double pZoomLevel)",
"identifier": "getFactor",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getFactor(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final double zoomLevel)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final double zoomLevel)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final double zoomLevel)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final double zoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolutionMapSize(double latitude, final double mapSize)",
"constructor": false,
"full_signature": "public static double GroundResolutionMapSize(double latitude, final double mapSize)",
"identifier": "GroundResolutionMapSize",
"modifiers": "public static",
"parameters": "(double latitude, final double mapSize)",
"return": "double",
"signature": "double GroundResolutionMapSize(double latitude, final double mapSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"return": "Point",
"signature": "Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"identifier": "LatLongToPixelXYMapSize",
"modifiers": "@Deprecated public",
"parameters": "(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongWithoutWrap",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude)",
"constructor": false,
"full_signature": "abstract public double getX01FromLongitude(double longitude)",
"identifier": "getX01FromLongitude",
"modifiers": "abstract public",
"parameters": "(double longitude)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "abstract public double getY01FromLatitude(final double pLatitude)",
"identifier": "getY01FromLatitude",
"modifiers": "abstract public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double getY01FromLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"identifier": "PixelXYToLatLongMapSize",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongMapSizeWithoutWrap",
"modifiers": "public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final double n, final double minValue, final double maxValue)",
"constructor": false,
"full_signature": "public static double Clip(final double n, final double minValue, final double maxValue)",
"identifier": "Clip",
"modifiers": "public static",
"parameters": "(final double n, final double minValue, final double maxValue)",
"return": "double",
"signature": "double Clip(final double n, final double minValue, final double maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY, final Point reuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final Rect rect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int tileX, final int tileY, final Point reuse)",
"return": "Point",
"signature": "Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"return": "PointL",
"signature": "PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"identifier": "TileXYToQuadKey",
"modifiers": "public static",
"parameters": "(final int tileX, final int tileY, final int levelOfDetail)",
"return": "String",
"signature": "String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.QuadKeyToTileXY(final String quadKey, final Point reuse)",
"constructor": false,
"full_signature": "public static Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"identifier": "QuadKeyToTileXY",
"modifiers": "public static",
"parameters": "(final String quadKey, final Point reuse)",
"return": "Point",
"signature": "Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"constructor": false,
"full_signature": "public double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"identifier": "getLongitudeZoom",
"modifiers": "public",
"parameters": "(final double pEast, final double pWest, final int pScreenWidth)",
"return": "double",
"signature": "double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"identifier": "getLatitudeZoom",
"modifiers": "public",
"parameters": "(final double pNorth, final double pSouth, final int pScreenHeight)",
"return": "double",
"signature": "double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.wrap(double n, final double minValue, final double maxValue, final double interval)",
"constructor": false,
"full_signature": "private static double wrap(double n, final double minValue, final double maxValue, final double interval)",
"identifier": "wrap",
"modifiers": "private static",
"parameters": "(double n, final double minValue, final double maxValue, final double interval)",
"return": "double",
"signature": "double wrap(double n, final double minValue, final double maxValue, final double interval)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorFromXY01",
"modifiers": "public",
"parameters": "(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01)",
"constructor": false,
"full_signature": "abstract public double getLatitudeFromY01(final double pY01)",
"identifier": "getLatitudeFromY01",
"modifiers": "abstract public",
"parameters": "(final double pY01)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01)",
"constructor": false,
"full_signature": "abstract public double getLongitudeFromX01(final double pX01)",
"identifier": "getLongitudeFromX01",
"modifiers": "abstract public",
"parameters": "(final double pX01)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"identifier": "getCleanMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"constructor": false,
"full_signature": "public static long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"identifier": "ClipToLong",
"modifiers": "public static",
"parameters": "(final double pValue, final double pMax, final boolean pWrapEnabled)",
"return": "long",
"signature": "long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final long n, final long minValue, final long maxValue)",
"constructor": false,
"full_signature": "@Deprecated public static long Clip(final long n, final long minValue, final long maxValue)",
"identifier": "Clip",
"modifiers": "@Deprecated public static",
"parameters": "(final long n, final long minValue, final long maxValue)",
"return": "long",
"signature": "long Clip(final long n, final long minValue, final long maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.truncateToInt(final long value)",
"constructor": false,
"full_signature": "public static int truncateToInt(final long value)",
"identifier": "truncateToInt",
"modifiers": "public static",
"parameters": "(final long value)",
"return": "int",
"signature": "int truncateToInt(final long value)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"identifier": "getMercatorFromGeo",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"return": "PointL",
"signature": "PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "public GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"identifier": "getGeoFromMercator",
"modifiers": "public",
"parameters": "(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"identifier": "getXY01FromMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"return": "double",
"signature": "double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLongitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLongitude(final double pRandom01)",
"identifier": "getRandomLongitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLongitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01, final double pMinLatitude)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final long pMercator, final double pTileSize)",
"constructor": false,
"full_signature": "public static int getTileFromMercator(final long pMercator, final double pTileSize)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final long pMercator, final double pTileSize)",
"return": "int",
"signature": "int getTileFromMercator(final long pMercator, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromTile(final int pTile, final double pTileSize)",
"constructor": false,
"full_signature": "public static long getMercatorFromTile(final int pTile, final double pTileSize)",
"identifier": "getMercatorFromTile",
"modifiers": "public static",
"parameters": "(final int pTile, final double pTileSize)",
"return": "long",
"signature": "long getMercatorFromTile(final int pTile, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLatitude()",
"constructor": false,
"full_signature": "abstract public double getMinLatitude()",
"identifier": "getMinLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLatitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLatitude()",
"identifier": "getMaxLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLongitude()",
"constructor": false,
"full_signature": "abstract public double getMinLongitude()",
"identifier": "getMinLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLongitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLongitude()",
"identifier": "getMaxLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public double cleanLongitude(final double pLongitude)",
"identifier": "cleanLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "double",
"signature": "double cleanLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public double cleanLatitude(final double pLatitude)",
"identifier": "cleanLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double cleanLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public boolean isValidLongitude(final double pLongitude)",
"identifier": "isValidLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "boolean",
"signature": "boolean isValidLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public boolean isValidLatitude(final double pLatitude)",
"identifier": "isValidLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "boolean",
"signature": "boolean isValidLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLongitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLongitudeSpan()",
"identifier": "toStringLongitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLatitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLatitudeSpan()",
"identifier": "toStringLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileXFromLongitude(final double pLongitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"identifier": "getTileXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final int pZoom)",
"return": "int",
"signature": "int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileYFromLatitude(final double pLatitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"identifier": "getTileYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final int pZoom)",
"return": "int",
"signature": "int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromTileY(final int pY, final int pZoom)",
"constructor": false,
"full_signature": "public double getLatitudeFromTileY(final int pY, final int pZoom)",
"identifier": "getLatitudeFromTileY",
"modifiers": "public",
"parameters": "(final int pY, final int pZoom)",
"return": "double",
"signature": "double getLatitudeFromTileY(final int pY, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromTileX(final int pX, final int pZoom)",
"constructor": false,
"full_signature": "public double getLongitudeFromTileX(final int pX, final int pZoom)",
"identifier": "getLongitudeFromTileX",
"modifiers": "public",
"parameters": "(final int pX, final int pZoom)",
"return": "double",
"signature": "double getLongitudeFromTileX(final int pX, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.clipTile(final int pTile, final int pZoom)",
"constructor": false,
"full_signature": "private int clipTile(final int pTile, final int pZoom)",
"identifier": "clipTile",
"modifiers": "private",
"parameters": "(final int pTile, final int pZoom)",
"return": "int",
"signature": "int clipTile(final int pTile, final int pZoom)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Deprecated\n\tpublic static int MapSize(final int levelOfDetail) {\n\t\treturn (int)Math.round(MapSize((double)levelOfDetail));\n\t}",
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"invocations": [
"round",
"MapSize"
],
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_18 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private",
"original_string": "private Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileAreaTest.java",
"identifier": "MapTileAreaTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetAll() {\n final MapTileArea area = new MapTileArea();\n int zoom;\n\n zoom = 0;\n area.set(zoom, -10, -100, 50, 90);\n checkAll(zoom, area);\n\n zoom = 1;\n area.set(zoom, -10, -100, 50, 90);\n checkAll(zoom, area);\n\n zoom = 2;\n area.set(zoom, -10, -100, 50, 90);\n checkAll(zoom, area);\n }",
"class_method_signature": "MapTileAreaTest.testSetAll()",
"constructor": false,
"full_signature": "@Test public void testSetAll()",
"identifier": "testSetAll",
"invocations": [
"set",
"checkAll",
"set",
"checkAll",
"set",
"checkAll"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testSetAll()",
"testcase": true
} | {
"fields": [
{
"declarator": "mZoom",
"modifier": "private",
"original_string": "private int mZoom;",
"type": "int",
"var_name": "mZoom"
},
{
"declarator": "mLeft",
"modifier": "private",
"original_string": "private int mLeft;",
"type": "int",
"var_name": "mLeft"
},
{
"declarator": "mTop",
"modifier": "private",
"original_string": "private int mTop;",
"type": "int",
"var_name": "mTop"
},
{
"declarator": "mWidth",
"modifier": "private",
"original_string": "private int mWidth;",
"type": "int",
"var_name": "mWidth"
},
{
"declarator": "mHeight",
"modifier": "private",
"original_string": "private int mHeight;",
"type": "int",
"var_name": "mHeight"
},
{
"declarator": "mMapTileUpperBound",
"modifier": "private",
"original_string": "private int mMapTileUpperBound;",
"type": "int",
"var_name": "mMapTileUpperBound"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileArea.java",
"identifier": "MapTileArea",
"interfaces": "implements MapTileContainer, IterableWithSize<Long>",
"methods": [
{
"class_method_signature": "MapTileArea.set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.set(final int pZoom, final Rect pRect)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final Rect pRect)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final int pZoom, final Rect pRect)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final Rect pRect)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.set(final MapTileArea pArea)",
"constructor": false,
"full_signature": "public MapTileArea set(final MapTileArea pArea)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final MapTileArea pArea)",
"return": "MapTileArea",
"signature": "MapTileArea set(final MapTileArea pArea)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.reset()",
"constructor": false,
"full_signature": "public MapTileArea reset()",
"identifier": "reset",
"modifiers": "public",
"parameters": "()",
"return": "MapTileArea",
"signature": "MapTileArea reset()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getZoom()",
"constructor": false,
"full_signature": "public int getZoom()",
"identifier": "getZoom",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getZoom()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getLeft()",
"constructor": false,
"full_signature": "public int getLeft()",
"identifier": "getLeft",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getLeft()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getTop()",
"constructor": false,
"full_signature": "public int getTop()",
"identifier": "getTop",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getTop()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getWidth()",
"constructor": false,
"full_signature": "public int getWidth()",
"identifier": "getWidth",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getWidth()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getHeight()",
"constructor": false,
"full_signature": "public int getHeight()",
"identifier": "getHeight",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getHeight()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getRight()",
"constructor": false,
"full_signature": "public int getRight()",
"identifier": "getRight",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getRight()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.getBottom()",
"constructor": false,
"full_signature": "public int getBottom()",
"identifier": "getBottom",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBottom()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.iterator()",
"constructor": false,
"full_signature": "@Override public Iterator<Long> iterator()",
"identifier": "iterator",
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterator<Long>",
"signature": "Iterator<Long> iterator()",
"testcase": false
},
{
"class_method_signature": "MapTileArea.contains(long pTileIndex)",
"constructor": false,
"full_signature": "@Override public boolean contains(long pTileIndex)",
"identifier": "contains",
"modifiers": "@Override public",
"parameters": "(long pTileIndex)",
"return": "boolean",
"signature": "boolean contains(long pTileIndex)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.contains(int pValue, final int pFirst, final int pSize)",
"constructor": false,
"full_signature": "private boolean contains(int pValue, final int pFirst, final int pSize)",
"identifier": "contains",
"modifiers": "private",
"parameters": "(int pValue, final int pFirst, final int pSize)",
"return": "boolean",
"signature": "boolean contains(int pValue, final int pFirst, final int pSize)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.cleanValue(int pValue)",
"constructor": false,
"full_signature": "private int cleanValue(int pValue)",
"identifier": "cleanValue",
"modifiers": "private",
"parameters": "(int pValue)",
"return": "int",
"signature": "int cleanValue(int pValue)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.computeSize(final int pTopLeft, int pBottomRight)",
"constructor": false,
"full_signature": "private int computeSize(final int pTopLeft, int pBottomRight)",
"identifier": "computeSize",
"modifiers": "private",
"parameters": "(final int pTopLeft, int pBottomRight)",
"return": "int",
"signature": "int computeSize(final int pTopLeft, int pBottomRight)",
"testcase": false
},
{
"class_method_signature": "MapTileArea.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom) {\n mZoom = pZoom;\n mMapTileUpperBound = 1 << mZoom;\n mWidth = computeSize(pLeft, pRight);\n mHeight = computeSize(pTop, pBottom);\n mLeft = cleanValue(pLeft);\n mTop = cleanValue(pTop);\n return this;\n }",
"class_method_signature": "MapTileArea.set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"constructor": false,
"full_signature": "public MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"identifier": "set",
"invocations": [
"computeSize",
"computeSize",
"cleanValue",
"cleanValue"
],
"modifiers": "public",
"parameters": "(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"return": "MapTileArea",
"signature": "MapTileArea set(final int pZoom, final int pLeft, final int pTop, final int pRight, final int pBottom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_59 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileAreaZoomComputerTest.java",
"identifier": "MapTileAreaZoomComputerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBugANRSideEffect() {\n final MapTileArea source = new MapTileArea();\n final MapTileArea dest = new MapTileArea();\n source.set(0, 0, 0, 1, 1);\n final MapTileAreaZoomComputer computer = new MapTileAreaZoomComputer(-1);\n computer.computeFromSource(source, dest);\n Assert.assertEquals(0, dest.getWidth());\n }",
"class_method_signature": "MapTileAreaZoomComputerTest.testBugANRSideEffect()",
"constructor": false,
"full_signature": "@Test public void testBugANRSideEffect()",
"identifier": "testBugANRSideEffect",
"invocations": [
"set",
"computeFromSource",
"assertEquals",
"getWidth"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testBugANRSideEffect()",
"testcase": true
} | {
"fields": [
{
"declarator": "mZoomDelta",
"modifier": "private final",
"original_string": "private final int mZoomDelta;",
"type": "int",
"var_name": "mZoomDelta"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileAreaZoomComputer.java",
"identifier": "MapTileAreaZoomComputer",
"interfaces": "implements MapTileAreaComputer",
"methods": [
{
"class_method_signature": "MapTileAreaZoomComputer.MapTileAreaZoomComputer(final int pZoomDelta)",
"constructor": true,
"full_signature": "public MapTileAreaZoomComputer(final int pZoomDelta)",
"identifier": "MapTileAreaZoomComputer",
"modifiers": "public",
"parameters": "(final int pZoomDelta)",
"return": "",
"signature": " MapTileAreaZoomComputer(final int pZoomDelta)",
"testcase": false
},
{
"class_method_signature": "MapTileAreaZoomComputer.computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"identifier": "computeFromSource",
"modifiers": "@Override public",
"parameters": "(final MapTileArea pSource, final MapTileArea pReuse)",
"return": "MapTileArea",
"signature": "MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse) {\n final MapTileArea out = pReuse != null ? pReuse : new MapTileArea();\n if (pSource.size() == 0) {\n out.reset();\n return out;\n }\n final int sourceZoom = pSource.getZoom();\n int destZoom = sourceZoom + mZoomDelta;\n if (destZoom < 0 || destZoom > MapTileIndex.mMaxZoomLevel) {\n out.reset();\n return out;\n }\n if (mZoomDelta <= 0) {\n out.set(destZoom,\n pSource.getLeft() >> -mZoomDelta, pSource.getTop() >> -mZoomDelta,\n pSource.getRight() >> -mZoomDelta, pSource.getBottom() >> -mZoomDelta);\n return out;\n }\n out.set(destZoom,\n pSource.getLeft() << mZoomDelta, pSource.getTop() << mZoomDelta,\n ((1 + pSource.getRight()) << mZoomDelta) - 1, ((1 + pSource.getBottom()) << mZoomDelta) -1\n );\n return out;\n }",
"class_method_signature": "MapTileAreaZoomComputer.computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"identifier": "computeFromSource",
"invocations": [
"size",
"reset",
"getZoom",
"reset",
"set",
"getLeft",
"getTop",
"getRight",
"getBottom",
"set",
"getLeft",
"getTop",
"getRight",
"getBottom"
],
"modifiers": "@Override public",
"parameters": "(final MapTileArea pSource, final MapTileArea pReuse)",
"return": "MapTileArea",
"signature": "MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_22 | {
"fields": [
{
"declarator": "ACTION_MILLISECONDS = 500",
"modifier": "private static final",
"original_string": "private static final long ACTION_MILLISECONDS = 500;",
"type": "long",
"var_name": "ACTION_MILLISECONDS"
},
{
"declarator": "mCount = new AtomicInteger(0)",
"modifier": "private final",
"original_string": "private final AtomicInteger mCount = new AtomicInteger(0);",
"type": "AtomicInteger",
"var_name": "mCount"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GarbageCollectorTest.java",
"identifier": "GarbageCollectorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testInit() {\n final GarbageCollector garbageCollector = new GarbageCollector(getAction());\n mCount.set(0);\n\n Assert.assertFalse(garbageCollector.isRunning());\n Assert.assertEquals(0, mCount.get());\n }",
"class_method_signature": "GarbageCollectorTest.testInit()",
"constructor": false,
"full_signature": "@Test public void testInit()",
"identifier": "testInit",
"invocations": [
"getAction",
"set",
"assertFalse",
"isRunning",
"assertEquals",
"get"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testInit()",
"testcase": true
} | {
"fields": [
{
"declarator": "mRunning = new AtomicBoolean(false)",
"modifier": "private final",
"original_string": "private final AtomicBoolean mRunning = new AtomicBoolean(false);",
"type": "AtomicBoolean",
"var_name": "mRunning"
},
{
"declarator": "mAction",
"modifier": "private final",
"original_string": "private final Runnable mAction;",
"type": "Runnable",
"var_name": "mAction"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GarbageCollector.java",
"identifier": "GarbageCollector",
"interfaces": "",
"methods": [
{
"class_method_signature": "GarbageCollector.GarbageCollector(final Runnable pAction)",
"constructor": true,
"full_signature": "public GarbageCollector(final Runnable pAction)",
"identifier": "GarbageCollector",
"modifiers": "public",
"parameters": "(final Runnable pAction)",
"return": "",
"signature": " GarbageCollector(final Runnable pAction)",
"testcase": false
},
{
"class_method_signature": "GarbageCollector.gc()",
"constructor": false,
"full_signature": "public boolean gc()",
"identifier": "gc",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean gc()",
"testcase": false
},
{
"class_method_signature": "GarbageCollector.isRunning()",
"constructor": false,
"full_signature": "public boolean isRunning()",
"identifier": "isRunning",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isRunning()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean isRunning() {\n return mRunning.get();\n }",
"class_method_signature": "GarbageCollector.isRunning()",
"constructor": false,
"full_signature": "public boolean isRunning()",
"identifier": "isRunning",
"invocations": [
"get"
],
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isRunning()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_63 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private final",
"original_string": "private final Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/tileprovider/cachemanager/CacheManagerTest.java",
"identifier": "CacheManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetTilesRectSingleTile() {\n final TileSystem tileSystem = MapView.getTileSystem();\n final BoundingBox box = new BoundingBox();\n for (int zoom = 0 ; zoom <= TileSystem.getMaximumZoomLevel() ; zoom ++) {\n final double longitude = tileSystem.getRandomLongitude(mRandom.nextDouble());\n final double latitude = tileSystem.getRandomLatitude(mRandom.nextDouble());\n box.set(latitude, longitude, latitude, longitude); // single point\n final Rect rect = CacheManager.getTilesRect(box, zoom);\n Assert.assertEquals(rect.left, rect.right); // single tile expected\n Assert.assertEquals(rect.top, rect.bottom); // single tile expected\n }\n }",
"class_method_signature": "CacheManagerTest.testGetTilesRectSingleTile()",
"constructor": false,
"full_signature": "@Test public void testGetTilesRectSingleTile()",
"identifier": "testGetTilesRectSingleTile",
"invocations": [
"getTileSystem",
"getMaximumZoomLevel",
"getRandomLongitude",
"nextDouble",
"getRandomLatitude",
"nextDouble",
"set",
"getTilesRect",
"assertEquals",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetTilesRectSingleTile()",
"testcase": true
} | {
"fields": [
{
"declarator": "mTileDownloader = new TileDownloader()",
"modifier": "private",
"original_string": "private TileDownloader mTileDownloader = new TileDownloader();",
"type": "TileDownloader",
"var_name": "mTileDownloader"
},
{
"declarator": "mTileSource",
"modifier": "protected final",
"original_string": "protected final ITileSource mTileSource;",
"type": "ITileSource",
"var_name": "mTileSource"
},
{
"declarator": "mTileWriter",
"modifier": "protected final",
"original_string": "protected final IFilesystemCache mTileWriter;",
"type": "IFilesystemCache",
"var_name": "mTileWriter"
},
{
"declarator": "mMinZoomLevel",
"modifier": "protected final",
"original_string": "protected final int mMinZoomLevel;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel",
"modifier": "protected final",
"original_string": "protected final int mMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "mPendingTasks = new HashSet<>()",
"modifier": "protected",
"original_string": "protected Set<CacheManagerTask> mPendingTasks = new HashSet<>();",
"type": "Set<CacheManagerTask>",
"var_name": "mPendingTasks"
},
{
"declarator": "verifyCancel = true",
"modifier": "protected",
"original_string": "protected boolean verifyCancel = true;",
"type": "boolean",
"var_name": "verifyCancel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/tileprovider/cachemanager/CacheManager.java",
"identifier": "CacheManager",
"interfaces": "",
"methods": [
{
"class_method_signature": "CacheManager.CacheManager(final MapView mapView)",
"constructor": true,
"full_signature": "public CacheManager(final MapView mapView)",
"identifier": "CacheManager",
"modifiers": "public",
"parameters": "(final MapView mapView)",
"return": "",
"signature": " CacheManager(final MapView mapView)",
"testcase": false
},
{
"class_method_signature": "CacheManager.CacheManager(final MapView mapView, IFilesystemCache writer)",
"constructor": true,
"full_signature": "public CacheManager(final MapView mapView, IFilesystemCache writer)",
"identifier": "CacheManager",
"modifiers": "public",
"parameters": "(final MapView mapView, IFilesystemCache writer)",
"return": "",
"signature": " CacheManager(final MapView mapView, IFilesystemCache writer)",
"testcase": false
},
{
"class_method_signature": "CacheManager.CacheManager(final MapTileProviderBase pTileProvider,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"constructor": true,
"full_signature": "public CacheManager(final MapTileProviderBase pTileProvider,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"identifier": "CacheManager",
"modifiers": "public",
"parameters": "(final MapTileProviderBase pTileProvider,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"return": "",
"signature": " CacheManager(final MapTileProviderBase pTileProvider,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.CacheManager(final ITileSource pTileSource,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"constructor": true,
"full_signature": "public CacheManager(final ITileSource pTileSource,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"identifier": "CacheManager",
"modifiers": "public",
"parameters": "(final ITileSource pTileSource,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"return": "",
"signature": " CacheManager(final ITileSource pTileSource,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getPendingJobs()",
"constructor": false,
"full_signature": "public int getPendingJobs()",
"identifier": "getPendingJobs",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getPendingJobs()",
"testcase": false
},
{
"class_method_signature": "CacheManager.getMapTileFromCoordinates(final double aLat, final double aLon, final int zoom)",
"constructor": false,
"full_signature": "@Deprecated public static Point getMapTileFromCoordinates(final double aLat, final double aLon, final int zoom)",
"identifier": "getMapTileFromCoordinates",
"modifiers": "@Deprecated public static",
"parameters": "(final double aLat, final double aLon, final int zoom)",
"return": "Point",
"signature": "Point getMapTileFromCoordinates(final double aLat, final double aLon, final int zoom)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getCoordinatesFromMapTile(final int x, final int y, final int zoom)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint getCoordinatesFromMapTile(final int x, final int y, final int zoom)",
"identifier": "getCoordinatesFromMapTile",
"modifiers": "@Deprecated public static",
"parameters": "(final int x, final int y, final int zoom)",
"return": "GeoPoint",
"signature": "GeoPoint getCoordinatesFromMapTile(final int x, final int y, final int zoom)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getFileName(ITileSource tileSource, final long pMapTileIndex)",
"constructor": false,
"full_signature": "public static File getFileName(ITileSource tileSource, final long pMapTileIndex)",
"identifier": "getFileName",
"modifiers": "public static",
"parameters": "(ITileSource tileSource, final long pMapTileIndex)",
"return": "File",
"signature": "File getFileName(ITileSource tileSource, final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.loadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean loadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"identifier": "loadTile",
"modifiers": "public",
"parameters": "(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean loadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.forceLoadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean forceLoadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"identifier": "forceLoadTile",
"modifiers": "public",
"parameters": "(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean forceLoadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.deleteTile(final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean deleteTile(final long pMapTileIndex)",
"identifier": "deleteTile",
"modifiers": "public",
"parameters": "(final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean deleteTile(final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.checkTile(final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean checkTile(final long pMapTileIndex)",
"identifier": "checkTile",
"modifiers": "public",
"parameters": "(final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean checkTile(final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.isTileToBeDownloaded(final ITileSource pTileSource, final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean isTileToBeDownloaded(final ITileSource pTileSource, final long pMapTileIndex)",
"identifier": "isTileToBeDownloaded",
"modifiers": "public",
"parameters": "(final ITileSource pTileSource, final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean isTileToBeDownloaded(final ITileSource pTileSource, final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverage(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "public static List<Long> getTilesCoverage(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"identifier": "getTilesCoverage",
"modifiers": "public static",
"parameters": "(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"return": "List<Long>",
"signature": "List<Long> getTilesCoverage(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverage(final BoundingBox pBB, final int pZoomLevel)",
"constructor": false,
"full_signature": "public static Collection<Long> getTilesCoverage(final BoundingBox pBB, final int pZoomLevel)",
"identifier": "getTilesCoverage",
"modifiers": "public static",
"parameters": "(final BoundingBox pBB, final int pZoomLevel)",
"return": "Collection<Long>",
"signature": "Collection<Long> getTilesCoverage(final BoundingBox pBB, final int pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverageIterable(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "static IterableWithSize<Long> getTilesCoverageIterable(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"identifier": "getTilesCoverageIterable",
"modifiers": "static",
"parameters": "(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"return": "IterableWithSize<Long>",
"signature": "IterableWithSize<Long> getTilesCoverageIterable(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"constructor": false,
"full_signature": "public static Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"identifier": "getTilesRect",
"modifiers": "public static",
"parameters": "(final BoundingBox pBB,\n final int pZoomLevel)",
"return": "Rect",
"signature": "Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "public static List<Long> getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"identifier": "getTilesCoverage",
"modifiers": "public static",
"parameters": "(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"return": "List<Long>",
"signature": "List<Long> getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomLevel)",
"constructor": false,
"full_signature": "public static Collection<Long> getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomLevel)",
"identifier": "getTilesCoverage",
"modifiers": "public static",
"parameters": "(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomLevel)",
"return": "Collection<Long>",
"signature": "Collection<Long> getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.possibleTilesInArea(final BoundingBox pBB, final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "public int possibleTilesInArea(final BoundingBox pBB, final int pZoomMin, final int pZoomMax)",
"identifier": "possibleTilesInArea",
"modifiers": "public",
"parameters": "(final BoundingBox pBB, final int pZoomMin, final int pZoomMax)",
"return": "int",
"signature": "int possibleTilesInArea(final BoundingBox pBB, final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.possibleTilesCovered(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "public int possibleTilesCovered(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"identifier": "possibleTilesCovered",
"modifiers": "public",
"parameters": "(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"return": "int",
"signature": "int possibleTilesCovered(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.execute(final CacheManagerTask pTask)",
"constructor": false,
"full_signature": "public CacheManagerTask execute(final CacheManagerTask pTask)",
"identifier": "execute",
"modifiers": "public",
"parameters": "(final CacheManagerTask pTask)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask execute(final CacheManagerTask pTask)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsyncNoUI(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsyncNoUI(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"identifier": "downloadAreaAsyncNoUI",
"modifiers": "public",
"parameters": "(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsyncNoUI(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsyncNoUI(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsyncNoUI(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"identifier": "downloadAreaAsyncNoUI",
"modifiers": "public",
"parameters": "(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsyncNoUI(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"testcase": false
},
{
"class_method_signature": "CacheManager.cancelAllJobs()",
"constructor": false,
"full_signature": "public void cancelAllJobs()",
"identifier": "cancelAllJobs",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void cancelAllJobs()",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, List<Long> pTiles, final int zoomMin, final int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, List<Long> pTiles, final int zoomMin, final int zoomMax)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, List<Long> pTiles, final int zoomMin, final int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, List<Long> pTiles, final int zoomMin, final int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.setVerifyCancel(boolean state)",
"constructor": false,
"full_signature": "public void setVerifyCancel(boolean state)",
"identifier": "setVerifyCancel",
"modifiers": "public",
"parameters": "(boolean state)",
"return": "void",
"signature": "void setVerifyCancel(boolean state)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getVerifyCancel()",
"constructor": false,
"full_signature": "public boolean getVerifyCancel()",
"identifier": "getVerifyCancel",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean getVerifyCancel()",
"testcase": false
},
{
"class_method_signature": "CacheManager.getDownloadingDialog(final Context pCtx, final CacheManagerTask pTask)",
"constructor": false,
"full_signature": "public CacheManagerDialog getDownloadingDialog(final Context pCtx, final CacheManagerTask pTask)",
"identifier": "getDownloadingDialog",
"modifiers": "public",
"parameters": "(final Context pCtx, final CacheManagerTask pTask)",
"return": "CacheManagerDialog",
"signature": "CacheManagerDialog getDownloadingDialog(final Context pCtx, final CacheManagerTask pTask)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getCleaningDialog(final Context pCtx, final CacheManagerTask pTask)",
"constructor": false,
"full_signature": "public CacheManagerDialog getCleaningDialog(final Context pCtx, final CacheManagerTask pTask)",
"identifier": "getCleaningDialog",
"modifiers": "public",
"parameters": "(final Context pCtx, final CacheManagerTask pTask)",
"return": "CacheManagerDialog",
"signature": "CacheManagerDialog getCleaningDialog(final Context pCtx, final CacheManagerTask pTask)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getDownloadingAction()",
"constructor": false,
"full_signature": "public CacheManagerAction getDownloadingAction()",
"identifier": "getDownloadingAction",
"modifiers": "public",
"parameters": "()",
"return": "CacheManagerAction",
"signature": "CacheManagerAction getDownloadingAction()",
"testcase": false
},
{
"class_method_signature": "CacheManager.getCleaningAction()",
"constructor": false,
"full_signature": "public CacheManagerAction getCleaningAction()",
"identifier": "getCleaningAction",
"modifiers": "public",
"parameters": "()",
"return": "CacheManagerAction",
"signature": "CacheManagerAction getCleaningAction()",
"testcase": false
},
{
"class_method_signature": "CacheManager.cleanAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask cleanAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)",
"identifier": "cleanAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask cleanAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.cleanAreaAsync(final Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask cleanAreaAsync(final Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)",
"identifier": "cleanAreaAsync",
"modifiers": "public",
"parameters": "(final Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask cleanAreaAsync(final Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.cleanAreaAsync(Context ctx, List<Long> tiles, int zoomMin, int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask cleanAreaAsync(Context ctx, List<Long> tiles, int zoomMin, int zoomMax)",
"identifier": "cleanAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, List<Long> tiles, int zoomMin, int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask cleanAreaAsync(Context ctx, List<Long> tiles, int zoomMin, int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel)",
"constructor": false,
"full_signature": "public BoundingBox extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel)",
"identifier": "extendedBoundsFromGeoPoints",
"modifiers": "public",
"parameters": "(ArrayList<GeoPoint> geoPoints, int minZoomLevel)",
"return": "BoundingBox",
"signature": "BoundingBox extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.currentCacheUsage()",
"constructor": false,
"full_signature": "public long currentCacheUsage()",
"identifier": "currentCacheUsage",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long currentCacheUsage()",
"testcase": false
},
{
"class_method_signature": "CacheManager.cacheCapacity()",
"constructor": false,
"full_signature": "public long cacheCapacity()",
"identifier": "cacheCapacity",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long cacheCapacity()",
"testcase": false
},
{
"class_method_signature": "CacheManager.directorySize(final File pDirectory)",
"constructor": false,
"full_signature": "public long directorySize(final File pDirectory)",
"identifier": "directorySize",
"modifiers": "public",
"parameters": "(final File pDirectory)",
"return": "long",
"signature": "long directorySize(final File pDirectory)",
"testcase": false
},
{
"class_method_signature": "CacheManager.setTileDownloader(final TileDownloader pTileDownloader)",
"constructor": false,
"full_signature": "public void setTileDownloader(final TileDownloader pTileDownloader)",
"identifier": "setTileDownloader",
"modifiers": "public",
"parameters": "(final TileDownloader pTileDownloader)",
"return": "void",
"signature": "void setTileDownloader(final TileDownloader pTileDownloader)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel){\n final int mapTileUpperBound = 1 << pZoomLevel;\n final int right = MapView.getTileSystem().getTileXFromLongitude(pBB.getLonEast(), pZoomLevel);\n final int bottom = MapView.getTileSystem().getTileYFromLatitude(pBB.getLatSouth(), pZoomLevel);\n final int left = MapView.getTileSystem().getTileXFromLongitude(pBB.getLonWest(), pZoomLevel);\n final int top = MapView.getTileSystem().getTileYFromLatitude(pBB.getLatNorth(), pZoomLevel);\n int width = right - left + 1; // handling the modulo\n if (width <= 0) {\n width += mapTileUpperBound;\n }\n int height = bottom - top + 1; // handling the modulo\n if (height <= 0) {\n height += mapTileUpperBound;\n }\n return new Rect(left, top, left + width - 1, top + height - 1);\n }",
"class_method_signature": "CacheManager.getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"constructor": false,
"full_signature": "public static Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"identifier": "getTilesRect",
"invocations": [
"getTileXFromLongitude",
"getTileSystem",
"getLonEast",
"getTileYFromLatitude",
"getTileSystem",
"getLatSouth",
"getTileXFromLongitude",
"getTileSystem",
"getLonWest",
"getTileYFromLatitude",
"getTileSystem",
"getLatNorth"
],
"modifiers": "public static",
"parameters": "(final BoundingBox pBB,\n final int pZoomLevel)",
"return": "Rect",
"signature": "Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_34 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_bearingTo_west() {\n\t\tfinal GeoPoint target = new GeoPoint(0.0, 0.0);\n\t\tfinal GeoPoint other = new GeoPoint(0.0, -10.0);\n\t\tassertEquals(\"directly west\", 270, Math.round(target.bearingTo(other)));\n\t}",
"class_method_signature": "GeoPointTest.test_bearingTo_west()",
"constructor": false,
"full_signature": "@Test public void test_bearingTo_west()",
"identifier": "test_bearingTo_west",
"invocations": [
"assertEquals",
"round",
"bearingTo"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_bearingTo_west()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double bearingTo(final IGeoPoint other) {\n\t\tfinal double lat1 = Math.toRadians(this.mLatitude);\n\t\tfinal double long1 = Math.toRadians(this.mLongitude);\n\t\tfinal double lat2 = Math.toRadians(other.getLatitude());\n\t\tfinal double long2 = Math.toRadians(other.getLongitude());\n\t\tfinal double delta_long = long2 - long1;\n\t\tfinal double a = Math.sin(delta_long) * Math.cos(lat2);\n\t\tfinal double b = Math.cos(lat1) * Math.sin(lat2) -\n\t\t\t\t\t\t Math.sin(lat1) * Math.cos(lat2) * Math.cos(delta_long);\n\t\tfinal double bearing = Math.toDegrees(Math.atan2(a, b));\n\t\tfinal double bearing_normalized = (bearing + 360) % 360;\n\t\treturn bearing_normalized;\n\t}",
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"invocations": [
"toRadians",
"toRadians",
"toRadians",
"getLatitude",
"toRadians",
"getLongitude",
"sin",
"cos",
"cos",
"sin",
"sin",
"cos",
"cos",
"toDegrees",
"atan2"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_9 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileAreaBorderComputerTest.java",
"identifier": "MapTileAreaBorderComputerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTwoContiguousPointsModulo() {\n final MapTileArea source = new MapTileArea();\n final MapTileArea dest = new MapTileArea();\n final Set<Long> set = new HashSet<>();\n final int border = 2;\n final MapTileAreaBorderComputer computer = new MapTileAreaBorderComputer(border);\n final int zoom = 5;\n final int sourceX = 1;\n final int sourceY = 31;\n source.set(zoom, sourceX, sourceY, sourceX + 1, sourceY);\n add(set, zoom, sourceX, sourceY, border);\n add(set, zoom, sourceX + 1, sourceY, border);\n computer.computeFromSource(source, dest);\n check(dest, set, zoom);\n }",
"class_method_signature": "MapTileAreaBorderComputerTest.testTwoContiguousPointsModulo()",
"constructor": false,
"full_signature": "@Test public void testTwoContiguousPointsModulo()",
"identifier": "testTwoContiguousPointsModulo",
"invocations": [
"set",
"add",
"add",
"computeFromSource",
"check"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testTwoContiguousPointsModulo()",
"testcase": true
} | {
"fields": [
{
"declarator": "mBorder",
"modifier": "private final",
"original_string": "private final int mBorder;",
"type": "int",
"var_name": "mBorder"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileAreaBorderComputer.java",
"identifier": "MapTileAreaBorderComputer",
"interfaces": "implements MapTileAreaComputer",
"methods": [
{
"class_method_signature": "MapTileAreaBorderComputer.MapTileAreaBorderComputer(final int pBorder)",
"constructor": true,
"full_signature": "public MapTileAreaBorderComputer(final int pBorder)",
"identifier": "MapTileAreaBorderComputer",
"modifiers": "public",
"parameters": "(final int pBorder)",
"return": "",
"signature": " MapTileAreaBorderComputer(final int pBorder)",
"testcase": false
},
{
"class_method_signature": "MapTileAreaBorderComputer.getBorder()",
"constructor": false,
"full_signature": "public int getBorder()",
"identifier": "getBorder",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBorder()",
"testcase": false
},
{
"class_method_signature": "MapTileAreaBorderComputer.computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"identifier": "computeFromSource",
"modifiers": "@Override public",
"parameters": "(final MapTileArea pSource, final MapTileArea pReuse)",
"return": "MapTileArea",
"signature": "MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse) {\n final MapTileArea out = pReuse != null ? pReuse : new MapTileArea();\n if (pSource.size() == 0) {\n out.reset();\n return out;\n }\n final int left = pSource.getLeft() - mBorder;\n final int top = pSource.getTop() - mBorder;\n final int additional = 2 * mBorder - 1;\n out.set(pSource.getZoom(),\n left, top,\n left + pSource.getWidth() + additional, top + pSource.getHeight() + additional);\n return out;\n }",
"class_method_signature": "MapTileAreaBorderComputer.computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"identifier": "computeFromSource",
"invocations": [
"size",
"reset",
"getLeft",
"getTop",
"set",
"getZoom",
"getWidth",
"getHeight"
],
"modifiers": "@Override public",
"parameters": "(final MapTileArea pSource, final MapTileArea pReuse)",
"return": "MapTileArea",
"signature": "MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_2 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "XY01Delta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double XY01Delta = 1E-10;",
"type": "double",
"var_name": "XY01Delta"
},
{
"declarator": "latLongDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double latLongDelta = 1E-10;",
"type": "double",
"var_name": "latLongDelta"
},
{
"declarator": "mMinZoomLevel = 0",
"modifier": "private static final",
"original_string": "private static final int mMinZoomLevel = 0;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel = TileSystem.getMaximumZoomLevel()",
"modifier": "private static final",
"original_string": "private static final int mMaxZoomLevel = TileSystem.getMaximumZoomLevel();",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/TileSystemTest.java",
"identifier": "TileSystemTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetLatitudeFromY01() {\n checkLatitude(tileSystem.getMaxLatitude(), tileSystem.getLatitudeFromY01(0, true));\n checkLatitude(0, tileSystem.getLatitudeFromY01(0.5, true));\n checkLatitude(tileSystem.getMinLatitude(), tileSystem.getLatitudeFromY01(1, true));\n }",
"class_method_signature": "TileSystemTest.testGetLatitudeFromY01()",
"constructor": false,
"full_signature": "@Test public void testGetLatitudeFromY01()",
"identifier": "testGetLatitudeFromY01",
"invocations": [
"checkLatitude",
"getMaxLatitude",
"getLatitudeFromY01",
"checkLatitude",
"getLatitudeFromY01",
"checkLatitude",
"getMinLatitude",
"getLatitudeFromY01"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetLatitudeFromY01()",
"testcase": true
} | {
"fields": [
{
"declarator": "EarthRadius = GeoConstants.RADIUS_EARTH_METERS",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double EarthRadius = GeoConstants.RADIUS_EARTH_METERS;",
"type": "double",
"var_name": "EarthRadius"
},
{
"declarator": "MinLatitude = -85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLatitude = -85.05112877980659;",
"type": "double",
"var_name": "MinLatitude"
},
{
"declarator": "MaxLatitude = 85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLatitude = 85.05112877980659;",
"type": "double",
"var_name": "MaxLatitude"
},
{
"declarator": "MinLongitude = -180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLongitude = -180d;",
"type": "double",
"var_name": "MinLongitude"
},
{
"declarator": "MaxLongitude = 180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLongitude = 180d;",
"type": "double",
"var_name": "MaxLongitude"
},
{
"declarator": "mTileSize = 256",
"modifier": "private static",
"original_string": "private static int mTileSize = 256;",
"type": "int",
"var_name": "mTileSize"
},
{
"declarator": "primaryKeyMaxZoomLevel = 29",
"modifier": "public static final",
"original_string": "public static final int primaryKeyMaxZoomLevel = 29;",
"type": "int",
"var_name": "primaryKeyMaxZoomLevel"
},
{
"declarator": "projectionZoomLevel = primaryKeyMaxZoomLevel + 1",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final int projectionZoomLevel = primaryKeyMaxZoomLevel + 1;",
"type": "int",
"var_name": "projectionZoomLevel"
},
{
"declarator": "mMaxZoomLevel = primaryKeyMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mMaxZoomLevel = primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java",
"identifier": "TileSystem",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSystem.setTileSize(final int tileSize)",
"constructor": false,
"full_signature": "public static void setTileSize(final int tileSize)",
"identifier": "setTileSize",
"modifiers": "public static",
"parameters": "(final int tileSize)",
"return": "void",
"signature": "void setTileSize(final int tileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize()",
"constructor": false,
"full_signature": "public static int getTileSize()",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getTileSize()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaximumZoomLevel()",
"constructor": false,
"full_signature": "public static int getMaximumZoomLevel()",
"identifier": "getMaximumZoomLevel",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getMaximumZoomLevel()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getTileSize(final double pZoomLevel)",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getTileSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getInputTileZoomLevel(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static int getInputTileZoomLevel(final double pZoomLevel)",
"identifier": "getInputTileZoomLevel",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "int",
"signature": "int getInputTileZoomLevel(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double MapSize(final double pZoomLevel)",
"identifier": "MapSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double MapSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getFactor(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getFactor(final double pZoomLevel)",
"identifier": "getFactor",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getFactor(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final double zoomLevel)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final double zoomLevel)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final double zoomLevel)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final double zoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolutionMapSize(double latitude, final double mapSize)",
"constructor": false,
"full_signature": "public static double GroundResolutionMapSize(double latitude, final double mapSize)",
"identifier": "GroundResolutionMapSize",
"modifiers": "public static",
"parameters": "(double latitude, final double mapSize)",
"return": "double",
"signature": "double GroundResolutionMapSize(double latitude, final double mapSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"return": "Point",
"signature": "Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"identifier": "LatLongToPixelXYMapSize",
"modifiers": "@Deprecated public",
"parameters": "(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongWithoutWrap",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude)",
"constructor": false,
"full_signature": "abstract public double getX01FromLongitude(double longitude)",
"identifier": "getX01FromLongitude",
"modifiers": "abstract public",
"parameters": "(double longitude)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "abstract public double getY01FromLatitude(final double pLatitude)",
"identifier": "getY01FromLatitude",
"modifiers": "abstract public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double getY01FromLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"identifier": "PixelXYToLatLongMapSize",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongMapSizeWithoutWrap",
"modifiers": "public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final double n, final double minValue, final double maxValue)",
"constructor": false,
"full_signature": "public static double Clip(final double n, final double minValue, final double maxValue)",
"identifier": "Clip",
"modifiers": "public static",
"parameters": "(final double n, final double minValue, final double maxValue)",
"return": "double",
"signature": "double Clip(final double n, final double minValue, final double maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY, final Point reuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final Rect rect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int tileX, final int tileY, final Point reuse)",
"return": "Point",
"signature": "Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"return": "PointL",
"signature": "PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"identifier": "TileXYToQuadKey",
"modifiers": "public static",
"parameters": "(final int tileX, final int tileY, final int levelOfDetail)",
"return": "String",
"signature": "String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.QuadKeyToTileXY(final String quadKey, final Point reuse)",
"constructor": false,
"full_signature": "public static Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"identifier": "QuadKeyToTileXY",
"modifiers": "public static",
"parameters": "(final String quadKey, final Point reuse)",
"return": "Point",
"signature": "Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"constructor": false,
"full_signature": "public double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"identifier": "getLongitudeZoom",
"modifiers": "public",
"parameters": "(final double pEast, final double pWest, final int pScreenWidth)",
"return": "double",
"signature": "double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"identifier": "getLatitudeZoom",
"modifiers": "public",
"parameters": "(final double pNorth, final double pSouth, final int pScreenHeight)",
"return": "double",
"signature": "double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.wrap(double n, final double minValue, final double maxValue, final double interval)",
"constructor": false,
"full_signature": "private static double wrap(double n, final double minValue, final double maxValue, final double interval)",
"identifier": "wrap",
"modifiers": "private static",
"parameters": "(double n, final double minValue, final double maxValue, final double interval)",
"return": "double",
"signature": "double wrap(double n, final double minValue, final double maxValue, final double interval)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorFromXY01",
"modifiers": "public",
"parameters": "(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01)",
"constructor": false,
"full_signature": "abstract public double getLatitudeFromY01(final double pY01)",
"identifier": "getLatitudeFromY01",
"modifiers": "abstract public",
"parameters": "(final double pY01)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01)",
"constructor": false,
"full_signature": "abstract public double getLongitudeFromX01(final double pX01)",
"identifier": "getLongitudeFromX01",
"modifiers": "abstract public",
"parameters": "(final double pX01)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"identifier": "getCleanMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"constructor": false,
"full_signature": "public static long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"identifier": "ClipToLong",
"modifiers": "public static",
"parameters": "(final double pValue, final double pMax, final boolean pWrapEnabled)",
"return": "long",
"signature": "long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final long n, final long minValue, final long maxValue)",
"constructor": false,
"full_signature": "@Deprecated public static long Clip(final long n, final long minValue, final long maxValue)",
"identifier": "Clip",
"modifiers": "@Deprecated public static",
"parameters": "(final long n, final long minValue, final long maxValue)",
"return": "long",
"signature": "long Clip(final long n, final long minValue, final long maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.truncateToInt(final long value)",
"constructor": false,
"full_signature": "public static int truncateToInt(final long value)",
"identifier": "truncateToInt",
"modifiers": "public static",
"parameters": "(final long value)",
"return": "int",
"signature": "int truncateToInt(final long value)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"identifier": "getMercatorFromGeo",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"return": "PointL",
"signature": "PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "public GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"identifier": "getGeoFromMercator",
"modifiers": "public",
"parameters": "(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"identifier": "getXY01FromMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"return": "double",
"signature": "double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLongitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLongitude(final double pRandom01)",
"identifier": "getRandomLongitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLongitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01, final double pMinLatitude)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final long pMercator, final double pTileSize)",
"constructor": false,
"full_signature": "public static int getTileFromMercator(final long pMercator, final double pTileSize)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final long pMercator, final double pTileSize)",
"return": "int",
"signature": "int getTileFromMercator(final long pMercator, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromTile(final int pTile, final double pTileSize)",
"constructor": false,
"full_signature": "public static long getMercatorFromTile(final int pTile, final double pTileSize)",
"identifier": "getMercatorFromTile",
"modifiers": "public static",
"parameters": "(final int pTile, final double pTileSize)",
"return": "long",
"signature": "long getMercatorFromTile(final int pTile, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLatitude()",
"constructor": false,
"full_signature": "abstract public double getMinLatitude()",
"identifier": "getMinLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLatitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLatitude()",
"identifier": "getMaxLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLongitude()",
"constructor": false,
"full_signature": "abstract public double getMinLongitude()",
"identifier": "getMinLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLongitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLongitude()",
"identifier": "getMaxLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public double cleanLongitude(final double pLongitude)",
"identifier": "cleanLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "double",
"signature": "double cleanLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public double cleanLatitude(final double pLatitude)",
"identifier": "cleanLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double cleanLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public boolean isValidLongitude(final double pLongitude)",
"identifier": "isValidLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "boolean",
"signature": "boolean isValidLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public boolean isValidLatitude(final double pLatitude)",
"identifier": "isValidLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "boolean",
"signature": "boolean isValidLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLongitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLongitudeSpan()",
"identifier": "toStringLongitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLatitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLatitudeSpan()",
"identifier": "toStringLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileXFromLongitude(final double pLongitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"identifier": "getTileXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final int pZoom)",
"return": "int",
"signature": "int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileYFromLatitude(final double pLatitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"identifier": "getTileYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final int pZoom)",
"return": "int",
"signature": "int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromTileY(final int pY, final int pZoom)",
"constructor": false,
"full_signature": "public double getLatitudeFromTileY(final int pY, final int pZoom)",
"identifier": "getLatitudeFromTileY",
"modifiers": "public",
"parameters": "(final int pY, final int pZoom)",
"return": "double",
"signature": "double getLatitudeFromTileY(final int pY, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromTileX(final int pX, final int pZoom)",
"constructor": false,
"full_signature": "public double getLongitudeFromTileX(final int pX, final int pZoom)",
"identifier": "getLongitudeFromTileX",
"modifiers": "public",
"parameters": "(final int pX, final int pZoom)",
"return": "double",
"signature": "double getLongitudeFromTileX(final int pX, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.clipTile(final int pTile, final int pZoom)",
"constructor": false,
"full_signature": "private int clipTile(final int pTile, final int pZoom)",
"identifier": "clipTile",
"modifiers": "private",
"parameters": "(final int pTile, final int pZoom)",
"return": "int",
"signature": "int clipTile(final int pTile, final int pZoom)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled) {\n\t\tfinal double latitude = getLatitudeFromY01(wrapEnabled ? Clip(pY01, 0, 1) : pY01);\n\t\treturn wrapEnabled ? Clip(latitude, getMinLatitude(), getMaxLatitude()) : latitude;\n\t}",
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"invocations": [
"getLatitudeFromY01",
"Clip",
"Clip",
"getMinLatitude",
"getMaxLatitude"
],
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_68 | {
"fields": [
{
"declarator": "mCacheControlValue = 172800",
"modifier": "private final",
"original_string": "private final long mCacheControlValue = 172800;",
"type": "long",
"var_name": "mCacheControlValue"
},
{
"declarator": "mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"};",
"type": "String[]",
"var_name": "mCacheControlStringOK"
},
{
"declarator": "mCacheControlStringKO = {\"max-age=, public\", \"public\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringKO = {\"max-age=, public\", \"public\"};",
"type": "String[]",
"var_name": "mCacheControlStringKO"
},
{
"declarator": "mExpiresValue = 1539971220000L",
"modifier": "private final",
"original_string": "private final long mExpiresValue = 1539971220000L;",
"type": "long",
"var_name": "mExpiresValue"
},
{
"declarator": "mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringOK"
},
{
"declarator": "mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringKO"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicyTest.java",
"identifier": "TileSourcePolicyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomExpirationTimeWithValues() {\n final long twentyMinutesInMillis = 20 * 60 * 1000;\n final TileSourcePolicy tileSourcePolicy = new TileSourcePolicy() {\n @Override\n public long computeExpirationTime(String pHttpExpiresHeader, String pHttpCacheControlHeader, long pNow) {\n return pNow + twentyMinutesInMillis;\n }\n };\n final long now = System.currentTimeMillis();\n final long expected = now + twentyMinutesInMillis;\n for (final String cacheControlString : mCacheControlStringOK) {\n for (final String expiresString : mExpiresStringOK) {\n Assert.assertEquals(\n expected,\n tileSourcePolicy.computeExpirationTime(expiresString, cacheControlString, now));\n }\n for (final String expiresString : mExpiresStringKO) {\n Assert.assertEquals(\n expected,\n tileSourcePolicy.computeExpirationTime(expiresString, cacheControlString, now));\n }\n }\n for (final String cacheControlString : mCacheControlStringKO) {\n for (final String expiresString : mExpiresStringOK) {\n Assert.assertEquals(\n expected,\n tileSourcePolicy.computeExpirationTime(expiresString, cacheControlString, now));\n }\n for (final String expiresString : mExpiresStringKO) {\n Assert.assertEquals(\n expected,\n tileSourcePolicy.computeExpirationTime(expiresString, cacheControlString, now));\n }\n }\n }",
"class_method_signature": "TileSourcePolicyTest.testCustomExpirationTimeWithValues()",
"constructor": false,
"full_signature": "@Test public void testCustomExpirationTimeWithValues()",
"identifier": "testCustomExpirationTimeWithValues",
"invocations": [
"currentTimeMillis",
"assertEquals",
"computeExpirationTime",
"assertEquals",
"computeExpirationTime",
"assertEquals",
"computeExpirationTime",
"assertEquals",
"computeExpirationTime"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCustomExpirationTimeWithValues()",
"testcase": true
} | {
"fields": [
{
"declarator": "FLAG_NO_BULK = 1",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_BULK = 1;",
"type": "int",
"var_name": "FLAG_NO_BULK"
},
{
"declarator": "FLAG_NO_PREVENTIVE = 2",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_PREVENTIVE = 2;",
"type": "int",
"var_name": "FLAG_NO_PREVENTIVE"
},
{
"declarator": "FLAG_USER_AGENT_MEANINGFUL = 4",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_MEANINGFUL = 4;",
"type": "int",
"var_name": "FLAG_USER_AGENT_MEANINGFUL"
},
{
"declarator": "FLAG_USER_AGENT_NORMALIZED = 8",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_NORMALIZED = 8;",
"type": "int",
"var_name": "FLAG_USER_AGENT_NORMALIZED"
},
{
"declarator": "mMaxConcurrent",
"modifier": "private final",
"original_string": "private final int mMaxConcurrent;",
"type": "int",
"var_name": "mMaxConcurrent"
},
{
"declarator": "mFlags",
"modifier": "private final",
"original_string": "private final int mFlags;",
"type": "int",
"var_name": "mFlags"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicy.java",
"identifier": "TileSourcePolicy",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy()",
"constructor": true,
"full_signature": "public TileSourcePolicy()",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " TileSourcePolicy()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"constructor": true,
"full_signature": "public TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "(final int pMaxConcurrent,\n final int pFlags)",
"return": "",
"signature": " TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getMaxConcurrent()",
"constructor": false,
"full_signature": "public int getMaxConcurrent()",
"identifier": "getMaxConcurrent",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getMaxConcurrent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsBulkDownload()",
"constructor": false,
"full_signature": "public boolean acceptsBulkDownload()",
"identifier": "acceptsBulkDownload",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsBulkDownload()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsMeaninglessUserAgent()",
"constructor": false,
"full_signature": "private boolean acceptsMeaninglessUserAgent()",
"identifier": "acceptsMeaninglessUserAgent",
"modifiers": "private",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsMeaninglessUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.normalizesUserAgent()",
"constructor": false,
"full_signature": "public boolean normalizesUserAgent()",
"identifier": "normalizesUserAgent",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean normalizesUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsPreventive()",
"constructor": false,
"full_signature": "public boolean acceptsPreventive()",
"identifier": "acceptsPreventive",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsPreventive()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsUserAgent(final String pUserAgent)",
"constructor": false,
"full_signature": "public boolean acceptsUserAgent(final String pUserAgent)",
"identifier": "acceptsUserAgent",
"modifiers": "public",
"parameters": "(final String pUserAgent)",
"return": "boolean",
"signature": "boolean acceptsUserAgent(final String pUserAgent)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpExpiresTime(final String pHttpExpiresHeader)",
"constructor": false,
"full_signature": "public Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"identifier": "getHttpExpiresTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader)",
"return": "Long",
"signature": "Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"constructor": false,
"full_signature": "public Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"identifier": "getHttpCacheControlDuration",
"modifiers": "public",
"parameters": "(final String pHttpCacheControlHeader)",
"return": "Long",
"signature": "Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final HttpURLConnection pHttpURLConnection, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow) {\n final Long override=Configuration.getInstance().getExpirationOverrideDuration();\n if (override != null) {\n return pNow + override;\n }\n\n final long extension = Configuration.getInstance().getExpirationExtendedDuration();\n final Long cacheControlDuration = getHttpCacheControlDuration(pHttpCacheControlHeader);\n if (cacheControlDuration != null) {\n return pNow + cacheControlDuration * 1000 + extension;\n }\n\n final Long httpExpiresTime = getHttpExpiresTime(pHttpExpiresHeader);\n if (httpExpiresTime != null) {\n return httpExpiresTime + extension;\n }\n\n return pNow + OpenStreetMapTileProviderConstants.DEFAULT_MAXIMUM_CACHED_FILE_AGE + extension;\n }",
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"identifier": "computeExpirationTime",
"invocations": [
"getExpirationOverrideDuration",
"getInstance",
"getExpirationExtendedDuration",
"getInstance",
"getHttpCacheControlDuration",
"getHttpExpiresTime"
],
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_29 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_distanceTo_Equator_Smaller() {\n\t\tfinal double ratioDelta = 1E-5;\n\t\tfinal int iterations = 10;\n\t\tfinal double latitude = 0;\n\t\tdouble longitudeIncrement = 1;\n\t\tfor (int i = 0 ; i < iterations ; i ++) {\n\t\t\tfinal double longitude1 = getRandomLongitude();\n\t\t\tfinal double longitude2 = longitude1 + longitudeIncrement;\n\t\t\tlongitudeIncrement /= 10.;\n\t\t\tfinal GeoPoint target = new GeoPoint(latitude, longitude1);\n\t\t\tfinal GeoPoint other = new GeoPoint(latitude, longitude2);\n\t\t\tfinal double diff = getCleanLongitudeDiff(longitude1, longitude2);\n\t\t\tfinal double expected = GeoConstants.RADIUS_EARTH_METERS * diff * MathConstants.DEG2RAD;\n\t\t\tif (expected < minimumDistance) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal double delta = expected * ratioDelta;\n\t\t\tassertEquals(\"distance between \" + target + \" and \" + other,\n\t\t\t\t\texpected, target.distanceToAsDouble(other), delta);\n\t\t}\n\t}",
"class_method_signature": "GeoPointTest.test_distanceTo_Equator_Smaller()",
"constructor": false,
"full_signature": "@Test public void test_distanceTo_Equator_Smaller()",
"identifier": "test_distanceTo_Equator_Smaller",
"invocations": [
"getRandomLongitude",
"getCleanLongitudeDiff",
"assertEquals",
"distanceToAsDouble"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_distanceTo_Equator_Smaller()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double distanceToAsDouble(final IGeoPoint other) {\n\t\tfinal double lat1 = DEG2RAD * getLatitude();\n\t\tfinal double lat2 = DEG2RAD * other.getLatitude();\n\t\tfinal double lon1 = DEG2RAD * getLongitude();\n\t\tfinal double lon2 = DEG2RAD * other.getLongitude();\n\t\treturn RADIUS_EARTH_METERS * 2 * Math.asin(Math.min(1, Math.sqrt(\n\t\t\t\tMath.pow(Math.sin((lat2 - lat1) / 2), 2)\n\t\t\t\t+ Math.cos(lat1) * Math.cos(lat2)\n\t\t\t\t* Math.pow(Math.sin((lon2 - lon1) / 2), 2)\n\t\t)));\n\t}",
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"invocations": [
"getLatitude",
"getLatitude",
"getLongitude",
"getLongitude",
"asin",
"min",
"sqrt",
"pow",
"sin",
"cos",
"cos",
"pow",
"sin"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_52 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCorpusChristiViewIsNorth() {\n BoundingBox item = new BoundingBox(27.696581, -97.243682999999, 27.688781, -97.253063);\n\n BoundingBox viewTop = new BoundingBox(\n 27.782999124172314, -97.24748611450195,\n 27.697917493482727, -97.30928421020508);\n Assert.assertTrue(viewTop.overlaps(item, 4));\n }",
"class_method_signature": "BoundingBoxTest.testCorpusChristiViewIsNorth()",
"constructor": false,
"full_signature": "@Test public void testCorpusChristiViewIsNorth()",
"identifier": "testCorpusChristiViewIsNorth",
"invocations": [
"assertTrue",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCorpusChristiViewIsNorth()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_13 | {
"fields": [
{
"declarator": "mDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double mDelta = 1E-10;",
"type": "double",
"var_name": "mDelta"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/DistanceTest.java",
"identifier": "DistanceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_getSquareDistanceToPoint() {\n\t\tfinal int xA = 100;\n\t\tfinal int yA = 200;\n\t\tfinal int deltaX = 10;\n\t\tfinal int deltaY = 20;\n\t\tAssert.assertEquals(0,\n\t\t\t\tDistance.getSquaredDistanceToPoint(xA, yA, xA, yA), mDelta);\n\t\tAssert.assertEquals(deltaX * deltaX,\n\t\t\t\tDistance.getSquaredDistanceToPoint(xA, yA, xA + deltaX, yA), mDelta);\n\t\tAssert.assertEquals(deltaY * deltaY,\n\t\t\t\tDistance.getSquaredDistanceToPoint(xA, yA, xA, yA + deltaY), mDelta);\n\t\tAssert.assertEquals(deltaX * deltaX + deltaY * deltaY,\n\t\t\t\tDistance.getSquaredDistanceToPoint(xA, yA, xA + deltaX, yA + deltaY), mDelta);\n\t}",
"class_method_signature": "DistanceTest.test_getSquareDistanceToPoint()",
"constructor": false,
"full_signature": "@Test public void test_getSquareDistanceToPoint()",
"identifier": "test_getSquareDistanceToPoint",
"invocations": [
"assertEquals",
"getSquaredDistanceToPoint",
"assertEquals",
"getSquaredDistanceToPoint",
"assertEquals",
"getSquaredDistanceToPoint",
"assertEquals",
"getSquaredDistanceToPoint"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_getSquareDistanceToPoint()",
"testcase": true
} | {
"fields": [],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/Distance.java",
"identifier": "Distance",
"interfaces": "",
"methods": [
{
"class_method_signature": "Distance.getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"identifier": "getSquaredDistanceToPoint",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"return": "double",
"signature": "double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToLine",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getSquaredDistanceToSegment",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getSquaredDistanceToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"identifier": "getSquaredDistanceToProjection",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"return": "double",
"signature": "double getSquaredDistanceToProjection(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pProjectionFactor\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToLine",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToLine(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"constructor": false,
"full_signature": "public static double getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"identifier": "getProjectionFactorToSegment",
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"return": "double",
"signature": "double getProjectionFactorToSegment(\n final double pFromX, final double pFromY,\n final double pAX, final double pAY, final double pBX, final double pBY\n )",
"testcase": false
},
{
"class_method_signature": "Distance.dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"constructor": false,
"full_signature": "private static double dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"identifier": "dotProduct",
"modifiers": "private static",
"parameters": "(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"return": "double",
"signature": "double dotProduct(\n final double pAX, final double pAY, final double pBX, final double pBY,\n final double pCX, final double pCY)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY) {\n final double dX = pFromX - pToX;\n final double dY = pFromY - pToY;\n return dX * dX + dY * dY;\n }",
"class_method_signature": "Distance.getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"constructor": false,
"full_signature": "public static double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"identifier": "getSquaredDistanceToPoint",
"invocations": [],
"modifiers": "public static",
"parameters": "(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"return": "double",
"signature": "double getSquaredDistanceToPoint(\n final double pFromX, final double pFromY, final double pToX, final double pToY)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_44 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOverlaps() {\n\n // ________________\n // | | |\n // | | |\n // |------+-------|\n // | | |\n // | | |\n // ----------------\n //box is notated as *\n //test area is notated as &\n\n\n // ________________\n // | | |\n // | *** & |\n // |-----*+*------|\n // | *** |\n // | | |\n // ----------------\n //box is notated as *\n //test area is notated as &\n\n BoundingBox box = new BoundingBox(1, 1, -1, -1);\n Assert.assertTrue(box.overlaps(box, 4));\n\n BoundingBox farAway = new BoundingBox(45, 45, 44, 44);\n Assert.assertTrue(farAway.overlaps(farAway, 4));\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n farAway = new BoundingBox(1.1, 45, 1, 44);\n Assert.assertTrue(farAway.overlaps(farAway, 4));\n Assert.assertFalse(box.overlaps(farAway, 4));\n\n farAway = new BoundingBox(2, 2, -2, -2);\n Assert.assertTrue(farAway.overlaps(farAway, 4));\n Assert.assertTrue(box.overlaps(farAway, 4));\n\n //this is completely within the test box\n farAway = new BoundingBox(0.5, 0.5, -0.5, -0.5);\n Assert.assertTrue(farAway.overlaps(farAway, 4));\n Assert.assertTrue(box.overlaps(farAway, 4));\n }",
"class_method_signature": "BoundingBoxTest.testOverlaps()",
"constructor": false,
"full_signature": "@Test public void testOverlaps()",
"identifier": "testOverlaps",
"invocations": [
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertFalse",
"overlaps",
"assertTrue",
"overlaps",
"assertFalse",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOverlaps()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_33 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_bearingTo_south() {\n\t\tfinal GeoPoint target = new GeoPoint(0.0, 0.0);\n\t\tfinal GeoPoint other = new GeoPoint(-10.0, 0.0);\n\t\tassertEquals(\"directly south\", 180, Math.round(target.bearingTo(other)));\n\t}",
"class_method_signature": "GeoPointTest.test_bearingTo_south()",
"constructor": false,
"full_signature": "@Test public void test_bearingTo_south()",
"identifier": "test_bearingTo_south",
"invocations": [
"assertEquals",
"round",
"bearingTo"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_bearingTo_south()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double bearingTo(final IGeoPoint other) {\n\t\tfinal double lat1 = Math.toRadians(this.mLatitude);\n\t\tfinal double long1 = Math.toRadians(this.mLongitude);\n\t\tfinal double lat2 = Math.toRadians(other.getLatitude());\n\t\tfinal double long2 = Math.toRadians(other.getLongitude());\n\t\tfinal double delta_long = long2 - long1;\n\t\tfinal double a = Math.sin(delta_long) * Math.cos(lat2);\n\t\tfinal double b = Math.cos(lat1) * Math.sin(lat2) -\n\t\t\t\t\t\t Math.sin(lat1) * Math.cos(lat2) * Math.cos(delta_long);\n\t\tfinal double bearing = Math.toDegrees(Math.atan2(a, b));\n\t\tfinal double bearing_normalized = (bearing + 360) % 360;\n\t\treturn bearing_normalized;\n\t}",
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"invocations": [
"toRadians",
"toRadians",
"toRadians",
"getLatitude",
"toRadians",
"getLongitude",
"sin",
"cos",
"cos",
"sin",
"sin",
"cos",
"cos",
"toDegrees",
"atan2"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_64 | {
"fields": [
{
"declarator": "mRandom = new Random()",
"modifier": "private final",
"original_string": "private final Random mRandom = new Random();",
"type": "Random",
"var_name": "mRandom"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/tileprovider/cachemanager/CacheManagerTest.java",
"identifier": "CacheManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetTilesRectWholeWorld() {\n final TileSystem tileSystem = MapView.getTileSystem();\n final BoundingBox box = new BoundingBox( // whole world\n tileSystem.getMaxLatitude(), tileSystem.getMaxLongitude(),\n tileSystem.getMinLatitude(), tileSystem.getMinLongitude());\n for (int zoom = 0 ; zoom <= TileSystem.getMaximumZoomLevel() ; zoom ++) {\n final Rect rect = CacheManager.getTilesRect(box, zoom);\n Assert.assertEquals(0, rect.left);\n Assert.assertEquals(0, rect.top);\n final int maxSize = -1 + (1 << zoom);\n Assert.assertEquals(maxSize, rect.bottom);\n Assert.assertEquals(maxSize, rect.right);\n }\n }",
"class_method_signature": "CacheManagerTest.testGetTilesRectWholeWorld()",
"constructor": false,
"full_signature": "@Test public void testGetTilesRectWholeWorld()",
"identifier": "testGetTilesRectWholeWorld",
"invocations": [
"getTileSystem",
"getMaxLatitude",
"getMaxLongitude",
"getMinLatitude",
"getMinLongitude",
"getMaximumZoomLevel",
"getTilesRect",
"assertEquals",
"assertEquals",
"assertEquals",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetTilesRectWholeWorld()",
"testcase": true
} | {
"fields": [
{
"declarator": "mTileDownloader = new TileDownloader()",
"modifier": "private",
"original_string": "private TileDownloader mTileDownloader = new TileDownloader();",
"type": "TileDownloader",
"var_name": "mTileDownloader"
},
{
"declarator": "mTileSource",
"modifier": "protected final",
"original_string": "protected final ITileSource mTileSource;",
"type": "ITileSource",
"var_name": "mTileSource"
},
{
"declarator": "mTileWriter",
"modifier": "protected final",
"original_string": "protected final IFilesystemCache mTileWriter;",
"type": "IFilesystemCache",
"var_name": "mTileWriter"
},
{
"declarator": "mMinZoomLevel",
"modifier": "protected final",
"original_string": "protected final int mMinZoomLevel;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel",
"modifier": "protected final",
"original_string": "protected final int mMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "mPendingTasks = new HashSet<>()",
"modifier": "protected",
"original_string": "protected Set<CacheManagerTask> mPendingTasks = new HashSet<>();",
"type": "Set<CacheManagerTask>",
"var_name": "mPendingTasks"
},
{
"declarator": "verifyCancel = true",
"modifier": "protected",
"original_string": "protected boolean verifyCancel = true;",
"type": "boolean",
"var_name": "verifyCancel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/tileprovider/cachemanager/CacheManager.java",
"identifier": "CacheManager",
"interfaces": "",
"methods": [
{
"class_method_signature": "CacheManager.CacheManager(final MapView mapView)",
"constructor": true,
"full_signature": "public CacheManager(final MapView mapView)",
"identifier": "CacheManager",
"modifiers": "public",
"parameters": "(final MapView mapView)",
"return": "",
"signature": " CacheManager(final MapView mapView)",
"testcase": false
},
{
"class_method_signature": "CacheManager.CacheManager(final MapView mapView, IFilesystemCache writer)",
"constructor": true,
"full_signature": "public CacheManager(final MapView mapView, IFilesystemCache writer)",
"identifier": "CacheManager",
"modifiers": "public",
"parameters": "(final MapView mapView, IFilesystemCache writer)",
"return": "",
"signature": " CacheManager(final MapView mapView, IFilesystemCache writer)",
"testcase": false
},
{
"class_method_signature": "CacheManager.CacheManager(final MapTileProviderBase pTileProvider,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"constructor": true,
"full_signature": "public CacheManager(final MapTileProviderBase pTileProvider,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"identifier": "CacheManager",
"modifiers": "public",
"parameters": "(final MapTileProviderBase pTileProvider,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"return": "",
"signature": " CacheManager(final MapTileProviderBase pTileProvider,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.CacheManager(final ITileSource pTileSource,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"constructor": true,
"full_signature": "public CacheManager(final ITileSource pTileSource,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"identifier": "CacheManager",
"modifiers": "public",
"parameters": "(final ITileSource pTileSource,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"return": "",
"signature": " CacheManager(final ITileSource pTileSource,\n final IFilesystemCache pWriter,\n final int pMinZoomLevel, final int pMaxZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getPendingJobs()",
"constructor": false,
"full_signature": "public int getPendingJobs()",
"identifier": "getPendingJobs",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getPendingJobs()",
"testcase": false
},
{
"class_method_signature": "CacheManager.getMapTileFromCoordinates(final double aLat, final double aLon, final int zoom)",
"constructor": false,
"full_signature": "@Deprecated public static Point getMapTileFromCoordinates(final double aLat, final double aLon, final int zoom)",
"identifier": "getMapTileFromCoordinates",
"modifiers": "@Deprecated public static",
"parameters": "(final double aLat, final double aLon, final int zoom)",
"return": "Point",
"signature": "Point getMapTileFromCoordinates(final double aLat, final double aLon, final int zoom)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getCoordinatesFromMapTile(final int x, final int y, final int zoom)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint getCoordinatesFromMapTile(final int x, final int y, final int zoom)",
"identifier": "getCoordinatesFromMapTile",
"modifiers": "@Deprecated public static",
"parameters": "(final int x, final int y, final int zoom)",
"return": "GeoPoint",
"signature": "GeoPoint getCoordinatesFromMapTile(final int x, final int y, final int zoom)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getFileName(ITileSource tileSource, final long pMapTileIndex)",
"constructor": false,
"full_signature": "public static File getFileName(ITileSource tileSource, final long pMapTileIndex)",
"identifier": "getFileName",
"modifiers": "public static",
"parameters": "(ITileSource tileSource, final long pMapTileIndex)",
"return": "File",
"signature": "File getFileName(ITileSource tileSource, final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.loadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean loadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"identifier": "loadTile",
"modifiers": "public",
"parameters": "(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean loadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.forceLoadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean forceLoadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"identifier": "forceLoadTile",
"modifiers": "public",
"parameters": "(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean forceLoadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.deleteTile(final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean deleteTile(final long pMapTileIndex)",
"identifier": "deleteTile",
"modifiers": "public",
"parameters": "(final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean deleteTile(final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.checkTile(final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean checkTile(final long pMapTileIndex)",
"identifier": "checkTile",
"modifiers": "public",
"parameters": "(final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean checkTile(final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.isTileToBeDownloaded(final ITileSource pTileSource, final long pMapTileIndex)",
"constructor": false,
"full_signature": "public boolean isTileToBeDownloaded(final ITileSource pTileSource, final long pMapTileIndex)",
"identifier": "isTileToBeDownloaded",
"modifiers": "public",
"parameters": "(final ITileSource pTileSource, final long pMapTileIndex)",
"return": "boolean",
"signature": "boolean isTileToBeDownloaded(final ITileSource pTileSource, final long pMapTileIndex)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverage(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "public static List<Long> getTilesCoverage(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"identifier": "getTilesCoverage",
"modifiers": "public static",
"parameters": "(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"return": "List<Long>",
"signature": "List<Long> getTilesCoverage(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverage(final BoundingBox pBB, final int pZoomLevel)",
"constructor": false,
"full_signature": "public static Collection<Long> getTilesCoverage(final BoundingBox pBB, final int pZoomLevel)",
"identifier": "getTilesCoverage",
"modifiers": "public static",
"parameters": "(final BoundingBox pBB, final int pZoomLevel)",
"return": "Collection<Long>",
"signature": "Collection<Long> getTilesCoverage(final BoundingBox pBB, final int pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverageIterable(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "static IterableWithSize<Long> getTilesCoverageIterable(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"identifier": "getTilesCoverageIterable",
"modifiers": "static",
"parameters": "(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"return": "IterableWithSize<Long>",
"signature": "IterableWithSize<Long> getTilesCoverageIterable(final BoundingBox pBB,\n final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"constructor": false,
"full_signature": "public static Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"identifier": "getTilesRect",
"modifiers": "public static",
"parameters": "(final BoundingBox pBB,\n final int pZoomLevel)",
"return": "Rect",
"signature": "Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "public static List<Long> getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"identifier": "getTilesCoverage",
"modifiers": "public static",
"parameters": "(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"return": "List<Long>",
"signature": "List<Long> getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomLevel)",
"constructor": false,
"full_signature": "public static Collection<Long> getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomLevel)",
"identifier": "getTilesCoverage",
"modifiers": "public static",
"parameters": "(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomLevel)",
"return": "Collection<Long>",
"signature": "Collection<Long> getTilesCoverage(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.possibleTilesInArea(final BoundingBox pBB, final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "public int possibleTilesInArea(final BoundingBox pBB, final int pZoomMin, final int pZoomMax)",
"identifier": "possibleTilesInArea",
"modifiers": "public",
"parameters": "(final BoundingBox pBB, final int pZoomMin, final int pZoomMax)",
"return": "int",
"signature": "int possibleTilesInArea(final BoundingBox pBB, final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.possibleTilesCovered(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"constructor": false,
"full_signature": "public int possibleTilesCovered(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"identifier": "possibleTilesCovered",
"modifiers": "public",
"parameters": "(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"return": "int",
"signature": "int possibleTilesCovered(final ArrayList<GeoPoint> pGeoPoints,\n final int pZoomMin, final int pZoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.execute(final CacheManagerTask pTask)",
"constructor": false,
"full_signature": "public CacheManagerTask execute(final CacheManagerTask pTask)",
"identifier": "execute",
"modifiers": "public",
"parameters": "(final CacheManagerTask pTask)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask execute(final CacheManagerTask pTask)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsyncNoUI(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsyncNoUI(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"identifier": "downloadAreaAsyncNoUI",
"modifiers": "public",
"parameters": "(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsyncNoUI(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsyncNoUI(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsyncNoUI(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"identifier": "downloadAreaAsyncNoUI",
"modifiers": "public",
"parameters": "(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsyncNoUI(Context ctx, BoundingBox bb, final int zoomMin, final int zoomMax, final CacheManagerCallback callback)",
"testcase": false
},
{
"class_method_signature": "CacheManager.cancelAllJobs()",
"constructor": false,
"full_signature": "public void cancelAllJobs()",
"identifier": "cancelAllJobs",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void cancelAllJobs()",
"testcase": false
},
{
"class_method_signature": "CacheManager.downloadAreaAsync(Context ctx, List<Long> pTiles, final int zoomMin, final int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask downloadAreaAsync(Context ctx, List<Long> pTiles, final int zoomMin, final int zoomMax)",
"identifier": "downloadAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, List<Long> pTiles, final int zoomMin, final int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask downloadAreaAsync(Context ctx, List<Long> pTiles, final int zoomMin, final int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.setVerifyCancel(boolean state)",
"constructor": false,
"full_signature": "public void setVerifyCancel(boolean state)",
"identifier": "setVerifyCancel",
"modifiers": "public",
"parameters": "(boolean state)",
"return": "void",
"signature": "void setVerifyCancel(boolean state)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getVerifyCancel()",
"constructor": false,
"full_signature": "public boolean getVerifyCancel()",
"identifier": "getVerifyCancel",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean getVerifyCancel()",
"testcase": false
},
{
"class_method_signature": "CacheManager.getDownloadingDialog(final Context pCtx, final CacheManagerTask pTask)",
"constructor": false,
"full_signature": "public CacheManagerDialog getDownloadingDialog(final Context pCtx, final CacheManagerTask pTask)",
"identifier": "getDownloadingDialog",
"modifiers": "public",
"parameters": "(final Context pCtx, final CacheManagerTask pTask)",
"return": "CacheManagerDialog",
"signature": "CacheManagerDialog getDownloadingDialog(final Context pCtx, final CacheManagerTask pTask)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getCleaningDialog(final Context pCtx, final CacheManagerTask pTask)",
"constructor": false,
"full_signature": "public CacheManagerDialog getCleaningDialog(final Context pCtx, final CacheManagerTask pTask)",
"identifier": "getCleaningDialog",
"modifiers": "public",
"parameters": "(final Context pCtx, final CacheManagerTask pTask)",
"return": "CacheManagerDialog",
"signature": "CacheManagerDialog getCleaningDialog(final Context pCtx, final CacheManagerTask pTask)",
"testcase": false
},
{
"class_method_signature": "CacheManager.getDownloadingAction()",
"constructor": false,
"full_signature": "public CacheManagerAction getDownloadingAction()",
"identifier": "getDownloadingAction",
"modifiers": "public",
"parameters": "()",
"return": "CacheManagerAction",
"signature": "CacheManagerAction getDownloadingAction()",
"testcase": false
},
{
"class_method_signature": "CacheManager.getCleaningAction()",
"constructor": false,
"full_signature": "public CacheManagerAction getCleaningAction()",
"identifier": "getCleaningAction",
"modifiers": "public",
"parameters": "()",
"return": "CacheManagerAction",
"signature": "CacheManagerAction getCleaningAction()",
"testcase": false
},
{
"class_method_signature": "CacheManager.cleanAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask cleanAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)",
"identifier": "cleanAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask cleanAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.cleanAreaAsync(final Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask cleanAreaAsync(final Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)",
"identifier": "cleanAreaAsync",
"modifiers": "public",
"parameters": "(final Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask cleanAreaAsync(final Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.cleanAreaAsync(Context ctx, List<Long> tiles, int zoomMin, int zoomMax)",
"constructor": false,
"full_signature": "public CacheManagerTask cleanAreaAsync(Context ctx, List<Long> tiles, int zoomMin, int zoomMax)",
"identifier": "cleanAreaAsync",
"modifiers": "public",
"parameters": "(Context ctx, List<Long> tiles, int zoomMin, int zoomMax)",
"return": "CacheManagerTask",
"signature": "CacheManagerTask cleanAreaAsync(Context ctx, List<Long> tiles, int zoomMin, int zoomMax)",
"testcase": false
},
{
"class_method_signature": "CacheManager.extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel)",
"constructor": false,
"full_signature": "public BoundingBox extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel)",
"identifier": "extendedBoundsFromGeoPoints",
"modifiers": "public",
"parameters": "(ArrayList<GeoPoint> geoPoints, int minZoomLevel)",
"return": "BoundingBox",
"signature": "BoundingBox extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel)",
"testcase": false
},
{
"class_method_signature": "CacheManager.currentCacheUsage()",
"constructor": false,
"full_signature": "public long currentCacheUsage()",
"identifier": "currentCacheUsage",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long currentCacheUsage()",
"testcase": false
},
{
"class_method_signature": "CacheManager.cacheCapacity()",
"constructor": false,
"full_signature": "public long cacheCapacity()",
"identifier": "cacheCapacity",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long cacheCapacity()",
"testcase": false
},
{
"class_method_signature": "CacheManager.directorySize(final File pDirectory)",
"constructor": false,
"full_signature": "public long directorySize(final File pDirectory)",
"identifier": "directorySize",
"modifiers": "public",
"parameters": "(final File pDirectory)",
"return": "long",
"signature": "long directorySize(final File pDirectory)",
"testcase": false
},
{
"class_method_signature": "CacheManager.setTileDownloader(final TileDownloader pTileDownloader)",
"constructor": false,
"full_signature": "public void setTileDownloader(final TileDownloader pTileDownloader)",
"identifier": "setTileDownloader",
"modifiers": "public",
"parameters": "(final TileDownloader pTileDownloader)",
"return": "void",
"signature": "void setTileDownloader(final TileDownloader pTileDownloader)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel){\n final int mapTileUpperBound = 1 << pZoomLevel;\n final int right = MapView.getTileSystem().getTileXFromLongitude(pBB.getLonEast(), pZoomLevel);\n final int bottom = MapView.getTileSystem().getTileYFromLatitude(pBB.getLatSouth(), pZoomLevel);\n final int left = MapView.getTileSystem().getTileXFromLongitude(pBB.getLonWest(), pZoomLevel);\n final int top = MapView.getTileSystem().getTileYFromLatitude(pBB.getLatNorth(), pZoomLevel);\n int width = right - left + 1; // handling the modulo\n if (width <= 0) {\n width += mapTileUpperBound;\n }\n int height = bottom - top + 1; // handling the modulo\n if (height <= 0) {\n height += mapTileUpperBound;\n }\n return new Rect(left, top, left + width - 1, top + height - 1);\n }",
"class_method_signature": "CacheManager.getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"constructor": false,
"full_signature": "public static Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"identifier": "getTilesRect",
"invocations": [
"getTileXFromLongitude",
"getTileSystem",
"getLonEast",
"getTileYFromLatitude",
"getTileSystem",
"getLatSouth",
"getTileXFromLongitude",
"getTileSystem",
"getLonWest",
"getTileYFromLatitude",
"getTileSystem",
"getLatNorth"
],
"modifiers": "public static",
"parameters": "(final BoundingBox pBB,\n final int pZoomLevel)",
"return": "Rect",
"signature": "Rect getTilesRect(final BoundingBox pBB,\n final int pZoomLevel)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_25 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/DelayTest.java",
"identifier": "DelayTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDelayMulti() {\n final long[] millis = new long[] {500, 600, 800, 1000};\n final long lastDuration = millis[millis.length - 1];\n long next;\n final Delay delay = new Delay(millis);\n for (int i = 0 ; i < millis.length ; i ++) {\n check(delay, millis[i]);\n next = delay.next();\n Assert.assertEquals(i < millis.length - 1 ? millis[i + 1] : lastDuration, next);\n }\n check(delay, lastDuration);\n next = delay.next();\n Assert.assertEquals(lastDuration, next);\n check(delay, lastDuration);\n }",
"class_method_signature": "DelayTest.testDelayMulti()",
"constructor": false,
"full_signature": "@Test public void testDelayMulti()",
"identifier": "testDelayMulti",
"invocations": [
"check",
"next",
"assertEquals",
"check",
"next",
"assertEquals",
"check"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testDelayMulti()",
"testcase": true
} | {
"fields": [
{
"declarator": "mDurations",
"modifier": "private final",
"original_string": "private final long[] mDurations;",
"type": "long[]",
"var_name": "mDurations"
},
{
"declarator": "mDuration",
"modifier": "private",
"original_string": "private long mDuration;",
"type": "long",
"var_name": "mDuration"
},
{
"declarator": "mNextTime",
"modifier": "private",
"original_string": "private long mNextTime;",
"type": "long",
"var_name": "mNextTime"
},
{
"declarator": "mIndex",
"modifier": "private",
"original_string": "private int mIndex;",
"type": "int",
"var_name": "mIndex"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/Delay.java",
"identifier": "Delay",
"interfaces": "",
"methods": [
{
"class_method_signature": "Delay.Delay(final long pDuration)",
"constructor": true,
"full_signature": "public Delay(final long pDuration)",
"identifier": "Delay",
"modifiers": "public",
"parameters": "(final long pDuration)",
"return": "",
"signature": " Delay(final long pDuration)",
"testcase": false
},
{
"class_method_signature": "Delay.Delay(final long[] pDurations)",
"constructor": true,
"full_signature": "public Delay(final long[] pDurations)",
"identifier": "Delay",
"modifiers": "public",
"parameters": "(final long[] pDurations)",
"return": "",
"signature": " Delay(final long[] pDurations)",
"testcase": false
},
{
"class_method_signature": "Delay.next()",
"constructor": false,
"full_signature": "public long next()",
"identifier": "next",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long next()",
"testcase": false
},
{
"class_method_signature": "Delay.shouldWait()",
"constructor": false,
"full_signature": "public boolean shouldWait()",
"identifier": "shouldWait",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean shouldWait()",
"testcase": false
},
{
"class_method_signature": "Delay.now()",
"constructor": false,
"full_signature": "private long now()",
"identifier": "now",
"modifiers": "private",
"parameters": "()",
"return": "long",
"signature": "long now()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public long next() {\n final long duration;\n if (mDurations == null) {\n duration = mDuration;\n } else {\n duration = mDurations[mIndex];\n if (mIndex < mDurations.length - 1) {\n mIndex ++;\n }\n }\n mNextTime = now() + duration;\n return duration;\n }",
"class_method_signature": "Delay.next()",
"constructor": false,
"full_signature": "public long next()",
"identifier": "next",
"invocations": [
"now"
],
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long next()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_48 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOverlap2() {\n\n // ________________\n // | | |\n // | ***** |\n // |----*-+-*-----|\n // | ***** |\n // | | |\n // ----------------\n //box is notated as * not too scale\n //test area is notated as ?\n\n\n BoundingBox box = new BoundingBox(1, 1, -1, -1);\n Assert.assertTrue(box.overlaps(box, 4));\n\n\n // ________________\n // | ????? |\n // | ***** |\n // |----*-+-*-----|\n // | ***** |\n // | | |\n // ----------------\n //box is notated as * not too scale\n //test area is notated as ?\n //overlap on the norther edge\n BoundingBox item = new BoundingBox(2, 1, 1, -1);\n Assert.assertTrue(box.overlaps(item, 4));\n Assert.assertTrue(item.overlaps(box, 4));\n\n\n // ________________\n // | |\n // | ?***** |\n // |---?*-+-*-----|\n // | ?***** |\n // | | |\n // ----------------\n //box is notated as * not too scale\n //test area is notated as ?\n //overlap on the western edge of box\n item = new BoundingBox(1, -1, -1, -2);\n Assert.assertTrue(box.overlaps(item, 4));\n\n\n // ________________\n // | |\n // | *****? |\n // |--- *-+-*?----|\n // | *****? |\n // | | |\n // ----------------\n //box is notated as * not too scale\n //test area is notated as ?\n\n //overlap on the east edge of box\n item = new BoundingBox(1, 2, -1, 1.0);\n Assert.assertTrue(box.overlaps(item, 4));\n\n\n // ________________\n // | |\n // | ***** |\n // |--- *-+-*-----|\n // | ***** |\n // | ????? |\n // ----------------\n //box is notated as * not too scale\n //test area is notated as ?\n\n //overlap on the southern edge of box\n item = new BoundingBox(-1, 1, -2, -1);\n Assert.assertTrue(box.overlaps(item, 4));\n\n\n // ________________\n // | |\n // | ***** |\n // |--- *-+-*-----|\n // | ***** |\n // | | |\n // | ????? |\n // ----------------\n //box is notated as * not too scale\n //test area is notated as ?\n\n\n //non overlap on the southern edge of box\n item = new BoundingBox(-2, 1, -4, -1);\n Assert.assertTrue(box.overlaps(item, 4));\n\n\n }",
"class_method_signature": "BoundingBoxTest.testOverlap2()",
"constructor": false,
"full_signature": "@Test public void testOverlap2()",
"identifier": "testOverlap2",
"invocations": [
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOverlap2()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_49 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSouthernBoundsSimple() {\n //item's southern bounds is just out of view\n BoundingBox view = new BoundingBox(2, 2, -2, -2);\n BoundingBox item = new BoundingBox(1, 1, 2.1, -1);\n Assert.assertTrue(view.overlaps(item, 4));\n }",
"class_method_signature": "BoundingBoxTest.testSouthernBoundsSimple()",
"constructor": false,
"full_signature": "@Test public void testSouthernBoundsSimple()",
"identifier": "testSouthernBoundsSimple",
"invocations": [
"assertTrue",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testSouthernBoundsSimple()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_24 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/DelayTest.java",
"identifier": "DelayTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDelayOne() {\n final long millis = 500;\n final Delay delay = new Delay(millis);\n for (int i = 0 ; i < 5 ; i ++) {\n check(delay, millis);\n final long next = delay.next();\n Assert.assertEquals(millis, next);\n }\n }",
"class_method_signature": "DelayTest.testDelayOne()",
"constructor": false,
"full_signature": "@Test public void testDelayOne()",
"identifier": "testDelayOne",
"invocations": [
"check",
"next",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testDelayOne()",
"testcase": true
} | {
"fields": [
{
"declarator": "mDurations",
"modifier": "private final",
"original_string": "private final long[] mDurations;",
"type": "long[]",
"var_name": "mDurations"
},
{
"declarator": "mDuration",
"modifier": "private",
"original_string": "private long mDuration;",
"type": "long",
"var_name": "mDuration"
},
{
"declarator": "mNextTime",
"modifier": "private",
"original_string": "private long mNextTime;",
"type": "long",
"var_name": "mNextTime"
},
{
"declarator": "mIndex",
"modifier": "private",
"original_string": "private int mIndex;",
"type": "int",
"var_name": "mIndex"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/Delay.java",
"identifier": "Delay",
"interfaces": "",
"methods": [
{
"class_method_signature": "Delay.Delay(final long pDuration)",
"constructor": true,
"full_signature": "public Delay(final long pDuration)",
"identifier": "Delay",
"modifiers": "public",
"parameters": "(final long pDuration)",
"return": "",
"signature": " Delay(final long pDuration)",
"testcase": false
},
{
"class_method_signature": "Delay.Delay(final long[] pDurations)",
"constructor": true,
"full_signature": "public Delay(final long[] pDurations)",
"identifier": "Delay",
"modifiers": "public",
"parameters": "(final long[] pDurations)",
"return": "",
"signature": " Delay(final long[] pDurations)",
"testcase": false
},
{
"class_method_signature": "Delay.next()",
"constructor": false,
"full_signature": "public long next()",
"identifier": "next",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long next()",
"testcase": false
},
{
"class_method_signature": "Delay.shouldWait()",
"constructor": false,
"full_signature": "public boolean shouldWait()",
"identifier": "shouldWait",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean shouldWait()",
"testcase": false
},
{
"class_method_signature": "Delay.now()",
"constructor": false,
"full_signature": "private long now()",
"identifier": "now",
"modifiers": "private",
"parameters": "()",
"return": "long",
"signature": "long now()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public long next() {\n final long duration;\n if (mDurations == null) {\n duration = mDuration;\n } else {\n duration = mDurations[mIndex];\n if (mIndex < mDurations.length - 1) {\n mIndex ++;\n }\n }\n mNextTime = now() + duration;\n return duration;\n }",
"class_method_signature": "Delay.next()",
"constructor": false,
"full_signature": "public long next()",
"identifier": "next",
"invocations": [
"now"
],
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long next()",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_65 | {
"fields": [
{
"declarator": "mCacheControlValue = 172800",
"modifier": "private final",
"original_string": "private final long mCacheControlValue = 172800;",
"type": "long",
"var_name": "mCacheControlValue"
},
{
"declarator": "mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"};",
"type": "String[]",
"var_name": "mCacheControlStringOK"
},
{
"declarator": "mCacheControlStringKO = {\"max-age=, public\", \"public\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringKO = {\"max-age=, public\", \"public\"};",
"type": "String[]",
"var_name": "mCacheControlStringKO"
},
{
"declarator": "mExpiresValue = 1539971220000L",
"modifier": "private final",
"original_string": "private final long mExpiresValue = 1539971220000L;",
"type": "long",
"var_name": "mExpiresValue"
},
{
"declarator": "mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringOK"
},
{
"declarator": "mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringKO"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicyTest.java",
"identifier": "TileSourcePolicyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetHttpExpiresTime(){\n final TileSourcePolicy tileSourcePolicy = new TileSourcePolicy();\n for (final String string : mExpiresStringOK) {\n Assert.assertEquals(mExpiresValue, (long) tileSourcePolicy.getHttpExpiresTime(string));\n }\n for (final String string : mExpiresStringKO) {\n Assert.assertNull(tileSourcePolicy.getHttpExpiresTime(string));\n }\n }",
"class_method_signature": "TileSourcePolicyTest.testGetHttpExpiresTime()",
"constructor": false,
"full_signature": "@Test public void testGetHttpExpiresTime()",
"identifier": "testGetHttpExpiresTime",
"invocations": [
"assertEquals",
"getHttpExpiresTime",
"assertNull",
"getHttpExpiresTime"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetHttpExpiresTime()",
"testcase": true
} | {
"fields": [
{
"declarator": "FLAG_NO_BULK = 1",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_BULK = 1;",
"type": "int",
"var_name": "FLAG_NO_BULK"
},
{
"declarator": "FLAG_NO_PREVENTIVE = 2",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_PREVENTIVE = 2;",
"type": "int",
"var_name": "FLAG_NO_PREVENTIVE"
},
{
"declarator": "FLAG_USER_AGENT_MEANINGFUL = 4",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_MEANINGFUL = 4;",
"type": "int",
"var_name": "FLAG_USER_AGENT_MEANINGFUL"
},
{
"declarator": "FLAG_USER_AGENT_NORMALIZED = 8",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_NORMALIZED = 8;",
"type": "int",
"var_name": "FLAG_USER_AGENT_NORMALIZED"
},
{
"declarator": "mMaxConcurrent",
"modifier": "private final",
"original_string": "private final int mMaxConcurrent;",
"type": "int",
"var_name": "mMaxConcurrent"
},
{
"declarator": "mFlags",
"modifier": "private final",
"original_string": "private final int mFlags;",
"type": "int",
"var_name": "mFlags"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicy.java",
"identifier": "TileSourcePolicy",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy()",
"constructor": true,
"full_signature": "public TileSourcePolicy()",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " TileSourcePolicy()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"constructor": true,
"full_signature": "public TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "(final int pMaxConcurrent,\n final int pFlags)",
"return": "",
"signature": " TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getMaxConcurrent()",
"constructor": false,
"full_signature": "public int getMaxConcurrent()",
"identifier": "getMaxConcurrent",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getMaxConcurrent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsBulkDownload()",
"constructor": false,
"full_signature": "public boolean acceptsBulkDownload()",
"identifier": "acceptsBulkDownload",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsBulkDownload()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsMeaninglessUserAgent()",
"constructor": false,
"full_signature": "private boolean acceptsMeaninglessUserAgent()",
"identifier": "acceptsMeaninglessUserAgent",
"modifiers": "private",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsMeaninglessUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.normalizesUserAgent()",
"constructor": false,
"full_signature": "public boolean normalizesUserAgent()",
"identifier": "normalizesUserAgent",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean normalizesUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsPreventive()",
"constructor": false,
"full_signature": "public boolean acceptsPreventive()",
"identifier": "acceptsPreventive",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsPreventive()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsUserAgent(final String pUserAgent)",
"constructor": false,
"full_signature": "public boolean acceptsUserAgent(final String pUserAgent)",
"identifier": "acceptsUserAgent",
"modifiers": "public",
"parameters": "(final String pUserAgent)",
"return": "boolean",
"signature": "boolean acceptsUserAgent(final String pUserAgent)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpExpiresTime(final String pHttpExpiresHeader)",
"constructor": false,
"full_signature": "public Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"identifier": "getHttpExpiresTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader)",
"return": "Long",
"signature": "Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"constructor": false,
"full_signature": "public Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"identifier": "getHttpCacheControlDuration",
"modifiers": "public",
"parameters": "(final String pHttpCacheControlHeader)",
"return": "Long",
"signature": "Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final HttpURLConnection pHttpURLConnection, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public Long getHttpExpiresTime(final String pHttpExpiresHeader) {\n if (pHttpExpiresHeader != null && pHttpExpiresHeader.length() > 0) {\n try {\n final Date dateExpires = Configuration.getInstance().getHttpHeaderDateTimeFormat().parse(pHttpExpiresHeader);\n return dateExpires.getTime();\n } catch (final Exception ex) {\n if (Configuration.getInstance().isDebugMapTileDownloader())\n Log.d(IMapView.LOGTAG, \"Unable to parse expiration tag for tile, server returned \" + pHttpExpiresHeader, ex);\n }\n }\n return null;\n }",
"class_method_signature": "TileSourcePolicy.getHttpExpiresTime(final String pHttpExpiresHeader)",
"constructor": false,
"full_signature": "public Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"identifier": "getHttpExpiresTime",
"invocations": [
"length",
"parse",
"getHttpHeaderDateTimeFormat",
"getInstance",
"getTime",
"isDebugMapTileDownloader",
"getInstance",
"d"
],
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader)",
"return": "Long",
"signature": "Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_32 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_bearingTo_east() {\n\t\tfinal GeoPoint target = new GeoPoint(0.0, 0.0);\n\t\tfinal GeoPoint other = new GeoPoint(0.0, 10.0);\n\t\tassertEquals(\"directly east\", 90, Math.round(target.bearingTo(other)));\n\t}",
"class_method_signature": "GeoPointTest.test_bearingTo_east()",
"constructor": false,
"full_signature": "@Test public void test_bearingTo_east()",
"identifier": "test_bearingTo_east",
"invocations": [
"assertEquals",
"round",
"bearingTo"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_bearingTo_east()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double bearingTo(final IGeoPoint other) {\n\t\tfinal double lat1 = Math.toRadians(this.mLatitude);\n\t\tfinal double long1 = Math.toRadians(this.mLongitude);\n\t\tfinal double lat2 = Math.toRadians(other.getLatitude());\n\t\tfinal double long2 = Math.toRadians(other.getLongitude());\n\t\tfinal double delta_long = long2 - long1;\n\t\tfinal double a = Math.sin(delta_long) * Math.cos(lat2);\n\t\tfinal double b = Math.cos(lat1) * Math.sin(lat2) -\n\t\t\t\t\t\t Math.sin(lat1) * Math.cos(lat2) * Math.cos(delta_long);\n\t\tfinal double bearing = Math.toDegrees(Math.atan2(a, b));\n\t\tfinal double bearing_normalized = (bearing + 360) % 360;\n\t\treturn bearing_normalized;\n\t}",
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"invocations": [
"toRadians",
"toRadians",
"toRadians",
"getLatitude",
"toRadians",
"getLongitude",
"sin",
"cos",
"cos",
"sin",
"sin",
"cos",
"cos",
"toDegrees",
"atan2"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_45 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOverlapsWorld() {\n\n // ________________\n // | | |\n // | | |\n // |------+-------|\n // | | |\n // | | |\n // ----------------\n //box is notated as *\n //test area is notated as &\n TileSystem ts = new TileSystemWebMercator();\n\n BoundingBox box = new BoundingBox(ts.getMaxLatitude(), 180, ts.getMinLatitude(), -180);\n Assert.assertTrue(box.overlaps(box, 4));\n\n BoundingBox farAway = new BoundingBox(45, 44, 44, 45);\n Assert.assertTrue(farAway.overlaps(farAway, 4));\n Assert.assertTrue(box.overlaps(farAway, 4));\n\n farAway = new BoundingBox(1, 44, 1, 45);\n Assert.assertTrue(farAway.overlaps(farAway, 4));\n Assert.assertTrue(box.overlaps(farAway, 4));\n\n farAway = new BoundingBox(2, 2, -2, -2);\n Assert.assertTrue(farAway.overlaps(farAway, 4));\n Assert.assertTrue(box.overlaps(farAway, 4));\n\n //this is completely within the test box\n farAway = new BoundingBox(0.5, 0.5, -0.5, -0.5);\n Assert.assertTrue(box.overlaps(farAway, 4));\n }",
"class_method_signature": "BoundingBoxTest.testOverlapsWorld()",
"constructor": false,
"full_signature": "@Test public void testOverlapsWorld()",
"identifier": "testOverlapsWorld",
"invocations": [
"getMaxLatitude",
"getMinLatitude",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps",
"assertTrue",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOverlapsWorld()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_12 | {
"fields": [],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/MapTileListBorderComputerTest.java",
"identifier": "MapTileListBorderComputerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTwoContiguousPointsModuloInclude() {\n final MapTileList source = new MapTileList();\n final MapTileList dest = new MapTileList();\n final Set<Long> set = new HashSet<>();\n final int border = 2;\n final MapTileListBorderComputer computer = new MapTileListBorderComputer(border, true);\n final int zoom = 5;\n final int sourceX = 1;\n final int sourceY = 31;\n source.put(MapTileIndex.getTileIndex(zoom, sourceX, sourceY));\n source.put(MapTileIndex.getTileIndex(zoom, sourceX + 1, sourceY));\n add(set, zoom, sourceX, sourceY, border);\n add(set, zoom, sourceX + 1, sourceY, border);\n computer.computeFromSource(source, dest);\n check(dest, set, zoom);\n }",
"class_method_signature": "MapTileListBorderComputerTest.testTwoContiguousPointsModuloInclude()",
"constructor": false,
"full_signature": "@Test public void testTwoContiguousPointsModuloInclude()",
"identifier": "testTwoContiguousPointsModuloInclude",
"invocations": [
"put",
"getTileIndex",
"put",
"getTileIndex",
"add",
"add",
"computeFromSource",
"check"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testTwoContiguousPointsModuloInclude()",
"testcase": true
} | {
"fields": [
{
"declarator": "mBorder",
"modifier": "private final",
"original_string": "private final int mBorder;",
"type": "int",
"var_name": "mBorder"
},
{
"declarator": "mIncludeAll",
"modifier": "private final",
"original_string": "private final boolean mIncludeAll;",
"type": "boolean",
"var_name": "mIncludeAll"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/MapTileListBorderComputer.java",
"identifier": "MapTileListBorderComputer",
"interfaces": "implements MapTileListComputer",
"methods": [
{
"class_method_signature": "MapTileListBorderComputer.MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"constructor": true,
"full_signature": "public MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"identifier": "MapTileListBorderComputer",
"modifiers": "public",
"parameters": "(final int pBorder, final boolean pIncludeAll)",
"return": "",
"signature": " MapTileListBorderComputer(final int pBorder, final boolean pIncludeAll)",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.getBorder()",
"constructor": false,
"full_signature": "public int getBorder()",
"identifier": "getBorder",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBorder()",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.isIncludeAll()",
"constructor": false,
"full_signature": "public boolean isIncludeAll()",
"identifier": "isIncludeAll",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isIncludeAll()",
"testcase": false
},
{
"class_method_signature": "MapTileListBorderComputer.computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"identifier": "computeFromSource",
"modifiers": "@Override public",
"parameters": "(final MapTileList pSource, final MapTileList pReuse)",
"return": "MapTileList",
"signature": "MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse) {\n final MapTileList out = pReuse != null ? pReuse : new MapTileList();\n for (int i = 0 ; i < pSource.getSize() ; i ++) {\n final long sourceIndex = pSource.get(i);\n final int zoom = MapTileIndex.getZoom(sourceIndex);\n final int sourceX = MapTileIndex.getX(sourceIndex);\n final int sourceY = MapTileIndex.getY(sourceIndex);\n final int power = 1 << zoom;\n for (int j = -mBorder ; j <= mBorder ; j ++) {\n for (int k = -mBorder ; k <= mBorder ; k ++) {\n int destX = sourceX + j;\n int destY = sourceY + k;\n while (destX < 0) {\n destX += power;\n }\n while (destY < 0) {\n destY += power;\n }\n while (destX >= power) {\n destX -= power;\n }\n while (destY >= power) {\n destY -= power;\n }\n final long index = MapTileIndex.getTileIndex(zoom, destX, destY);\n if (out.contains(index)) {\n continue;\n }\n if (pSource.contains(index) && !mIncludeAll) {\n continue;\n }\n out.put(index);\n }\n }\n }\n return out;\n }",
"class_method_signature": "MapTileListBorderComputer.computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"constructor": false,
"full_signature": "@Override public MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"identifier": "computeFromSource",
"invocations": [
"getSize",
"get",
"getZoom",
"getX",
"getY",
"getTileIndex",
"contains",
"contains",
"put"
],
"modifiers": "@Override public",
"parameters": "(final MapTileList pSource, final MapTileList pReuse)",
"return": "MapTileList",
"signature": "MapTileList computeFromSource(final MapTileList pSource, final MapTileList pReuse)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_53 | {
"fields": [
{
"declarator": "TOLERANCE = 1E-5",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 1E-5;",
"type": "double",
"var_name": "TOLERANCE"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/BoundingBoxTest.java",
"identifier": "BoundingBoxTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDrawSetupLowZoom2() {\n\n BoundingBox view = new BoundingBox(83.17404, 142.74437, -18.14585, 7.73437);\n //in some tests, this was disappearing when panning left (westard)\n BoundingBox drawing = new BoundingBox(69.65708, 112.85162, 48.45835, 76.64063);\n Assert.assertTrue(view.overlaps(drawing, 4));\n\n BoundingBox brokenView = new BoundingBox(83.18311, -167.51953, -18.31281, 57.48046);\n //this should be partially offscreen but still within the view and should still draw.\n Assert.assertTrue(brokenView.overlaps(drawing, 3));\n }",
"class_method_signature": "BoundingBoxTest.testDrawSetupLowZoom2()",
"constructor": false,
"full_signature": "@Test public void testDrawSetupLowZoom2()",
"identifier": "testDrawSetupLowZoom2",
"invocations": [
"assertTrue",
"overlaps",
"assertTrue",
"overlaps"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testDrawSetupLowZoom2()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_string": "private double mLatNorth;",
"type": "double",
"var_name": "mLatNorth"
},
{
"declarator": "mLatSouth",
"modifier": "private",
"original_string": "private double mLatSouth;",
"type": "double",
"var_name": "mLatSouth"
},
{
"declarator": "mLonEast",
"modifier": "private",
"original_string": "private double mLonEast;",
"type": "double",
"var_name": "mLonEast"
},
{
"declarator": "mLonWest",
"modifier": "private",
"original_string": "private double mLonWest;",
"type": "double",
"var_name": "mLonWest"
},
{
"declarator": "CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<BoundingBox> CREATOR = new Parcelable.Creator<BoundingBox>() {\n\t\t@Override\n\t\tpublic BoundingBox createFromParcel(final Parcel in) {\n\t\t\treturn readFromParcel(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic BoundingBox[] newArray(final int size) {\n\t\t\treturn new BoundingBox[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<BoundingBox>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/BoundingBox.java",
"identifier": "BoundingBox",
"interfaces": "implements Parcelable, Serializable",
"methods": [
{
"class_method_signature": "BoundingBox.BoundingBox(final double north, final double east, final double south, final double west)",
"constructor": true,
"full_signature": "public BoundingBox(final double north, final double east, final double south, final double west)",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "",
"signature": " BoundingBox(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.BoundingBox()",
"constructor": true,
"full_signature": "public BoundingBox()",
"identifier": "BoundingBox",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " BoundingBox()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.set(final double north, final double east, final double south, final double west)",
"constructor": false,
"full_signature": "public void set(final double north, final double east, final double south, final double west)",
"identifier": "set",
"modifiers": "public",
"parameters": "(final double north, final double east, final double south, final double west)",
"return": "void",
"signature": "void set(final double north, final double east, final double south, final double west)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.clone()",
"constructor": false,
"full_signature": "public BoundingBox clone()",
"identifier": "clone",
"modifiers": "public",
"parameters": "()",
"return": "BoundingBox",
"signature": "BoundingBox clone()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.concat(BoundingBox bb2)",
"constructor": false,
"full_signature": "public BoundingBox concat(BoundingBox bb2)",
"identifier": "concat",
"modifiers": "public",
"parameters": "(BoundingBox bb2)",
"return": "BoundingBox",
"signature": "BoundingBox concat(BoundingBox bb2)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenter()",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint getCenter()",
"identifier": "getCenter",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenter()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterWithDateLine()",
"constructor": false,
"full_signature": "public GeoPoint getCenterWithDateLine()",
"identifier": "getCenterWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint getCenterWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getDiagonalLengthInMeters()",
"constructor": false,
"full_signature": "public double getDiagonalLengthInMeters()",
"identifier": "getDiagonalLengthInMeters",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getDiagonalLengthInMeters()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatNorth()",
"constructor": false,
"full_signature": "public double getLatNorth()",
"identifier": "getLatNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatSouth()",
"constructor": false,
"full_signature": "public double getLatSouth()",
"identifier": "getLatSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLatitude()",
"constructor": false,
"full_signature": "public double getCenterLatitude()",
"identifier": "getCenterLatitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLatitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude()",
"constructor": false,
"full_signature": "public double getCenterLongitude()",
"identifier": "getCenterLongitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getCenterLongitude()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getCenterLongitude(final double pWest, final double pEast)",
"constructor": false,
"full_signature": "public static double getCenterLongitude(final double pWest, final double pEast)",
"identifier": "getCenterLongitude",
"modifiers": "public static",
"parameters": "(final double pWest, final double pEast)",
"return": "double",
"signature": "double getCenterLongitude(final double pWest, final double pEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualNorth()",
"constructor": false,
"full_signature": "public double getActualNorth()",
"identifier": "getActualNorth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualNorth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getActualSouth()",
"constructor": false,
"full_signature": "public double getActualSouth()",
"identifier": "getActualSouth",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getActualSouth()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonEast()",
"constructor": false,
"full_signature": "public double getLonEast()",
"identifier": "getLonEast",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonEast()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLonWest()",
"constructor": false,
"full_signature": "public double getLonWest()",
"identifier": "getLonWest",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLonWest()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpan()",
"constructor": false,
"full_signature": "public double getLatitudeSpan()",
"identifier": "getLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpan()",
"constructor": false,
"full_signature": "@Deprecated public double getLongitudeSpan()",
"identifier": "getLongitudeSpan",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatNorth(double mLatNorth)",
"constructor": false,
"full_signature": "public void setLatNorth(double mLatNorth)",
"identifier": "setLatNorth",
"modifiers": "public",
"parameters": "(double mLatNorth)",
"return": "void",
"signature": "void setLatNorth(double mLatNorth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLatSouth(double mLatSouth)",
"constructor": false,
"full_signature": "public void setLatSouth(double mLatSouth)",
"identifier": "setLatSouth",
"modifiers": "public",
"parameters": "(double mLatSouth)",
"return": "void",
"signature": "void setLatSouth(double mLatSouth)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonEast(double mLonEast)",
"constructor": false,
"full_signature": "public void setLonEast(double mLonEast)",
"identifier": "setLonEast",
"modifiers": "public",
"parameters": "(double mLonEast)",
"return": "void",
"signature": "void setLonEast(double mLonEast)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.setLonWest(double mLonWest)",
"constructor": false,
"full_signature": "public void setLonWest(double mLonWest)",
"identifier": "setLonWest",
"modifiers": "public",
"parameters": "(double mLonWest)",
"return": "void",
"signature": "void setLonWest(double mLonWest)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanWithDateLine()",
"constructor": false,
"full_signature": "public double getLongitudeSpanWithDateLine()",
"identifier": "getLongitudeSpanWithDateLine",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getLongitudeSpanWithDateLine()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithLinearInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"constructor": false,
"full_signature": "public PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"identifier": "getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"return": "PointF",
"signature": "PointF getRelativePositionOfGeoPointInBoundingBoxWithExactGudermannInterpolation(\n\t\t\tfinal double aLatitude, final double aLongitude, final PointF reuse)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithLinearInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithLinearInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"constructor": false,
"full_signature": "public GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"identifier": "getGeoPointOfRelativePositionWithExactGudermannInterpolation",
"modifiers": "public",
"parameters": "(final float relX,\n\t\t\tfinal float relY)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoPointOfRelativePositionWithExactGudermannInterpolation(final float relX,\n\t\t\tfinal float relY)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"constructor": false,
"full_signature": "public BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"identifier": "increaseByScale",
"modifiers": "public",
"parameters": "(final float pBoundingboxPaddingRelativeScale)",
"return": "BoundingBox",
"signature": "BoundingBox increaseByScale(final float pBoundingboxPaddingRelativeScale)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.bringToBoundingBox(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"identifier": "bringToBoundingBox",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "GeoPoint",
"signature": "GeoPoint bringToBoundingBox(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"identifier": "fromGeoPoints",
"modifiers": "public static",
"parameters": "(final List<? extends IGeoPoint> partialPolyLine)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPoints(final List<? extends IGeoPoint> partialPolyLine)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final IGeoPoint pGeoPoint)",
"constructor": false,
"full_signature": "public boolean contains(final IGeoPoint pGeoPoint)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeoPoint)",
"return": "boolean",
"signature": "boolean contains(final IGeoPoint pGeoPoint)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.contains(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public boolean contains(final double aLatitude, final double aLongitude)",
"identifier": "contains",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "boolean",
"signature": "boolean contains(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.writeToParcel(final Parcel out, final int arg1)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int arg1)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int arg1)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int arg1)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.readFromParcel(final Parcel in)",
"constructor": false,
"full_signature": "private static BoundingBox readFromParcel(final Parcel in)",
"identifier": "readFromParcel",
"modifiers": "private static",
"parameters": "(final Parcel in)",
"return": "BoundingBox",
"signature": "BoundingBox readFromParcel(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLatitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLatitudeSpanE6()",
"identifier": "getLatitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.getLongitudeSpanE6()",
"constructor": false,
"full_signature": "@Deprecated public int getLongitudeSpanE6()",
"identifier": "getLongitudeSpanE6",
"modifiers": "@Deprecated public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeSpanE6()",
"testcase": false
},
{
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
},
{
"class_method_signature": "BoundingBox.fromGeoPointsSafe(List<GeoPoint> points)",
"constructor": false,
"full_signature": "public static BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"identifier": "fromGeoPointsSafe",
"modifiers": "public static",
"parameters": "(List<GeoPoint> points)",
"return": "BoundingBox",
"signature": "BoundingBox fromGeoPointsSafe(List<GeoPoint> points)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom) {\n\n\t\t//FIXME this is a total hack but it works around a number of issues related to vertical map\n\t\t//replication and horiztonal replication that can cause polygons to completely disappear when\n\t\t//panning\n\t if (pZoom < 3)\n\t return true;\n\n\t\tboolean latMatch=false;\n\t\tboolean lonMatch=false;\n\n\t\t//vertical wrapping detection\n\t\tif (pBoundingBox.mLatSouth <= mLatNorth &&\n\t\t\tpBoundingBox.mLatSouth >= mLatSouth )\n\t\t\tlatMatch=true;\n\n\n\t\t//normal case, non overlapping\n\t\tif (mLonWest >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLonEast >= pBoundingBox.mLonWest && mLonWest <= pBoundingBox.mLonEast)\n\t\t\tlonMatch=true;\n\n\t\t//special case for when *this completely surrounds the pBoundbox\n\t\tif (mLonWest<=pBoundingBox.mLonWest &&\n\t\t\tmLonEast>=pBoundingBox.mLonEast &&\n\t\t\tmLatNorth>=pBoundingBox.mLatNorth &&\n\t\t\tmLatSouth<=pBoundingBox.mLatSouth)\n\t\t\treturn true;\n\n\t\t//normal case, non overlapping\n\t\tif (mLatNorth >= pBoundingBox.mLatSouth && mLatNorth <= mLatSouth)\n\t\t\tlatMatch=true;\n\t\t//normal case, non overlapping\n\t\tif (mLatSouth>= pBoundingBox.mLatSouth && mLatSouth <= mLatSouth)\n\t\t\tlatMatch=true;\n\n\t\tif (mLonWest > mLonEast) {\n\t\t\t//the date line is included in the bounding box\n\n\t\t\t//we want to match lon from the dateline to the eastern bounds of the box\n\t\t\t//and the dateline to the western bounds of the box\n\n\t\t\tif (mLonEast<=pBoundingBox.mLonEast && pBoundingBox.mLonWest >= mLonWest)\n\t\t\t\tlonMatch=true;\n\n\n\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}\n\t\t\t/*\n\t\t\t//that is completely within this\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast<= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\t\t\t\tif (pBoundingBox.mLonEast < mLonWest &&\n\t\t\t\t\tpBoundingBox.mLonWest < mLonWest)\n\t\t\t\t\tlonMatch = false;\n\n\t\t\t\tif (pBoundingBox.mLonEast > mLonEast &&\n\t\t\t\t\tpBoundingBox.mLonWest > mLonEast )\n\t\t\t\t\tlonMatch = false;\n\t\t\t}\n\t\t\tif (mLonWest>= pBoundingBox.mLonEast &&\n\t\t\t\tmLonEast>= pBoundingBox.mLonEast) {\n\t\t\t\tlonMatch = true;\n\n\t\t\t}*/\n\t\t}\n\n\t\treturn latMatch && lonMatch;\n\t}",
"class_method_signature": "BoundingBox.overlaps(final BoundingBox pBoundingBox, double pZoom)",
"constructor": false,
"full_signature": "public boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"identifier": "overlaps",
"invocations": [],
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, double pZoom)",
"return": "boolean",
"signature": "boolean overlaps(final BoundingBox pBoundingBox, double pZoom)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_28 | {
"fields": [
{
"declarator": "minimumDistance = 1E-2",
"modifier": "private static final",
"original_string": "private static final double minimumDistance = 1E-2;",
"type": "double",
"var_name": "minimumDistance"
},
{
"declarator": "random = new Random()",
"modifier": "private static",
"original_string": "private static Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/GeoPointTest.java",
"identifier": "GeoPointTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test_distanceTo_Equator() {\n\t\tfinal double ratioDelta = 1E-10;\n\t\tfinal int iterations = 100;\n\t\tfinal double latitude = 0;\n\t\tfor (int i = 0 ; i < iterations ; i ++) {\n\t\t\tfinal double longitude1 = getRandomLongitude();\n\t\t\tfinal double longitude2 = getRandomLongitude();\n\t\t\tfinal GeoPoint target = new GeoPoint(latitude, longitude1);\n\t\t\tfinal GeoPoint other = new GeoPoint(latitude, longitude2);\n\n\t\t\tfinal double diff = getCleanLongitudeDiff(longitude1, longitude2);\n\t\t\tfinal double expected = GeoConstants.RADIUS_EARTH_METERS * diff * MathConstants.DEG2RAD;\n\t\t\tif (expected < minimumDistance) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal double delta = expected * ratioDelta;\n\t\t\tassertEquals(\"distance between \" + target + \" and \" + other,\n\t\t\t\t\texpected, target.distanceToAsDouble(other), delta);\n\t\t}\n\t}",
"class_method_signature": "GeoPointTest.test_distanceTo_Equator()",
"constructor": false,
"full_signature": "@Test public void test_distanceTo_Equator()",
"identifier": "test_distanceTo_Equator",
"invocations": [
"getRandomLongitude",
"getRandomLongitude",
"getCleanLongitudeDiff",
"assertEquals",
"distanceToAsDouble"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test_distanceTo_Equator()",
"testcase": true
} | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original_string": "private double mLongitude;",
"type": "double",
"var_name": "mLongitude"
},
{
"declarator": "mLatitude",
"modifier": "private",
"original_string": "private double mLatitude;",
"type": "double",
"var_name": "mLatitude"
},
{
"declarator": "mAltitude",
"modifier": "private",
"original_string": "private double mAltitude;",
"type": "double",
"var_name": "mAltitude"
},
{
"declarator": "CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t}",
"modifier": "public static final",
"original_string": "public static final Parcelable.Creator<GeoPoint> CREATOR = new Parcelable.Creator<GeoPoint>() {\n\t\t@Override\n\t\tpublic GeoPoint createFromParcel(final Parcel in) {\n\t\t\treturn new GeoPoint(in);\n\t\t}\n\n\t\t@Override\n\t\tpublic GeoPoint[] newArray(final int size) {\n\t\t\treturn new GeoPoint[size];\n\t\t}\n\t};",
"type": "Parcelable.Creator<GeoPoint>",
"var_name": "CREATOR"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/GeoPoint.java",
"identifier": "GeoPoint",
"interfaces": "implements IGeoPoint, MathConstants, GeoConstants, Parcelable, Serializable, Cloneable",
"methods": [
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"constructor": true,
"full_signature": "@Deprecated public GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"identifier": "GeoPoint",
"modifiers": "@Deprecated public",
"parameters": "(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"return": "",
"signature": " GeoPoint(final int aLatitudeE6, final int aLongitudeE6, final int aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"constructor": true,
"full_signature": "public GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude, final double aAltitude)",
"return": "",
"signature": " GeoPoint(final double aLatitude, final double aLongitude, final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Location aLocation)",
"constructor": true,
"full_signature": "public GeoPoint(final Location aLocation)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final Location aLocation)",
"return": "",
"signature": " GeoPoint(final Location aLocation)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final GeoPoint aGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final GeoPoint aGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final GeoPoint aGeopoint)",
"return": "",
"signature": " GeoPoint(final GeoPoint aGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final IGeoPoint pGeopoint)",
"constructor": true,
"full_signature": "public GeoPoint(final IGeoPoint pGeopoint)",
"identifier": "GeoPoint",
"modifiers": "public",
"parameters": "(final IGeoPoint pGeopoint)",
"return": "",
"signature": " GeoPoint(final IGeoPoint pGeopoint)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromDoubleString(final String s, final char spacer)",
"identifier": "fromDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromInvertedDoubleString(final String s, final char spacer)",
"constructor": false,
"full_signature": "public static GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"identifier": "fromInvertedDoubleString",
"modifiers": "public static",
"parameters": "(final String s, final char spacer)",
"return": "GeoPoint",
"signature": "GeoPoint fromInvertedDoubleString(final String s, final char spacer)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromIntString(final String s)",
"constructor": false,
"full_signature": "@Deprecated public static GeoPoint fromIntString(final String s)",
"identifier": "fromIntString",
"modifiers": "@Deprecated public static",
"parameters": "(final String s)",
"return": "GeoPoint",
"signature": "GeoPoint fromIntString(final String s)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitude()",
"constructor": false,
"full_signature": "@Override public double getLongitude()",
"identifier": "getLongitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLongitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitude()",
"constructor": false,
"full_signature": "@Override public double getLatitude()",
"identifier": "getLatitude",
"modifiers": "@Override public",
"parameters": "()",
"return": "double",
"signature": "double getLatitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getAltitude()",
"constructor": false,
"full_signature": "public double getAltitude()",
"identifier": "getAltitude",
"modifiers": "public",
"parameters": "()",
"return": "double",
"signature": "double getAltitude()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLatitude(final double aLatitude)",
"constructor": false,
"full_signature": "public void setLatitude(final double aLatitude)",
"identifier": "setLatitude",
"modifiers": "public",
"parameters": "(final double aLatitude)",
"return": "void",
"signature": "void setLatitude(final double aLatitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setLongitude(final double aLongitude)",
"constructor": false,
"full_signature": "public void setLongitude(final double aLongitude)",
"identifier": "setLongitude",
"modifiers": "public",
"parameters": "(final double aLongitude)",
"return": "void",
"signature": "void setLongitude(final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setAltitude(final double aAltitude)",
"constructor": false,
"full_signature": "public void setAltitude(final double aAltitude)",
"identifier": "setAltitude",
"modifiers": "public",
"parameters": "(final double aAltitude)",
"return": "void",
"signature": "void setAltitude(final double aAltitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.setCoords(final double aLatitude, final double aLongitude)",
"constructor": false,
"full_signature": "public void setCoords(final double aLatitude, final double aLongitude)",
"identifier": "setCoords",
"modifiers": "public",
"parameters": "(final double aLatitude, final double aLongitude)",
"return": "void",
"signature": "void setCoords(final double aLatitude, final double aLongitude)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.clone()",
"constructor": false,
"full_signature": "@Override public GeoPoint clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "GeoPoint",
"signature": "GeoPoint clone()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toIntString()",
"constructor": false,
"full_signature": "public String toIntString()",
"identifier": "toIntString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toIntString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.equals(final Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(final Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(final Object obj)",
"return": "boolean",
"signature": "boolean equals(final Object obj)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.GeoPoint(final Parcel in)",
"constructor": true,
"full_signature": "private GeoPoint(final Parcel in)",
"identifier": "GeoPoint",
"modifiers": "private",
"parameters": "(final Parcel in)",
"return": "",
"signature": " GeoPoint(final Parcel in)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.describeContents()",
"constructor": false,
"full_signature": "@Override public int describeContents()",
"identifier": "describeContents",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int describeContents()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.writeToParcel(final Parcel out, final int flags)",
"constructor": false,
"full_signature": "@Override public void writeToParcel(final Parcel out, final int flags)",
"identifier": "writeToParcel",
"modifiers": "@Override public",
"parameters": "(final Parcel out, final int flags)",
"return": "void",
"signature": "void writeToParcel(final Parcel out, final int flags)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.bearingTo(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double bearingTo(final IGeoPoint other)",
"identifier": "bearingTo",
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double bearingTo(final IGeoPoint other)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"constructor": false,
"full_signature": "public GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"identifier": "destinationPoint",
"modifiers": "public",
"parameters": "(final double aDistanceInMeters, final double aBearingInDegrees)",
"return": "GeoPoint",
"signature": "GeoPoint destinationPoint(final double aDistanceInMeters, final double aBearingInDegrees)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"constructor": false,
"full_signature": "public static GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"identifier": "fromCenterBetween",
"modifiers": "public static",
"parameters": "(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"return": "GeoPoint",
"signature": "GeoPoint fromCenterBetween(final GeoPoint geoPointA, final GeoPoint geoPointB)",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toDoubleString()",
"constructor": false,
"full_signature": "public String toDoubleString()",
"identifier": "toDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.toInvertedDoubleString()",
"constructor": false,
"full_signature": "public String toInvertedDoubleString()",
"identifier": "toInvertedDoubleString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toInvertedDoubleString()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLatitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLatitudeE6()",
"identifier": "getLatitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLatitudeE6()",
"testcase": false
},
{
"class_method_signature": "GeoPoint.getLongitudeE6()",
"constructor": false,
"full_signature": "@Deprecated @Override public int getLongitudeE6()",
"identifier": "getLongitudeE6",
"modifiers": "@Deprecated @Override public",
"parameters": "()",
"return": "int",
"signature": "int getLongitudeE6()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double distanceToAsDouble(final IGeoPoint other) {\n\t\tfinal double lat1 = DEG2RAD * getLatitude();\n\t\tfinal double lat2 = DEG2RAD * other.getLatitude();\n\t\tfinal double lon1 = DEG2RAD * getLongitude();\n\t\tfinal double lon2 = DEG2RAD * other.getLongitude();\n\t\treturn RADIUS_EARTH_METERS * 2 * Math.asin(Math.min(1, Math.sqrt(\n\t\t\t\tMath.pow(Math.sin((lat2 - lat1) / 2), 2)\n\t\t\t\t+ Math.cos(lat1) * Math.cos(lat2)\n\t\t\t\t* Math.pow(Math.sin((lon2 - lon1) / 2), 2)\n\t\t)));\n\t}",
"class_method_signature": "GeoPoint.distanceToAsDouble(final IGeoPoint other)",
"constructor": false,
"full_signature": "public double distanceToAsDouble(final IGeoPoint other)",
"identifier": "distanceToAsDouble",
"invocations": [
"getLatitude",
"getLatitude",
"getLongitude",
"getLongitude",
"asin",
"min",
"sqrt",
"pow",
"sin",
"cos",
"cos",
"pow",
"sin"
],
"modifiers": "public",
"parameters": "(final IGeoPoint other)",
"return": "double",
"signature": "double distanceToAsDouble(final IGeoPoint other)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_69 | {
"fields": [
{
"declarator": "mCacheControlValue = 172800",
"modifier": "private final",
"original_string": "private final long mCacheControlValue = 172800;",
"type": "long",
"var_name": "mCacheControlValue"
},
{
"declarator": "mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringOK = {\"max-age=172800, public\", \"public, max-age=172800\", \"max-age=172800\"};",
"type": "String[]",
"var_name": "mCacheControlStringOK"
},
{
"declarator": "mCacheControlStringKO = {\"max-age=, public\", \"public\"}",
"modifier": "private final",
"original_string": "private final String[] mCacheControlStringKO = {\"max-age=, public\", \"public\"};",
"type": "String[]",
"var_name": "mCacheControlStringKO"
},
{
"declarator": "mExpiresValue = 1539971220000L",
"modifier": "private final",
"original_string": "private final long mExpiresValue = 1539971220000L;",
"type": "long",
"var_name": "mExpiresValue"
},
{
"declarator": "mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringOK = {\"Fri, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringOK"
},
{
"declarator": "mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"}",
"modifier": "private final",
"original_string": "private final String[] mExpiresStringKO = {\"Frfgi, 19 Oct 2018 17:47:00 GMT\"};",
"type": "String[]",
"var_name": "mExpiresStringKO"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicyTest.java",
"identifier": "TileSourcePolicyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomExpirationTimeWithHttpConnection() {\n final long twentyMinutesInMillis = 20 * 60 * 1000;\n final long thirtyMinutesInMillis = 30 * 60 * 1000;\n final HttpURLConnection dummyConnection = new HttpURLConnection(null) {\n @Override\n public void disconnect() { }\n\n @Override\n public boolean usingProxy() {\n return false;\n }\n\n @Override\n public void connect() { }\n\n @Override\n public String getHeaderField(String name) {\n return null;\n }\n };\n final TileSourcePolicy tileSourcePolicy = new TileSourcePolicy() {\n @Override\n public long computeExpirationTime(String pHttpExpiresHeader, String pHttpCacheControlHeader, long pNow) {\n return pNow + twentyMinutesInMillis;\n }\n\n @Override\n public long computeExpirationTime(HttpURLConnection pHttpURLConnection, long pNow) {\n return pNow + thirtyMinutesInMillis;\n }\n };\n final long now = System.currentTimeMillis();\n final long expected = now + thirtyMinutesInMillis;\n Assert.assertEquals(\n expected,\n tileSourcePolicy.computeExpirationTime(dummyConnection, now));\n }",
"class_method_signature": "TileSourcePolicyTest.testCustomExpirationTimeWithHttpConnection()",
"constructor": false,
"full_signature": "@Test public void testCustomExpirationTimeWithHttpConnection()",
"identifier": "testCustomExpirationTimeWithHttpConnection",
"invocations": [
"currentTimeMillis",
"assertEquals",
"computeExpirationTime"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCustomExpirationTimeWithHttpConnection()",
"testcase": true
} | {
"fields": [
{
"declarator": "FLAG_NO_BULK = 1",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_BULK = 1;",
"type": "int",
"var_name": "FLAG_NO_BULK"
},
{
"declarator": "FLAG_NO_PREVENTIVE = 2",
"modifier": "public static final",
"original_string": "public static final int FLAG_NO_PREVENTIVE = 2;",
"type": "int",
"var_name": "FLAG_NO_PREVENTIVE"
},
{
"declarator": "FLAG_USER_AGENT_MEANINGFUL = 4",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_MEANINGFUL = 4;",
"type": "int",
"var_name": "FLAG_USER_AGENT_MEANINGFUL"
},
{
"declarator": "FLAG_USER_AGENT_NORMALIZED = 8",
"modifier": "public static final",
"original_string": "public static final int FLAG_USER_AGENT_NORMALIZED = 8;",
"type": "int",
"var_name": "FLAG_USER_AGENT_NORMALIZED"
},
{
"declarator": "mMaxConcurrent",
"modifier": "private final",
"original_string": "private final int mMaxConcurrent;",
"type": "int",
"var_name": "mMaxConcurrent"
},
{
"declarator": "mFlags",
"modifier": "private final",
"original_string": "private final int mFlags;",
"type": "int",
"var_name": "mFlags"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/tileprovider/tilesource/TileSourcePolicy.java",
"identifier": "TileSourcePolicy",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy()",
"constructor": true,
"full_signature": "public TileSourcePolicy()",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " TileSourcePolicy()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"constructor": true,
"full_signature": "public TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"identifier": "TileSourcePolicy",
"modifiers": "public",
"parameters": "(final int pMaxConcurrent,\n final int pFlags)",
"return": "",
"signature": " TileSourcePolicy(final int pMaxConcurrent,\n final int pFlags)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getMaxConcurrent()",
"constructor": false,
"full_signature": "public int getMaxConcurrent()",
"identifier": "getMaxConcurrent",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getMaxConcurrent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsBulkDownload()",
"constructor": false,
"full_signature": "public boolean acceptsBulkDownload()",
"identifier": "acceptsBulkDownload",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsBulkDownload()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsMeaninglessUserAgent()",
"constructor": false,
"full_signature": "private boolean acceptsMeaninglessUserAgent()",
"identifier": "acceptsMeaninglessUserAgent",
"modifiers": "private",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsMeaninglessUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.normalizesUserAgent()",
"constructor": false,
"full_signature": "public boolean normalizesUserAgent()",
"identifier": "normalizesUserAgent",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean normalizesUserAgent()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsPreventive()",
"constructor": false,
"full_signature": "public boolean acceptsPreventive()",
"identifier": "acceptsPreventive",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean acceptsPreventive()",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.acceptsUserAgent(final String pUserAgent)",
"constructor": false,
"full_signature": "public boolean acceptsUserAgent(final String pUserAgent)",
"identifier": "acceptsUserAgent",
"modifiers": "public",
"parameters": "(final String pUserAgent)",
"return": "boolean",
"signature": "boolean acceptsUserAgent(final String pUserAgent)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpExpiresTime(final String pHttpExpiresHeader)",
"constructor": false,
"full_signature": "public Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"identifier": "getHttpExpiresTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader)",
"return": "Long",
"signature": "Long getHttpExpiresTime(final String pHttpExpiresHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"constructor": false,
"full_signature": "public Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"identifier": "getHttpCacheControlDuration",
"modifiers": "public",
"parameters": "(final String pHttpCacheControlHeader)",
"return": "Long",
"signature": "Long getHttpCacheControlDuration(final String pHttpCacheControlHeader)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"testcase": false
},
{
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"identifier": "computeExpirationTime",
"modifiers": "public",
"parameters": "(final HttpURLConnection pHttpURLConnection, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow) {\n final Long override=Configuration.getInstance().getExpirationOverrideDuration();\n if (override != null) {\n return pNow + override;\n }\n\n final long extension = Configuration.getInstance().getExpirationExtendedDuration();\n final Long cacheControlDuration = getHttpCacheControlDuration(pHttpCacheControlHeader);\n if (cacheControlDuration != null) {\n return pNow + cacheControlDuration * 1000 + extension;\n }\n\n final Long httpExpiresTime = getHttpExpiresTime(pHttpExpiresHeader);\n if (httpExpiresTime != null) {\n return httpExpiresTime + extension;\n }\n\n return pNow + OpenStreetMapTileProviderConstants.DEFAULT_MAXIMUM_CACHED_FILE_AGE + extension;\n }",
"class_method_signature": "TileSourcePolicy.computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"constructor": false,
"full_signature": "public long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"identifier": "computeExpirationTime",
"invocations": [
"getExpirationOverrideDuration",
"getInstance",
"getExpirationExtendedDuration",
"getInstance",
"getHttpCacheControlDuration",
"getHttpExpiresTime"
],
"modifiers": "public",
"parameters": "(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"return": "long",
"signature": "long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
17488986_3 | {
"fields": [
{
"declarator": "random = new Random()",
"modifier": "private static final",
"original_string": "private static final Random random = new Random();",
"type": "Random",
"var_name": "random"
},
{
"declarator": "XY01Delta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double XY01Delta = 1E-10;",
"type": "double",
"var_name": "XY01Delta"
},
{
"declarator": "latLongDelta = 1E-10",
"modifier": "private static final",
"original_string": "private static final double latLongDelta = 1E-10;",
"type": "double",
"var_name": "latLongDelta"
},
{
"declarator": "mMinZoomLevel = 0",
"modifier": "private static final",
"original_string": "private static final int mMinZoomLevel = 0;",
"type": "int",
"var_name": "mMinZoomLevel"
},
{
"declarator": "mMaxZoomLevel = TileSystem.getMaximumZoomLevel()",
"modifier": "private static final",
"original_string": "private static final int mMaxZoomLevel = TileSystem.getMaximumZoomLevel();",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "tileSystem = new TileSystemWebMercator()",
"modifier": "private static final",
"original_string": "private static final TileSystem tileSystem = new TileSystemWebMercator();",
"type": "TileSystem",
"var_name": "tileSystem"
}
],
"file": "osmdroid-android/src/test/java/org/osmdroid/util/TileSystemTest.java",
"identifier": "TileSystemTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetLongitudeFromX01() {\n final int iterations = 10;\n for (int i = 0 ; i <= iterations ; i ++) {\n final double longitude = tileSystem.getMinLongitude() + i * (tileSystem.getMaxLongitude() - tileSystem.getMinLongitude()) / iterations;\n checkLongitude(longitude, tileSystem.getLongitudeFromX01(((double)i) / iterations, true));\n }\n checkLongitude(tileSystem.getMinLongitude(), tileSystem.getLongitudeFromX01(0, true));\n checkLongitude(0, tileSystem.getLongitudeFromX01(0.5, true));\n checkLongitude(tileSystem.getMaxLongitude(), tileSystem.getLongitudeFromX01(1, true));\n }",
"class_method_signature": "TileSystemTest.testGetLongitudeFromX01()",
"constructor": false,
"full_signature": "@Test public void testGetLongitudeFromX01()",
"identifier": "testGetLongitudeFromX01",
"invocations": [
"getMinLongitude",
"getMaxLongitude",
"getMinLongitude",
"checkLongitude",
"getLongitudeFromX01",
"checkLongitude",
"getMinLongitude",
"getLongitudeFromX01",
"checkLongitude",
"getLongitudeFromX01",
"checkLongitude",
"getMaxLongitude",
"getLongitudeFromX01"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetLongitudeFromX01()",
"testcase": true
} | {
"fields": [
{
"declarator": "EarthRadius = GeoConstants.RADIUS_EARTH_METERS",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double EarthRadius = GeoConstants.RADIUS_EARTH_METERS;",
"type": "double",
"var_name": "EarthRadius"
},
{
"declarator": "MinLatitude = -85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLatitude = -85.05112877980659;",
"type": "double",
"var_name": "MinLatitude"
},
{
"declarator": "MaxLatitude = 85.05112877980659",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLatitude = 85.05112877980659;",
"type": "double",
"var_name": "MaxLatitude"
},
{
"declarator": "MinLongitude = -180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MinLongitude = -180d;",
"type": "double",
"var_name": "MinLongitude"
},
{
"declarator": "MaxLongitude = 180d",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final double MaxLongitude = 180d;",
"type": "double",
"var_name": "MaxLongitude"
},
{
"declarator": "mTileSize = 256",
"modifier": "private static",
"original_string": "private static int mTileSize = 256;",
"type": "int",
"var_name": "mTileSize"
},
{
"declarator": "primaryKeyMaxZoomLevel = 29",
"modifier": "public static final",
"original_string": "public static final int primaryKeyMaxZoomLevel = 29;",
"type": "int",
"var_name": "primaryKeyMaxZoomLevel"
},
{
"declarator": "projectionZoomLevel = primaryKeyMaxZoomLevel + 1",
"modifier": "@Deprecated\n\tpublic static final",
"original_string": "@Deprecated\n\tpublic static final int projectionZoomLevel = primaryKeyMaxZoomLevel + 1;",
"type": "int",
"var_name": "projectionZoomLevel"
},
{
"declarator": "mMaxZoomLevel = primaryKeyMaxZoomLevel",
"modifier": "private static",
"original_string": "private static int mMaxZoomLevel = primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
}
],
"file": "osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java",
"identifier": "TileSystem",
"interfaces": "",
"methods": [
{
"class_method_signature": "TileSystem.setTileSize(final int tileSize)",
"constructor": false,
"full_signature": "public static void setTileSize(final int tileSize)",
"identifier": "setTileSize",
"modifiers": "public static",
"parameters": "(final int tileSize)",
"return": "void",
"signature": "void setTileSize(final int tileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize()",
"constructor": false,
"full_signature": "public static int getTileSize()",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getTileSize()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaximumZoomLevel()",
"constructor": false,
"full_signature": "public static int getMaximumZoomLevel()",
"identifier": "getMaximumZoomLevel",
"modifiers": "public static",
"parameters": "()",
"return": "int",
"signature": "int getMaximumZoomLevel()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getTileSize(final double pZoomLevel)",
"identifier": "getTileSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getTileSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getInputTileZoomLevel(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static int getInputTileZoomLevel(final double pZoomLevel)",
"identifier": "getInputTileZoomLevel",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "int",
"signature": "int getInputTileZoomLevel(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final int levelOfDetail)",
"constructor": false,
"full_signature": "@Deprecated public static int MapSize(final int levelOfDetail)",
"identifier": "MapSize",
"modifiers": "@Deprecated public static",
"parameters": "(final int levelOfDetail)",
"return": "int",
"signature": "int MapSize(final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapSize(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double MapSize(final double pZoomLevel)",
"identifier": "MapSize",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double MapSize(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getFactor(final double pZoomLevel)",
"constructor": false,
"full_signature": "public static double getFactor(final double pZoomLevel)",
"identifier": "getFactor",
"modifiers": "public static",
"parameters": "(final double pZoomLevel)",
"return": "double",
"signature": "double getFactor(final double pZoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final int levelOfDetail)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolution(final double latitude, final double zoomLevel)",
"constructor": false,
"full_signature": "public static double GroundResolution(final double latitude, final double zoomLevel)",
"identifier": "GroundResolution",
"modifiers": "public static",
"parameters": "(final double latitude, final double zoomLevel)",
"return": "double",
"signature": "double GroundResolution(final double latitude, final double zoomLevel)",
"testcase": false
},
{
"class_method_signature": "TileSystem.GroundResolutionMapSize(double latitude, final double mapSize)",
"constructor": false,
"full_signature": "public static double GroundResolutionMapSize(double latitude, final double mapSize)",
"identifier": "GroundResolutionMapSize",
"modifiers": "public static",
"parameters": "(double latitude, final double mapSize)",
"return": "double",
"signature": "double GroundResolutionMapSize(double latitude, final double mapSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"constructor": false,
"full_signature": "public static double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"identifier": "MapScale",
"modifiers": "public static",
"parameters": "(final double latitude, final int levelOfDetail, final int screenDpi)",
"return": "double",
"signature": "double MapScale(final double latitude, final int levelOfDetail, final int screenDpi)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"return": "Point",
"signature": "Point LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final int levelOfDetail, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"identifier": "LatLongToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXY(\n\t\t\tfinal double latitude, final double longitude, final double zoomLevel, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"identifier": "LatLongToPixelXYMapSize",
"modifiers": "@Deprecated public",
"parameters": "(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"return": "PointL",
"signature": "PointL LatLongToPixelXYMapSize(double latitude, double longitude,\n\t\t\t\t\t\t\t\t\t\t\t\t final double mapSize, final PointL reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final int levelOfDetail, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLong",
"modifiers": "@Deprecated public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLong(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongWithoutWrap",
"modifiers": "public",
"parameters": "(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongWithoutWrap(\n\t\t\tfinal int pixelX, final int pixelY, final double zoomLevel, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"identifier": "getX01FromLongitude",
"modifiers": "public",
"parameters": "(double longitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(double latitude, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"identifier": "getY01FromLatitude",
"modifiers": "public",
"parameters": "(double latitude, boolean wrapEnabled)",
"return": "double",
"signature": "double getY01FromLatitude(double latitude, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getX01FromLongitude(double longitude)",
"constructor": false,
"full_signature": "abstract public double getX01FromLongitude(double longitude)",
"identifier": "getX01FromLongitude",
"modifiers": "abstract public",
"parameters": "(double longitude)",
"return": "double",
"signature": "double getX01FromLongitude(double longitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getY01FromLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "abstract public double getY01FromLatitude(final double pLatitude)",
"identifier": "getY01FromLatitude",
"modifiers": "abstract public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double getY01FromLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "@Deprecated public GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"identifier": "PixelXYToLatLongMapSize",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSize(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse, boolean horizontalWrapEnabled,\n\t\t\tboolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"constructor": false,
"full_signature": "public GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"identifier": "PixelXYToLatLongMapSizeWithoutWrap",
"modifiers": "public",
"parameters": "(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"return": "GeoPoint",
"signature": "GeoPoint PixelXYToLatLongMapSizeWithoutWrap(final int pixelX, final int pixelY,\n\t\t\tfinal double mapSize, final GeoPoint reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final double n, final double minValue, final double maxValue)",
"constructor": false,
"full_signature": "public static double Clip(final double n, final double minValue, final double maxValue)",
"identifier": "Clip",
"modifiers": "public static",
"parameters": "(final double n, final double minValue, final double maxValue)",
"return": "double",
"signature": "double Clip(final double n, final double minValue, final double maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pixelX, final int pixelY, final Point reuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pixelX, final int pixelY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"return": "Point",
"signature": "Point PixelXYToTileXY(final int pPixelX, final int pPixelY, final double pTileSize, final Point pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "@Deprecated public Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"identifier": "PixelXYToTileXY",
"modifiers": "@Deprecated public",
"parameters": "(final Rect rect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect PixelXYToTileXY(final Rect rect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"constructor": false,
"full_signature": "@Deprecated public Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int tileX, final int tileY, final Point reuse)",
"return": "Point",
"signature": "Point TileXYToPixelXY(final int tileX, final int tileY, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"constructor": false,
"full_signature": "@Deprecated public PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"identifier": "TileXYToPixelXY",
"modifiers": "@Deprecated public",
"parameters": "(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"return": "PointL",
"signature": "PointL TileXYToPixelXY(final int pTileX, final int pTileY, final double pTileSize, final PointL pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"constructor": false,
"full_signature": "public static String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"identifier": "TileXYToQuadKey",
"modifiers": "public static",
"parameters": "(final int tileX, final int tileY, final int levelOfDetail)",
"return": "String",
"signature": "String TileXYToQuadKey(final int tileX, final int tileY, final int levelOfDetail)",
"testcase": false
},
{
"class_method_signature": "TileSystem.QuadKeyToTileXY(final String quadKey, final Point reuse)",
"constructor": false,
"full_signature": "public static Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"identifier": "QuadKeyToTileXY",
"modifiers": "public static",
"parameters": "(final String quadKey, final Point reuse)",
"return": "Point",
"signature": "Point QuadKeyToTileXY(final String quadKey, final Point reuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"identifier": "getBoundingBoxZoom",
"modifiers": "public",
"parameters": "(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"return": "double",
"signature": "double getBoundingBoxZoom(final BoundingBox pBoundingBox, final int pScreenWidth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"constructor": false,
"full_signature": "public double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"identifier": "getLongitudeZoom",
"modifiers": "public",
"parameters": "(final double pEast, final double pWest, final int pScreenWidth)",
"return": "double",
"signature": "double getLongitudeZoom(final double pEast, final double pWest, final int pScreenWidth)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"constructor": false,
"full_signature": "public double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"identifier": "getLatitudeZoom",
"modifiers": "public",
"parameters": "(final double pNorth, final double pSouth, final int pScreenHeight)",
"return": "double",
"signature": "double getLatitudeZoom(final double pNorth, final double pSouth, final int pScreenHeight)",
"testcase": false
},
{
"class_method_signature": "TileSystem.wrap(double n, final double minValue, final double maxValue, final double interval)",
"constructor": false,
"full_signature": "private static double wrap(double n, final double minValue, final double maxValue, final double interval)",
"identifier": "wrap",
"modifiers": "private static",
"parameters": "(double n, final double minValue, final double maxValue, final double interval)",
"return": "double",
"signature": "double wrap(double n, final double minValue, final double maxValue, final double interval)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorYFromLatitude(final double pLatitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorXFromLongitude(final double pLongitude, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"identifier": "getMercatorFromXY01",
"modifiers": "public",
"parameters": "(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getMercatorFromXY01(final double pXY01, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"identifier": "getLatitudeFromY01",
"modifiers": "public",
"parameters": "(final double pY01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromY01(final double pY01)",
"constructor": false,
"full_signature": "abstract public double getLatitudeFromY01(final double pY01)",
"identifier": "getLatitudeFromY01",
"modifiers": "abstract public",
"parameters": "(final double pY01)",
"return": "double",
"signature": "double getLatitudeFromY01(final double pY01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01)",
"constructor": false,
"full_signature": "abstract public double getLongitudeFromX01(final double pX01)",
"identifier": "getLongitudeFromX01",
"modifiers": "abstract public",
"parameters": "(final double pX01)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"identifier": "getCleanMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"return": "long",
"signature": "long getCleanMercator(final long pMercator, final double pMercatorMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"constructor": false,
"full_signature": "public static long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"identifier": "ClipToLong",
"modifiers": "public static",
"parameters": "(final double pValue, final double pMax, final boolean pWrapEnabled)",
"return": "long",
"signature": "long ClipToLong(final double pValue, final double pMax, final boolean pWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.Clip(final long n, final long minValue, final long maxValue)",
"constructor": false,
"full_signature": "@Deprecated public static long Clip(final long n, final long minValue, final long maxValue)",
"identifier": "Clip",
"modifiers": "@Deprecated public static",
"parameters": "(final long n, final long minValue, final long maxValue)",
"return": "long",
"signature": "long Clip(final long n, final long minValue, final long maxValue)",
"testcase": false
},
{
"class_method_signature": "TileSystem.truncateToInt(final long value)",
"constructor": false,
"full_signature": "public static int truncateToInt(final long value)",
"identifier": "truncateToInt",
"modifiers": "public static",
"parameters": "(final long value)",
"return": "int",
"signature": "int truncateToInt(final long value)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"identifier": "getMercatorFromGeo",
"modifiers": "public",
"parameters": "(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"return": "PointL",
"signature": "PointL getMercatorFromGeo(final double pLatitude, final double pLongitude, final double pMapSize, final PointL pReuse, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"constructor": false,
"full_signature": "public GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"identifier": "getGeoFromMercator",
"modifiers": "public",
"parameters": "(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"return": "GeoPoint",
"signature": "GeoPoint getGeoFromMercator(final long pMercatorX, final long pMercatorY, final double pMapSize, final GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"identifier": "getXY01FromMercator",
"modifiers": "public",
"parameters": "(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"return": "double",
"signature": "double getXY01FromMercator(final long pMercator, final double pMapSize, boolean wrapEnabled)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLongitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLongitude(final double pRandom01)",
"identifier": "getRandomLongitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLongitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01, final double pMinLatitude)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01, final double pMinLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getRandomLatitude(final double pRandom01)",
"constructor": false,
"full_signature": "public double getRandomLatitude(final double pRandom01)",
"identifier": "getRandomLatitude",
"modifiers": "public",
"parameters": "(final double pRandom01)",
"return": "double",
"signature": "double getRandomLatitude(final double pRandom01)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final long pMercator, final double pTileSize)",
"constructor": false,
"full_signature": "public static int getTileFromMercator(final long pMercator, final double pTileSize)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final long pMercator, final double pTileSize)",
"return": "int",
"signature": "int getTileFromMercator(final long pMercator, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"constructor": false,
"full_signature": "public static Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"identifier": "getTileFromMercator",
"modifiers": "public static",
"parameters": "(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"return": "Rect",
"signature": "Rect getTileFromMercator(final RectL pMercatorRect, final double pTileSize, final Rect pReuse)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMercatorFromTile(final int pTile, final double pTileSize)",
"constructor": false,
"full_signature": "public static long getMercatorFromTile(final int pTile, final double pTileSize)",
"identifier": "getMercatorFromTile",
"modifiers": "public static",
"parameters": "(final int pTile, final double pTileSize)",
"return": "long",
"signature": "long getMercatorFromTile(final int pTile, final double pTileSize)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLatitude()",
"constructor": false,
"full_signature": "abstract public double getMinLatitude()",
"identifier": "getMinLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLatitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLatitude()",
"identifier": "getMaxLatitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLatitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMinLongitude()",
"constructor": false,
"full_signature": "abstract public double getMinLongitude()",
"identifier": "getMinLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMinLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getMaxLongitude()",
"constructor": false,
"full_signature": "abstract public double getMaxLongitude()",
"identifier": "getMaxLongitude",
"modifiers": "abstract public",
"parameters": "()",
"return": "double",
"signature": "double getMaxLongitude()",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public double cleanLongitude(final double pLongitude)",
"identifier": "cleanLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "double",
"signature": "double cleanLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.cleanLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public double cleanLatitude(final double pLatitude)",
"identifier": "cleanLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "double",
"signature": "double cleanLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLongitude(final double pLongitude)",
"constructor": false,
"full_signature": "public boolean isValidLongitude(final double pLongitude)",
"identifier": "isValidLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude)",
"return": "boolean",
"signature": "boolean isValidLongitude(final double pLongitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.isValidLatitude(final double pLatitude)",
"constructor": false,
"full_signature": "public boolean isValidLatitude(final double pLatitude)",
"identifier": "isValidLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude)",
"return": "boolean",
"signature": "boolean isValidLatitude(final double pLatitude)",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLongitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLongitudeSpan()",
"identifier": "toStringLongitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLongitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.toStringLatitudeSpan()",
"constructor": false,
"full_signature": "public String toStringLatitudeSpan()",
"identifier": "toStringLatitudeSpan",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toStringLatitudeSpan()",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileXFromLongitude(final double pLongitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"identifier": "getTileXFromLongitude",
"modifiers": "public",
"parameters": "(final double pLongitude, final int pZoom)",
"return": "int",
"signature": "int getTileXFromLongitude(final double pLongitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getTileYFromLatitude(final double pLatitude, final int pZoom)",
"constructor": false,
"full_signature": "public int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"identifier": "getTileYFromLatitude",
"modifiers": "public",
"parameters": "(final double pLatitude, final int pZoom)",
"return": "int",
"signature": "int getTileYFromLatitude(final double pLatitude, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLatitudeFromTileY(final int pY, final int pZoom)",
"constructor": false,
"full_signature": "public double getLatitudeFromTileY(final int pY, final int pZoom)",
"identifier": "getLatitudeFromTileY",
"modifiers": "public",
"parameters": "(final int pY, final int pZoom)",
"return": "double",
"signature": "double getLatitudeFromTileY(final int pY, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.getLongitudeFromTileX(final int pX, final int pZoom)",
"constructor": false,
"full_signature": "public double getLongitudeFromTileX(final int pX, final int pZoom)",
"identifier": "getLongitudeFromTileX",
"modifiers": "public",
"parameters": "(final int pX, final int pZoom)",
"return": "double",
"signature": "double getLongitudeFromTileX(final int pX, final int pZoom)",
"testcase": false
},
{
"class_method_signature": "TileSystem.clipTile(final int pTile, final int pZoom)",
"constructor": false,
"full_signature": "private int clipTile(final int pTile, final int pZoom)",
"identifier": "clipTile",
"modifiers": "private",
"parameters": "(final int pTile, final int pZoom)",
"return": "int",
"signature": "int clipTile(final int pTile, final int pZoom)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled) {\n final double longitude = getLongitudeFromX01(wrapEnabled ? Clip(pX01, 0, 1) : pX01);\n return wrapEnabled ? Clip(longitude, getMinLongitude(), getMaxLongitude()) : longitude;\n\t}",
"class_method_signature": "TileSystem.getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"constructor": false,
"full_signature": "public double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"identifier": "getLongitudeFromX01",
"invocations": [
"getLongitudeFromX01",
"Clip",
"Clip",
"getMinLongitude",
"getMaxLongitude"
],
"modifiers": "public",
"parameters": "(final double pX01, boolean wrapEnabled)",
"return": "double",
"signature": "double getLongitudeFromX01(final double pX01, boolean wrapEnabled)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 841,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17488986,
"size": 110864,
"stargazer_count": 1972,
"stars": null,
"updates": null,
"url": "https://github.com/osmdroid/osmdroid"
} |
151471167_9 | {
"fields": [
{
"declarator": "stepContribution",
"modifier": "private",
"original_string": "private StepContribution stepContribution;",
"type": "StepContribution",
"var_name": "stepContribution"
},
{
"declarator": "chunkContext",
"modifier": "private",
"original_string": "private ChunkContext chunkContext;",
"type": "ChunkContext",
"var_name": "chunkContext"
},
{
"declarator": "tasklet",
"modifier": "private",
"original_string": "private TestTasklet tasklet;",
"type": "TestTasklet",
"var_name": "tasklet"
},
{
"declarator": "adapter",
"modifier": "private",
"original_string": "private MethodInvokingTaskletAdapter adapter;",
"type": "MethodInvokingTaskletAdapter",
"var_name": "adapter"
}
],
"file": "sandbox/spring-batch-lite/src/test/java/org/springframework/batch/core/step/tasklet/MethodInvokingTaskletAdapterTest.java",
"identifier": "MethodInvokingTaskletAdapterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testArgumentSubsetWithOnlyChunkContextAndCompatibleReturnTypeVoid() throws Exception {\n\t\tadapter.setTargetMethod(\"execute9\");\n\t\tRepeatStatus repeatStatus = adapter.execute(stepContribution, chunkContext);\n\t\tassertEquals(RepeatStatus.FINISHED, repeatStatus);\n\t\tassertEquals(tasklet.getChunkContext(), chunkContext);\n\t}",
"class_method_signature": "MethodInvokingTaskletAdapterTest.testArgumentSubsetWithOnlyChunkContextAndCompatibleReturnTypeVoid()",
"constructor": false,
"full_signature": "@Test public void testArgumentSubsetWithOnlyChunkContextAndCompatibleReturnTypeVoid()",
"identifier": "testArgumentSubsetWithOnlyChunkContextAndCompatibleReturnTypeVoid",
"invocations": [
"setTargetMethod",
"execute",
"assertEquals",
"assertEquals",
"getChunkContext"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testArgumentSubsetWithOnlyChunkContextAndCompatibleReturnTypeVoid()",
"testcase": true
} | {
"fields": [],
"file": "sandbox/spring-batch-lite/src/main/java/org/springframework/batch/core/step/tasklet/MethodInvokingTaskletAdapter.java",
"identifier": "MethodInvokingTaskletAdapter",
"interfaces": "implements Tasklet",
"methods": [
{
"class_method_signature": "MethodInvokingTaskletAdapter.execute(StepContribution contribution, ChunkContext chunkContext)",
"constructor": false,
"full_signature": "@Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"identifier": "execute",
"modifiers": "@Override public",
"parameters": "(StepContribution contribution, ChunkContext chunkContext)",
"return": "RepeatStatus",
"signature": "RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"testcase": false
},
{
"class_method_signature": "MethodInvokingTaskletAdapter.mapResult(Object result)",
"constructor": false,
"full_signature": "protected ExitStatus mapResult(Object result)",
"identifier": "mapResult",
"modifiers": "protected",
"parameters": "(Object result)",
"return": "ExitStatus",
"signature": "ExitStatus mapResult(Object result)",
"testcase": false
}
],
"superclass": "extends AbstractMethodInvokingDelegator<Object>"
} | {
"body": "@Override\n\tpublic RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {\n\t\tif (getArguments() == null) {\n\t\t\tsetArguments(new Object[]{contribution, chunkContext});\n\t\t}\n\t\tcontribution.setExitStatus(mapResult(invokeDelegateMethod()));\n\t\treturn RepeatStatus.FINISHED;\n\t}",
"class_method_signature": "MethodInvokingTaskletAdapter.execute(StepContribution contribution, ChunkContext chunkContext)",
"constructor": false,
"full_signature": "@Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"identifier": "execute",
"invocations": [
"getArguments",
"setArguments",
"setExitStatus",
"mapResult",
"invokeDelegateMethod"
],
"modifiers": "@Override public",
"parameters": "(StepContribution contribution, ChunkContext chunkContext)",
"return": "RepeatStatus",
"signature": "RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 6,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 151471167,
"size": 7360,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/benas/spring-batch-lab"
} |
151471167_5 | {
"fields": [
{
"declarator": "stepContribution",
"modifier": "private",
"original_string": "private StepContribution stepContribution;",
"type": "StepContribution",
"var_name": "stepContribution"
},
{
"declarator": "chunkContext",
"modifier": "private",
"original_string": "private ChunkContext chunkContext;",
"type": "ChunkContext",
"var_name": "chunkContext"
},
{
"declarator": "tasklet",
"modifier": "private",
"original_string": "private TestTasklet tasklet;",
"type": "TestTasklet",
"var_name": "tasklet"
},
{
"declarator": "adapter",
"modifier": "private",
"original_string": "private MethodInvokingTaskletAdapter adapter;",
"type": "MethodInvokingTaskletAdapter",
"var_name": "adapter"
}
],
"file": "sandbox/spring-batch-lite/src/test/java/org/springframework/batch/core/step/tasklet/MethodInvokingTaskletAdapterTest.java",
"identifier": "MethodInvokingTaskletAdapterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testArgumentSubsetWithoutArguments() throws Exception {\n\t\tadapter.setTargetMethod(\"execute5\");\n\t\tRepeatStatus repeatStatus = adapter.execute(stepContribution, chunkContext);\n\t\tassertEquals(RepeatStatus.FINISHED, repeatStatus);\n\t}",
"class_method_signature": "MethodInvokingTaskletAdapterTest.testArgumentSubsetWithoutArguments()",
"constructor": false,
"full_signature": "@Test public void testArgumentSubsetWithoutArguments()",
"identifier": "testArgumentSubsetWithoutArguments",
"invocations": [
"setTargetMethod",
"execute",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testArgumentSubsetWithoutArguments()",
"testcase": true
} | {
"fields": [],
"file": "sandbox/spring-batch-lite/src/main/java/org/springframework/batch/core/step/tasklet/MethodInvokingTaskletAdapter.java",
"identifier": "MethodInvokingTaskletAdapter",
"interfaces": "implements Tasklet",
"methods": [
{
"class_method_signature": "MethodInvokingTaskletAdapter.execute(StepContribution contribution, ChunkContext chunkContext)",
"constructor": false,
"full_signature": "@Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"identifier": "execute",
"modifiers": "@Override public",
"parameters": "(StepContribution contribution, ChunkContext chunkContext)",
"return": "RepeatStatus",
"signature": "RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"testcase": false
},
{
"class_method_signature": "MethodInvokingTaskletAdapter.mapResult(Object result)",
"constructor": false,
"full_signature": "protected ExitStatus mapResult(Object result)",
"identifier": "mapResult",
"modifiers": "protected",
"parameters": "(Object result)",
"return": "ExitStatus",
"signature": "ExitStatus mapResult(Object result)",
"testcase": false
}
],
"superclass": "extends AbstractMethodInvokingDelegator<Object>"
} | {
"body": "@Override\n\tpublic RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {\n\t\tif (getArguments() == null) {\n\t\t\tsetArguments(new Object[]{contribution, chunkContext});\n\t\t}\n\t\tcontribution.setExitStatus(mapResult(invokeDelegateMethod()));\n\t\treturn RepeatStatus.FINISHED;\n\t}",
"class_method_signature": "MethodInvokingTaskletAdapter.execute(StepContribution contribution, ChunkContext chunkContext)",
"constructor": false,
"full_signature": "@Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"identifier": "execute",
"invocations": [
"getArguments",
"setArguments",
"setExitStatus",
"mapResult",
"invokeDelegateMethod"
],
"modifiers": "@Override public",
"parameters": "(StepContribution contribution, ChunkContext chunkContext)",
"return": "RepeatStatus",
"signature": "RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 6,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 151471167,
"size": 7360,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/benas/spring-batch-lab"
} |
151471167_4 | {
"fields": [
{
"declarator": "stepContribution",
"modifier": "private",
"original_string": "private StepContribution stepContribution;",
"type": "StepContribution",
"var_name": "stepContribution"
},
{
"declarator": "chunkContext",
"modifier": "private",
"original_string": "private ChunkContext chunkContext;",
"type": "ChunkContext",
"var_name": "chunkContext"
},
{
"declarator": "tasklet",
"modifier": "private",
"original_string": "private TestTasklet tasklet;",
"type": "TestTasklet",
"var_name": "tasklet"
},
{
"declarator": "adapter",
"modifier": "private",
"original_string": "private MethodInvokingTaskletAdapter adapter;",
"type": "MethodInvokingTaskletAdapter",
"var_name": "adapter"
}
],
"file": "sandbox/spring-batch-lite/src/test/java/org/springframework/batch/core/step/tasklet/MethodInvokingTaskletAdapterTest.java",
"identifier": "MethodInvokingTaskletAdapterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testArgumentSubsetWithOnlyStepContribution() throws Exception {\n\t\tadapter.setTargetMethod(\"execute4\");\n\t\tRepeatStatus repeatStatus = adapter.execute(stepContribution, chunkContext);\n\t\tassertEquals(RepeatStatus.FINISHED, repeatStatus);\n\t\tassertEquals(tasklet.getStepContribution(), stepContribution);\n\t}",
"class_method_signature": "MethodInvokingTaskletAdapterTest.testArgumentSubsetWithOnlyStepContribution()",
"constructor": false,
"full_signature": "@Test public void testArgumentSubsetWithOnlyStepContribution()",
"identifier": "testArgumentSubsetWithOnlyStepContribution",
"invocations": [
"setTargetMethod",
"execute",
"assertEquals",
"assertEquals",
"getStepContribution"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testArgumentSubsetWithOnlyStepContribution()",
"testcase": true
} | {
"fields": [],
"file": "sandbox/spring-batch-lite/src/main/java/org/springframework/batch/core/step/tasklet/MethodInvokingTaskletAdapter.java",
"identifier": "MethodInvokingTaskletAdapter",
"interfaces": "implements Tasklet",
"methods": [
{
"class_method_signature": "MethodInvokingTaskletAdapter.execute(StepContribution contribution, ChunkContext chunkContext)",
"constructor": false,
"full_signature": "@Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"identifier": "execute",
"modifiers": "@Override public",
"parameters": "(StepContribution contribution, ChunkContext chunkContext)",
"return": "RepeatStatus",
"signature": "RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"testcase": false
},
{
"class_method_signature": "MethodInvokingTaskletAdapter.mapResult(Object result)",
"constructor": false,
"full_signature": "protected ExitStatus mapResult(Object result)",
"identifier": "mapResult",
"modifiers": "protected",
"parameters": "(Object result)",
"return": "ExitStatus",
"signature": "ExitStatus mapResult(Object result)",
"testcase": false
}
],
"superclass": "extends AbstractMethodInvokingDelegator<Object>"
} | {
"body": "@Override\n\tpublic RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {\n\t\tif (getArguments() == null) {\n\t\t\tsetArguments(new Object[]{contribution, chunkContext});\n\t\t}\n\t\tcontribution.setExitStatus(mapResult(invokeDelegateMethod()));\n\t\treturn RepeatStatus.FINISHED;\n\t}",
"class_method_signature": "MethodInvokingTaskletAdapter.execute(StepContribution contribution, ChunkContext chunkContext)",
"constructor": false,
"full_signature": "@Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"identifier": "execute",
"invocations": [
"getArguments",
"setArguments",
"setExitStatus",
"mapResult",
"invokeDelegateMethod"
],
"modifiers": "@Override public",
"parameters": "(StepContribution contribution, ChunkContext chunkContext)",
"return": "RepeatStatus",
"signature": "RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 6,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 151471167,
"size": 7360,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/benas/spring-batch-lab"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.