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... | {
"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": "... | {
"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": "getFilterBuil... | {
"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--><![CD... | {
"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": "pub... | {
"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... | {
"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()",
"i... | {
"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": "pub... | {
"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... | {
"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<... | {
"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": "pub... | {
"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... | {
"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, t... | {
"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": "pub... | {
"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... | {
"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 </... | {
"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": "pub... | {
"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... | {
"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",
"in... | {
"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"... | {
"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;",
"t... | {
"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": "()",
"ret... | {
"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",
"in... | {
"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.con... | {
"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;",
"t... | {
"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 = sa... | {
"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.testQua... | {
"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/pr... | {
"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 + ... | {
"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",
... | {
"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": f... | {
"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;",
... | {
"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(\"NonFinalFieldReferencedI... | {
"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",
... | {
"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()",... | {
"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;",
... | {
"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 ... | {
"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 = IllegalArgumentExc... | {
"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/pr... | {
"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 + ... | {
"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",
... | {
"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": [
... | {
"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;",
... | {
"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": "Loc... | {
"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()... | {
"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()",
... | {
"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_sign... | {
"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",
... | {
"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"... | {
"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;",
... | {
"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": "Stri... | {
"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",
... | {
"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": [
... | {
"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;",
... | {
"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",
... | {
"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 v... | {
"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()",
... | {
"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_sign... | {
"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 = IllegalArgumentExcepti... | {
"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()",
... | {
"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_sign... | {
"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",
... | {
"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",
... | {
"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;",
... | {
"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()... | {
"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_ER... | {
"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... | {
"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": "GlobalErrorHan... | {
"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",
... | {
"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()... | {
"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;",
... | {
"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,
... | {
"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"
... | {
"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_signatu... | {
"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... | {
"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(Stri... | {
"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"
... | {
"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": "QuoteReposito... | {
"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... | {
"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(Stri... | {
"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",
... | {
"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 HashSe... | {
"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",
... | {
"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... | {
"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",
... | {
"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(... | {
"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",
... | {
"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 result... | {
"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",
... | {
"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... | {
"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",
... | {
"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... | {
"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"
},
... | {
"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,
"fu... | {
"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 ... | {
"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_sig... | {
"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.j... | {
"body": "@Test\n public void testOverlapsDateLine() {\n\n\n // ________________\n // | | |\n // |** | **|\n // |-*----+-----*-|\n // |** | **|\n // | | |\n // ----------------\n //box is notated as *\n //tes... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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 MapTileListBorderC... | {
"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 boole... | {
"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 ... | {
"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.j... | {
"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 = n... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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 ... | {
"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 }",
"cla... | {
"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... | {
"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_signat... | {
"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()",
"modif... | {
"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(ta... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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... | {
"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... | {
"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))... | {
"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 =... | {
"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 = \"... | {
"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()",
"modif... | {
"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()",
... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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 doubl... | {
"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()",
"modif... | {
"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 =... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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... | {
"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... | {
"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.nextIn... | {
"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 =... | {
"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 f... | {
"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 = ... | {
"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,
"f... | {
"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 [] marke... | {
"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 ... | {
"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 checkX... | {
"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... | {
"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_meth... | {
"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.j... | {
"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.ass... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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 MapTileList... | {
"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 boole... | {
"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 ... | {
"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.j... | {
"body": "@Test\n public void testOverlapsDateLine2() {\n\n // ________________\n // | | |\n // |** ?? | **|\n // |-*----+-----*-|\n // |** | **|\n // | | |\n // ----------------\n //box is notated as *\n //test... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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",
"identif... | {
"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 lis... | {
"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",
"... | {
"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);\... | {
"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 sourceXM... | {
"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": "... | {
"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 ... | {
"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()",
"modif... | {
"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_t... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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.par... | {
"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": "p... | {
"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 ... | {
"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_nam... | {
"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) { // opti... | {
"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 Po... | {
"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 stati... | {
"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))... | {
"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",
"identi... | {
"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(-Mat... | {
"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()",
"identif... | {
"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_signatu... | {
"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 ... | {
"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 ... | {
"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... | {
"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"... | {
"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 ... | {
"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 }",... | {
"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... | {
"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)",
"... | {
"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",
"identi... | {
"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.... | {
"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()",
"identif... | {
"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}",
... | {
"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",
"i... | {
"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,\... | {
"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 p... | {
"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 getProjectio... | {
"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": "p... | {
"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 ... | {
"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_nam... | {
"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) { // opti... | {
"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()",
"modif... | {
"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 ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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\... | {
"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/DefaultOverlayManagerTes... | {
"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 defaultOve... | {
"fields": [
{
"declarator": "mTilesOverlay",
"modifier": "private",
"original_string": "private TilesOverlay mTilesOverlay;",
"type": "TilesOverlay",
"var_name": "mTilesOverlay"
},
{
"declarator": "mOverlayList",
"modifier": "private final",
"original_stri... | {
"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 ... | {
"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",
"identif... | {
"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 ... | {
"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",
"... | {
"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(... | {
"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()",
"modif... | {
"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_n... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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 doubl... | {
"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 MapTileAreaBorderC... | {
"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": "MapTile... | {
"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 ... | {
"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/DefaultOverlayManagerTes... | {
"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 t... | {
"fields": [
{
"declarator": "mTilesOverlay",
"modifier": "private",
"original_string": "private TilesOverlay mTilesOverlay;",
"type": "TilesOverlay",
"var_name": "mTilesOverlay"
},
{
"declarator": "mOverlayList",
"modifier": "private final",
"original_stri... | {
"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": "remo... | {
"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/MapTileInd... | {
"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 = MapTileInd... | {
"fields": [
{
"declarator": "mMaxZoomLevel = TileSystem.primaryKeyMaxZoomLevel",
"modifier": "public static",
"original_string": "public static int mMaxZoomLevel = TileSystem.primaryKeyMaxZoomLevel;",
"type": "int",
"var_name": "mMaxZoomLevel"
},
{
"declarator": "mMod... | {
"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.getTile... | {
"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 ... | {
"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": "... | {
"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 sourc... | {
"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",
"identif... | {
"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) * mapTileU... | {
"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",
"... | {
"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": "()",
... | {
"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()",
"modif... | {
"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_sign... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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 ... | {
"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 ... | {
"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 ... | {
"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... | {
"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.getLatNor... | {
"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.j... | {
"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 assertEqu... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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.ge... | {
"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",
"i... | {
"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... | {
"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 p... | {
"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,... | {
"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": "p... | {
"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.getBound... | {
"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_nam... | {
"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) { // opti... | {
"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.j... | {
"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": fa... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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": [
"get... | {
"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",
"i... | {
"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 +... | {
"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 p... | {
"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 getProjec... | {
"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",
"identi... | {
"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), ... | {
"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()",
"identif... | {
"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\... | {
"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()",
"modif... | {
"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": "GeoPoin... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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))),... | {
"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 ... | {
"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()... | {
"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... | {
"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 lev... | {
"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",
"identif... | {
"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 ... | {
"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",
"... | {
"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);\... | {
"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.computeFromSou... | {
"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": "... | {
"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 sourc... | {
"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)"... | {
"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": "GarbageCollecto... | {
"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",
"... | {
"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":... | {
"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/... | {
"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.getRa... | {
"fields": [
{
"declarator": "mTileDownloader = new TileDownloader()",
"modifier": "private",
"original_string": "private TileDownloader mTileDownloader = new TileDownloader();",
"type": "TileDownloader",
"var_name": "mTileDownloader"
},
{
"declarator": "mTileSource",
... | {
"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 = MapV... | {
"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()",
"modif... | {
"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()",
... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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 doubl... | {
"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 MapTile... | {
"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": "MapTile... | {
"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 ... | {
"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 ... | {
"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 ... | {
"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... | {
"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.getLatit... | {
"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... | {
"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 pHttp... | {
"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 =... | {
"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 f... | {
"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()",
"modif... | {
"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\tfina... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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... | {
"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.j... | {
"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... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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",
"i... | {
"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\... | {
"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 p... | {
"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": "Distanc... | {
"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.j... | {
"body": "@Test\n public void testOverlaps() {\n\n // ________________\n // | | |\n // | | |\n // |------+-------|\n // | | |\n // | | |\n // ----------------\n //box is notated as *\n //test area is ... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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()",
"modif... | {
"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()",... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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 doubl... | {
"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/... | {
"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(), ti... | {
"fields": [
{
"declarator": "mTileDownloader = new TileDownloader()",
"modifier": "private",
"original_string": "private TileDownloader mTileDownloader = new TileDownloader();",
"type": "TileDownloader",
"var_name": "mTileDownloader"
},
{
"declarator": "mTileSource",
... | {
"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 = MapV... | {
"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 che... | {
"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... | {
"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 ... | {
"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.j... | {
"body": "@Test\n public void testOverlap2() {\n\n // ________________\n // | | |\n // | ***** |\n // |----*-+-*-----|\n // | ***** |\n // | | |\n // ----------------\n //box is notated as * not too scale\n /... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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.j... | {
"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_signa... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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 ... | {
"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... | {
"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 ... | {
"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... | {
"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 (f... | {
"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 =... | {
"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 ... | {
"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()",
"modif... | {
"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()",
"c... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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 doubl... | {
"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.j... | {
"body": "@Test\n public void testOverlapsWorld() {\n\n // ________________\n // | | |\n // | | |\n // |------+-------|\n // | | |\n // | | |\n // ----------------\n //box is notated as *\n //test are... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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 ... | {
"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 boole... | {
"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 ... | {
"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.j... | {
"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 ... | {
"fields": [
{
"declarator": "serialVersionUID = 2L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 2L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLatNorth",
"modifier": "private",
"original_... | {
"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)\... | {
"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()",
"modif... | {
"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()... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "static final",
"original_string": "static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "mLongitude",
"modifier": "private",
"original... | {
"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... | {
"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... | {
"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 ... | {
"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 =... | {
"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 f... | {
"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 ... | {
"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 checkL... | {
"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... | {
"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": "Tile... | {
"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",
"or... | {
"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... | {
"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.ex... | {
"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 Repe... | {
"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",
"or... | {
"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": "MethodInvoki... | {
"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.ex... | {
"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 Repe... | {
"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",
"or... | {
"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.getStepContrib... | {
"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.ex... | {
"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 Repe... | {
"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.