id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
993994_4 | {
"fields": [
{
"declarator": "TEST_CONTENT = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<page><a>тест</a><data id=\\\"addTestInfo\\\"/></page>\";",
"modifier": "private static final",
"original_string": "private static final String TEST_CONTENT = \"<?xml version=\\\"1.0\\\" encoding... | {
"body": "@Test\n public void testTransformXFile() throws Exception {\n request = new SimpleInternalRequest(null, \"./xfresh-core/src/test/resources/xtest.xml\");\n\n yaletProcessor.process(request, response, new RedirHandler(null));\n assertEquals(TEST_CONTENT,\n new String(ba... | {
"fields": [
{
"declarator": "log = Logger.getLogger(YaletProcessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(YaletProcessor.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "DEFA... | {
"body": "public void process(final HttpServletRequest req,\n final HttpServletResponse res,\n final String realPath) throws UnsupportedEncodingException, ServletException {\n req.setCharacterEncoding(encoding);\n res.setCharacterEncoding(encoding);\n\n ... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 993994,
"size": 16765,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/smarthoas/xfresh"
} |
20989862_0 | {
"fields": [],
"file": "webster-core/src/test/java/webster/util/FuturesTest.java",
"identifier": "FuturesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void afterTimeout() throws InterruptedException {\n CountDownLatch latch = new CountDownLatch(1);\n Set<String> resultHolder = Collections.newSetFromMap(new ConcurrentHashMap<>());\n CompletableFuture<String> slow = Futures.afterTimeout(\"slow\", 1000);\n Compl... | {
"fields": [
{
"declarator": "timer = new HashedWheelTimer()",
"modifier": "private static final",
"original_string": "private static final Timer timer = new HashedWheelTimer();",
"type": "Timer",
"var_name": "timer"
}
],
"file": "webster-core/src/main/java/webster/util/Futu... | {
"body": "public static <T> CompletableFuture<T> afterTimeout(T value, long millis) {\n CompletableFuture<T> future = new CompletableFuture<>();\n timer.newTimeout(t -> future.complete(value), millis, TimeUnit.MILLISECONDS);\n return future;\n }",
"class_method_signature": "Futures.afterTim... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 20989862,
"size": 62,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/pschirmacher/webster"
} |
58203049_12 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void escaped() {\n assertEquals(Arrays.asList(\"a'b\", \"a\\\"b\", \"\\n\"),\n QuotedStringSplitter.split(\"'a\\\\'b' \\\"a\\\\\\\"b\\\" \\\\n\"));\n }",
"class_method_signature": "QuotedStringSplitterTest.escaped()",
"constructor": false,
"full_signature": "@Test public vo... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_45 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void withList() {\n Map<String, Object> nested1 = new HashMap<>();\n nested1.put(\"a\", \"1\");\n nested1.put(\"b\", \"0\");\n nested1.put(\"d\", new ArrayList<String>(Arrays.asList(\"1\")));\n Map<String, Object> m1 = new HashMap<>();\n m1.put(\"nested\", nested1);\n M... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2)",
"constructor": false,
"full_signature": "@S... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> void deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2) {\n for (K k : m2.keySet()) {\n V v1 = m1.get(k);\n V v2 = m2.get(k);\n if (v1 instanceof Collection && v2 instanceof Collection) {\n if (((Collection<Object>)v1)... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_53 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void normalizeNormalizedPaths() {\n assertEquals(\"abc\", normalize(\"abc\"));\n assertEquals(\"/abc/abc\", normalize(\"/abc/abc\"));\n }",
"class_method_signature": "PathUtilsTest.normalizeNormalizedPaths()",
"constructor": false,
"full_signature": "@Test public void normalize... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String normalize(String path) {\n try {\n String result = new URI(path).normalize().toString();\n if (result.startsWith(\"//\")) {\n result = result.substring(1);\n }\n return result;\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_28 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void createIndex(TestContext context) {\n StubMapping settings = wireMockRule1.stubFor(put(urlEqualTo(\"/\" + INDEX))\n .willReturn(aResponse()\n .withBody(ACKNOWLEDGED.encode())\n .withStatus(200)));\n\n Async async = context.async();\n client.createIndex().subs... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> createIndex() {\n return createIndex(null);\n }",
"class_method_signature": "RemoteElasticsearchClient.createIndex()",
"constructor": false,
"full_signature": "@Override public Single<Boolean> createIndex()",
"identifier": "createIndex",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_49 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/CompoundCRSDecoderTest.java",
"identifier": "CompoundCRSDecoderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void compoundCrs() throws Exception {\n CoordinateReferenceSystem c = CompoundCRSDecoder.decode(\"urn:ogc:def:crs,crs:EPSG:6.12:3068,crs:EPSG:6.12:5783\");\n assertEquals(CRS.decode(\"EPSG:3068\"), CRS.getHorizontalCRS(c));\n assertEquals(CRS.decode(\"EPSG:5783\"), CRS.getVerticalC... | {
"fields": [
{
"declarator": "AUTHORITY = \"urn:ogc:def\"",
"modifier": "private static final",
"original_string": "private static final String AUTHORITY = \"urn:ogc:def\";",
"type": "String",
"var_name": "AUTHORITY"
},
{
"declarator": "PREFIX = AUTHORITY + \":crs,\"",... | {
"body": "public static CoordinateReferenceSystem decode(String code) throws FactoryException {\n code = code.trim();\n if (!isCompound(code)) {\n throw new NoSuchAuthorityCodeException(\"No compound CRS\", AUTHORITY, code);\n }\n \n code = code.substring(PREFIX.length());\n String[] parts = c... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_1 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "georocket-server/src/test/java/io... | {
"body": "@Test\n public void detectJSON() throws IOException {\n File tempFile = folder.newFile();\n FileUtils.write(tempFile, \" \\n {\\\"name\\\": \\\"Elvis\\\"}\", StandardCharsets.UTF_8);\n assertEquals(JSON, detect(tempFile));\n }",
"class_method_signature": "MimeTypeUtilsTest.detectJSON()",
... | {
"fields": [
{
"declarator": "XML = \"application/xml\"",
"modifier": "public static final",
"original_string": "public static final String XML = \"application/xml\";",
"type": "String",
"var_name": "XML"
},
{
"declarator": "JSON = \"application/json\"",
"modifie... | {
"body": "public static String detect(File f) throws IOException {\n return detect(f, false);\n }",
"class_method_signature": "MimeTypeUtils.detect(File f)",
"constructor": false,
"full_signature": "public static String detect(File f)",
"identifier": "detect",
"invocations": [
"detect"
],
"modi... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_24 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void typeIndexExistsFalse(TestContext context) {\n wireMockRule1.stubFor(head(urlEqualTo(\"/\" + INDEX + \"/\" + TYPE))\n .willReturn(aResponse()\n .withStatus(404)));\n\n Async async = context.async();\n client.typeExists(TYPE).subscribe(f -> {\n context.assertFal... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> typeExists(String type) {\n // TODO remove include_type_name parameter when we migrate to Elasticsearch 8\n // TODO and drop support for version 6\n return exists(\"/\" + index + \"/_mapping/\" + type + \"?include_type_name=true\");\n }",
"class_method_signat... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_32 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void isRunning(TestContext context) {\n wireMockRule1.stubFor(head(urlEqualTo(\"/\"))\n .willReturn(aResponse()\n .withStatus(200)));\n \n Async async = context.async();\n client.isRunning().subscribe(r -> {\n context.assertTrue(r);\n wireMockRule1.ve... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> isRunning() {\n return client.performRequestNoRetry(HttpMethod.HEAD, \"/\", null)\n .map(v -> true).onErrorReturn(t -> false);\n }",
"class_method_signature": "RemoteElasticsearchClient.isRunning()",
"constructor": false,
"full_signature": "@Override pub... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_65 | {
"fields": [],
"file": "georocket-server-api/src/test/java/io/georocket/util/XMLStartElementTest.java",
"identifier": "XMLStartElementTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void full() {\n XMLStartElement e = new XMLStartElement(\"p\", \"test\",\n new String[] { \"p1\", \"p2\" }, new String[] { \"http://example.com\", \"https://example.com\" },\n new String[] { \"a\", \"b\" }, new String[] { \"key1\", \"key2\" }, new String[] { \"v1\", \"v2\" ... | {
"fields": [
{
"declarator": "prefix",
"modifier": "private final",
"original_string": "private final String prefix;",
"type": "String",
"var_name": "prefix"
},
{
"declarator": "localName",
"modifier": "private final",
"original_string": "private final Stri... | {
"body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<\" + getName() + \"\");\n \n for (int i = 0; i < getNamespaceCount(); ++i) {\n sb.append(\" xmlns\");\n String prefix = getNamespacePrefix(i);\n if (prefix != null && !prefix.isEmpty(... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_64 | {
"fields": [],
"file": "georocket-server-api/src/test/java/io/georocket/util/XMLStartElementTest.java",
"identifier": "XMLStartElementTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void namespaces() {\n XMLStartElement e = new XMLStartElement(\"p\", \"test\",\n new String[] { \"p1\", \"p2\" }, new String[] { \"http://example.com\", \"https://example.com\" });\n assertEquals(\"<p:test xmlns:p1=\\\"http://example.com\\\" xmlns:p2=\\\"https://example.com\\\"... | {
"fields": [
{
"declarator": "prefix",
"modifier": "private final",
"original_string": "private final String prefix;",
"type": "String",
"var_name": "prefix"
},
{
"declarator": "localName",
"modifier": "private final",
"original_string": "private final Stri... | {
"body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<\" + getName() + \"\");\n \n for (int i = 0; i < getNamespaceCount(); ++i) {\n sb.append(\" xmlns\");\n String prefix = getNamespacePrefix(i);\n if (prefix != null && !prefix.isEmpty(... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_33 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void multipleHosts(TestContext context) {\n List<URI> hosts = Arrays.asList(URI.create(\"http://localhost:\" + wireMockRule1.port()),\n URI.create(\"http://localhost:\" + wireMockRule2.port()));\n client = new RemoteElasticsearchClient(hosts, INDEX, null, false, rule.vertx());\... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> indexExists() {\n return exists(\"/\" + index);\n }",
"class_method_signature": "RemoteElasticsearchClient.indexExists()",
"constructor": false,
"full_signature": "@Override public Single<Boolean> indexExists()",
"identifier": "indexExists",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_25 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void indexExistsTrue(TestContext context) {\n wireMockRule1.stubFor(head(urlEqualTo(\"/\" + INDEX))\n .willReturn(aResponse()\n .withStatus(200)));\n \n Async async = context.async();\n client.indexExists().subscribe(f -> {\n context.assertTrue(f);\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> indexExists() {\n return exists(\"/\" + index);\n }",
"class_method_signature": "RemoteElasticsearchClient.indexExists()",
"constructor": false,
"full_signature": "@Override public Single<Boolean> indexExists()",
"identifier": "indexExists",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_0 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "georocket-server/src/test/java/io... | {
"body": "@Test\n public void testBelongsTo() {\n assertTrue(belongsTo(\"application/gml+xml\", \"application\", \"xml\"));\n assertTrue(belongsTo(\"application/exp+xml\", \"application\", \"xml\"));\n assertTrue(belongsTo(\"application/xml\", \"application\", \"xml\"));\n assertFalse(belongsTo(\"applic... | {
"fields": [
{
"declarator": "XML = \"application/xml\"",
"modifier": "public static final",
"original_string": "public static final String XML = \"application/xml\";",
"type": "String",
"var_name": "XML"
},
{
"declarator": "JSON = \"application/json\"",
"modifie... | {
"body": "public static boolean belongsTo(String mimeType, String otherType,\n String otherStructuredSyntaxSuffix) {\n String mediaParts[] = mimeType.split(\"/\");\n if (mediaParts.length != 2) {\n return false;\n }\n\n String type = mediaParts[0];\n String subtype = mediaParts[1];\n\n if... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_48 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void mergeUnmodifiableCollections() {\n Map<String, Object> m1 = new HashMap<>();\n m1.put(\"a\", \"1\");\n m1.put(\"b\", Collections.unmodifiableList(Arrays.asList(\"1\", \"2\")));\n Map<String, Object> m2 = new HashMap<>();\n m2.put(\"a\", \"1\");\n m2.put(\"b\", Collect... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2)",
"constructor": false,
"full_signature": "@S... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> void deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2) {\n for (K k : m2.keySet()) {\n V v1 = m1.get(k);\n V v2 = m2.get(k);\n if (v1 instanceof Collection && v2 instanceof Collection) {\n if (((Collection<Object>)v1)... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_29 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void createIndexWithSettings(TestContext context) {\n StubMapping settings = wireMockRule1.stubFor(put(urlEqualTo(\"/\" + INDEX))\n .withRequestBody(equalToJson(SETTINGS_WRAPPER.encode()))\n .willReturn(aResponse()\n .withBody(ACKNOWLEDGED.encode())\n .withStatus(... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> createIndex() {\n return createIndex(null);\n }",
"class_method_signature": "RemoteElasticsearchClient.createIndex()",
"constructor": false,
"full_signature": "@Override public Single<Boolean> createIndex()",
"identifier": "createIndex",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_52 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void normalizeJoin() {\n assertEquals(\"bb\", join(\"./aa\", \"../bb\"));\n assertEquals(\"aa/bb\", join(\"./aa\", \"./bb\"));\n }",
"class_method_signature": "PathUtilsTest.normalizeJoin()",
"constructor": false,
"full_signature": "@Test public void normalizeJoin()",
"identi... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String join(String... paths) {\n String joined = Stream.of(paths)\n .filter(p -> p != null && !p.isEmpty())\n .collect(Collectors.joining(\"/\"));\n return normalize(joined);\n }",
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"f... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_44 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void nestedMap() {\n Map<String, String> nested1 = new HashMap<>();\n nested1.put(\"a\", \"1\");\n nested1.put(\"b\", \"0\");\n Map<String, Object> m1 = new HashMap<>();\n m1.put(\"nested\", nested1);\n Map<String, String> nested2 = new HashMap<>();\n nested2.put(\"b\",... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2)",
"constructor": false,
"full_signature": "@S... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> void deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2) {\n for (K k : m2.keySet()) {\n V v1 = m1.get(k);\n V v2 = m2.get(k);\n if (v1 instanceof Collection && v2 instanceof Collection) {\n if (((Collection<Object>)v1)... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_13 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/GeoRocketTest.java",
"identifier": "GeoRocketTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOverwriteWithEnvironmentVariables() {\n final String PROP_KEY = ConfigConstants.LOG_CONFIG;\n final String ENV_KEY = PROP_KEY\n .replace(\".\", \"_\")\n .toUpperCase();\n final String VALUE = \"test\";\n JsonObject conf = new JsonObject();\n Map<String, Str... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(GeoRocket.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(GeoRocket.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "geoRocketHom... | {
"body": "private static void overwriteWithEnvironmentVariables(JsonObject conf) {\n overwriteWithEnvironmentVariables(conf, System.getenv());\n }",
"class_method_signature": "GeoRocket.overwriteWithEnvironmentVariables(JsonObject conf)",
"constructor": false,
"full_signature": "private static void overwri... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_18 | {
"fields": [
{
"declarator": "rule = new RunTestOnContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public RunTestOnContext rule = new RunTestOnContext();",
"type": "RunTestOnContext",
"var_name": "rule"
},
{
"declarator": "mongoConnector",
... | {
"body": "@Test\n public void large(TestContext context) {\n Vertx vertx = rule.vertx();\n getChunkSize(vertx, context.asyncAssertSuccess(cs -> {\n doRead(cs * 10 + 100, cs, vertx, context);\n }));\n }",
"class_method_signature": "MongoDBChunkReadStreamTest.large(TestContext context)",
"construct... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(MongoDBChunkReadStream.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(MongoDBChunkReadStream.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "private void doRead() {\n if (!readInProgress) {\n readInProgress = true;\n Buffer buff = Buffer.buffer(readBufferSize);\n ByteBuffer bb = ByteBuffer.allocate(readBufferSize);\n doRead(buff, bb, ar -> {\n if (ar.succeeded()) {\n readInProgress = false;\n Buff... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_59 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAddLeadingSlash() {\n assertEquals(\"/abc\", addLeadingSlash(\"abc\"));\n assertEquals(\"/abc/abc\", addLeadingSlash(\"/abc/abc\"));\n assertEquals(\"/abc/abc/\", addLeadingSlash(\"abc/abc/\"));\n assertEquals(\"/\", addLeadingSlash(\"\"));\n }",
"class_method_signat... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String addLeadingSlash(String path) {\n if (path == null) {\n return null;\n }\n if (!path.isEmpty() && path.charAt(0) == '/') {\n return path;\n }\n return \"/\" + path;\n }",
"class_method_signature": "PathUtils.addLeadingSlash(String path)",
"constructor": fal... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_7 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void doubleQuotesWithSpaces() {\n assertEquals(Arrays.asList(\" hello world\", \"test\"),\n QuotedStringSplitter.split(\"\\\" hello world\\\" test\"));\n }",
"class_method_signature": "QuotedStringSplitterTest.doubleQuotesWithSpaces()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_22 | {
"fields": [
{
"declarator": "ZIP_NAME = \"elasticsearch-dummy.zip\"",
"modifier": "private final",
"original_string": "private final String ZIP_NAME = \"elasticsearch-dummy.zip\";",
"type": "String",
"var_name": "ZIP_NAME"
},
{
"declarator": "rule = new RunTestOnConte... | {
"body": "@Test\n public void downloadRandomAndClose(TestContext context) throws IOException {\n stubFor(get(urlEqualTo(\"/\" + ZIP_NAME))\n .willReturn(aResponse()\n .withFault(Fault.RANDOM_DATA_THEN_CLOSE)));\n \n Vertx vertx = rule.vertx();\n Async async = context.async();\n File... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ElasticsearchInstaller.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(ElasticsearchInstaller.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public Single<String> download(String downloadUrl, String destPath) {\n return download(downloadUrl, destPath, true);\n }",
"class_method_signature": "ElasticsearchInstaller.download(String downloadUrl, String destPath)",
"constructor": false,
"full_signature": "public Single<String> download(Str... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_34 | {
"fields": [
{
"declarator": "rule = new RunTestOnContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public RunTestOnContext rule = new RunTestOnContext();",
"type": "RunTestOnContext",
"var_name": "rule"
}
],
"file": "georocket-server/src/test/java/io/g... | {
"body": "@Test\n public void get(TestContext ctx) {\n IndexableChunkCache c = new IndexableChunkCache();\n String path = \"path\";\n Buffer chunk = Buffer.buffer(\"CHUNK\");\n c.put(path, chunk);\n ctx.assertEquals(1L, c.getNumberOfChunks());\n ctx.assertEquals((long)chunk.length(), c.getSize());... | {
"fields": [
{
"declarator": "maximumSize",
"modifier": "private final",
"original_string": "private final long maximumSize;",
"type": "long",
"var_name": "maximumSize"
},
{
"declarator": "cache",
"modifier": "private final",
"original_string": "private fin... | {
"body": "public Buffer get(String path) {\n Buffer r = cache.getIfPresent(path);\n if (r != null) {\n cache.invalidate(path);\n }\n return r;\n }",
"class_method_signature": "IndexableChunkCache.get(String path)",
"constructor": false,
"full_signature": "public Buffer get(String path)",
"i... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_63 | {
"fields": [],
"file": "georocket-server-api/src/test/java/io/georocket/util/XMLStartElementTest.java",
"identifier": "XMLStartElementTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void attrsWithPrefixes() {\n XMLStartElement e = new XMLStartElement(\"p\", \"test\", new String[] { \"a\", \"b\" },\n new String[] { \"key1\", \"key2\" }, new String[] { \"v1\", \"v2\" });\n assertEquals(\"<p:test a:key1=\\\"v1\\\" b:key2=\\\"v2\\\">\", e.toString());\n }",
... | {
"fields": [
{
"declarator": "prefix",
"modifier": "private final",
"original_string": "private final String prefix;",
"type": "String",
"var_name": "prefix"
},
{
"declarator": "localName",
"modifier": "private final",
"original_string": "private final Stri... | {
"body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<\" + getName() + \"\");\n \n for (int i = 0; i < getNamespaceCount(); ++i) {\n sb.append(\" xmlns\");\n String prefix = getNamespacePrefix(i);\n if (prefix != null && !prefix.isEmpty(... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_14 | {
"fields": [
{
"declarator": "rule = new RunTestOnContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public RunTestOnContext rule = new RunTestOnContext();",
"type": "RunTestOnContext",
"var_name": "rule"
},
{
"declarator": "mongoConnector",
... | {
"body": "@Test\n public void tiny(TestContext context) {\n Vertx vertx = rule.vertx();\n getChunkSize(vertx, context.asyncAssertSuccess(cs -> {\n doRead(2, cs, vertx, context);\n }));\n }",
"class_method_signature": "MongoDBChunkReadStreamTest.tiny(TestContext context)",
"constructor": false,
... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(MongoDBChunkReadStream.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(MongoDBChunkReadStream.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "private void doRead() {\n if (!readInProgress) {\n readInProgress = true;\n Buffer buff = Buffer.buffer(readBufferSize);\n ByteBuffer bb = ByteBuffer.allocate(readBufferSize);\n doRead(buff, bb, ar -> {\n if (ar.succeeded()) {\n readInProgress = false;\n Buff... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_43 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void existingKey() {\n Map<String, String> m1 = new HashMap<>();\n m1.put(\"a\", \"1\");\n m1.put(\"b\", \"0\");\n Map<String, String> m2 = new HashMap<>();\n m2.put(\"b\", \"2\");\n m2.put(\"c\", \"3\");\n Map<String, String> expected = new HashMap<>();\n expected.p... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2)",
"constructor": false,
"full_signature": "@S... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> void deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2) {\n for (K k : m2.keySet()) {\n V v1 = m1.get(k);\n V v2 = m2.get(k);\n if (v1 instanceof Collection && v2 instanceof Collection) {\n if (((Collection<Object>)v1)... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_55 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void relativeInOutNormalize() {\n assertEquals(\"abc\", normalize(\"./abc\"));\n assertEquals(\"../abc\", normalize(\"../abc\"));\n assertEquals(\"../../abc\", normalize(\"../../abc\"));\n assertEquals(\"bb\", normalize(\"./abc/../bb\"));\n assertEquals(\"\", normalize(\"./ab... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String normalize(String path) {\n try {\n String result = new URI(path).normalize().toString();\n if (result.startsWith(\"//\")) {\n result = result.substring(1);\n }\n return result;\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_38 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/CoordinateTransformerTest.java",
"identifier": "CoordinateTransformerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEPSG() throws Exception {\n CoordinateReferenceSystem crs = CRS.decode(\"EPSG:31467\");\n CoordinateTransformer transformer = new CoordinateTransformer(crs);\n double[] source = {3477534.683, 5605739.857};\n double[] destination = {8.681739535269804, 50.58691850210496};... | {
"fields": [
{
"declarator": "flipped",
"modifier": "private final",
"original_string": "private final boolean flipped;",
"type": "boolean",
"var_name": "flipped"
},
{
"declarator": "transform",
"modifier": "private final",
"original_string": "private final... | {
"body": "public static CoordinateReferenceSystem decode(String s) throws FactoryException {\n if (CompoundCRSDecoder.isCompound(s)) {\n return CompoundCRSDecoder.decode(s);\n }\n\n if (WKTCRSDecoder.isWKT(s)) {\n return WKTCRSDecoder.decode(s);\n }\n\n return CRS.decode(s);\n }",
"class_... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_39 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/CoordinateTransformerTest.java",
"identifier": "CoordinateTransformerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWKT() throws Exception {\n CoordinateReferenceSystem crs = CRS.decode(\"EPSG:31467\");\n CoordinateReferenceSystem wktCrs = CoordinateTransformer.decode(crs.toWKT());\n CoordinateTransformer transformer = new CoordinateTransformer(wktCrs);\n double[] source = {3477534.6... | {
"fields": [
{
"declarator": "flipped",
"modifier": "private final",
"original_string": "private final boolean flipped;",
"type": "boolean",
"var_name": "flipped"
},
{
"declarator": "transform",
"modifier": "private final",
"original_string": "private final... | {
"body": "public static CoordinateReferenceSystem decode(String s) throws FactoryException {\n if (CompoundCRSDecoder.isCompound(s)) {\n return CompoundCRSDecoder.decode(s);\n }\n\n if (WKTCRSDecoder.isWKT(s)) {\n return WKTCRSDecoder.decode(s);\n }\n\n return CRS.decode(s);\n }",
"class_... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_54 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNormalize() {\n assertEquals(\"/abc\", normalize(\"//abc\"));\n assertEquals(\"/abc/abc/\", normalize(\"//abc//abc//\"));\n assertEquals(\"/abc/\", normalize(\"/abc/\"));\n }",
"class_method_signature": "PathUtilsTest.testNormalize()",
"constructor": false,
"full_si... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String normalize(String path) {\n try {\n String result = new URI(path).normalize().toString();\n if (result.startsWith(\"//\")) {\n result = result.substring(1);\n }\n return result;\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_42 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void empty() {\n Map<String, String> m1 = new HashMap<>();\n Map<String, String> m2 = new HashMap<>();\n m2.put(\"a\", \"1\");\n m2.put(\"b\", \"2\");\n MapUtils.deepMerge(m1, m2);\n assertEquals(m2, m1);\n }",
"class_method_signature": "MapUtilsTest.empty()",
"constr... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2)",
"constructor": false,
"full_signature": "@S... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> void deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2) {\n for (K k : m2.keySet()) {\n V v1 = m1.get(k);\n V v2 = m2.get(k);\n if (v1 instanceof Collection && v2 instanceof Collection) {\n if (((Collection<Object>)v1)... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_15 | {
"fields": [
{
"declarator": "rule = new RunTestOnContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public RunTestOnContext rule = new RunTestOnContext();",
"type": "RunTestOnContext",
"var_name": "rule"
},
{
"declarator": "mongoConnector",
... | {
"body": "@Test\n public void small(TestContext context) {\n Vertx vertx = rule.vertx();\n getChunkSize(vertx, context.asyncAssertSuccess(cs -> {\n doRead(1024, cs, vertx, context);\n }));\n }",
"class_method_signature": "MongoDBChunkReadStreamTest.small(TestContext context)",
"constructor": fals... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(MongoDBChunkReadStream.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(MongoDBChunkReadStream.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "private void doRead() {\n if (!readInProgress) {\n readInProgress = true;\n Buffer buff = Buffer.buffer(readBufferSize);\n ByteBuffer bb = ByteBuffer.allocate(readBufferSize);\n doRead(buff, bb, ar -> {\n if (ar.succeeded()) {\n readInProgress = false;\n Buff... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_62 | {
"fields": [],
"file": "georocket-server-api/src/test/java/io/georocket/util/XMLStartElementTest.java",
"identifier": "XMLStartElementTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void attrs() {\n XMLStartElement e = new XMLStartElement(null, \"test\", new String[] { \"\", \"\" },\n new String[] { \"key1\", \"key2\" }, new String[] { \"v1\", \"v2\" });\n assertEquals(\"<test key1=\\\"v1\\\" key2=\\\"v2\\\">\", e.toString());\n }",
"class_method_signat... | {
"fields": [
{
"declarator": "prefix",
"modifier": "private final",
"original_string": "private final String prefix;",
"type": "String",
"var_name": "prefix"
},
{
"declarator": "localName",
"modifier": "private final",
"original_string": "private final Stri... | {
"body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<\" + getName() + \"\");\n \n for (int i = 0; i < getNamespaceCount(); ++i) {\n sb.append(\" xmlns\");\n String prefix = getNamespacePrefix(i);\n if (prefix != null && !prefix.isEmpty(... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_35 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/index/generic/BoundingBoxIndexerFactoryTest.java",
"identifier": "BoundingBoxIndexerFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testInvalid() {\n BoundingBoxIndexerFactory factory = new BoundingBoxIndexerFactoryImpl();\n\n assertEquals(MatchPriority.NONE, factory.getQueryPriority(\"\"));\n assertEquals(MatchPriority.NONE, factory.getQueryPriority(\"42\"));\n }",
"class_method_signature": "BoundingBo... | {
"fields": [
{
"declarator": "FLOAT_REGEX = \"[-+]?[0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?\"",
"modifier": "private static final",
"original_string": "private static final String FLOAT_REGEX = \"[-+]?[0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?\";",
"type": "String",
"var_name": "FLOAT_REGEX"
... | {
"body": "@Override\n public MatchPriority getQueryPriority(String search) {\n Matcher bboxMatcher = BBOX_PATTERN.matcher(search);\n if (bboxMatcher.matches()) {\n return MatchPriority.ONLY;\n }\n return MatchPriority.NONE;\n }",
"class_method_signature": "BoundingBoxIndexerFactory.getQueryPrior... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_23 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void indexExistsFalse(TestContext context) {\n wireMockRule1.stubFor(head(urlEqualTo(\"/\" + INDEX))\n .willReturn(aResponse()\n .withStatus(404)));\n \n Async async = context.async();\n client.indexExists().subscribe(f -> {\n context.assertFalse(f);\n ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> indexExists() {\n return exists(\"/\" + index);\n }",
"class_method_signature": "RemoteElasticsearchClient.indexExists()",
"constructor": false,
"full_signature": "@Override public Single<Boolean> indexExists()",
"identifier": "indexExists",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_6 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void doubleQuotes() {\n assertEquals(Arrays.asList(\"hello world\", \"test\"),\n QuotedStringSplitter.split(\"\\\"hello world\\\" test\"));\n }",
"class_method_signature": "QuotedStringSplitterTest.doubleQuotes()",
"constructor": false,
"full_signature": "@Test public void ... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_58 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAddTrailingSlash() {\n assertEquals(\"abc/\", addTrailingSlash(\"abc\"));\n assertEquals(\"/abc/abc/\", addTrailingSlash(\"/abc/abc\"));\n assertEquals(\"/abc/abc/\", addTrailingSlash(\"/abc/abc/\"));\n assertEquals(\"/\", addTrailingSlash(\"\"));\n }",
"class_method... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String addTrailingSlash(String path) {\n if (path == null) {\n return null;\n }\n if (!path.isEmpty() && path.charAt(path.length() - 1) == '/') {\n return path;\n }\n return path + \"/\";\n }",
"class_method_signature": "PathUtils.addTrailingSlash(String path)",
... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_19 | {
"fields": [
{
"declarator": "ZIP_NAME = \"elasticsearch-dummy.zip\"",
"modifier": "private final",
"original_string": "private final String ZIP_NAME = \"elasticsearch-dummy.zip\";",
"type": "String",
"var_name": "ZIP_NAME"
},
{
"declarator": "rule = new RunTestOnConte... | {
"body": "@Test\n public void download(TestContext context) throws IOException {\n URL zipFile = this.getClass().getResource(ZIP_NAME);\n byte[] zipFileContents = IOUtils.toByteArray(zipFile);\n \n stubFor(get(urlEqualTo(\"/\" + ZIP_NAME))\n .willReturn(aResponse()\n .withBody(zipFileC... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ElasticsearchInstaller.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(ElasticsearchInstaller.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public Single<String> download(String downloadUrl, String destPath) {\n return download(downloadUrl, destPath, true);\n }",
"class_method_signature": "ElasticsearchInstaller.download(String downloadUrl, String destPath)",
"constructor": false,
"full_signature": "public Single<String> download(Str... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_61 | {
"fields": [],
"file": "georocket-server-api/src/test/java/io/georocket/util/XMLStartElementTest.java",
"identifier": "XMLStartElementTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void prefix() {\n XMLStartElement e = new XMLStartElement(\"p\", \"test\");\n assertEquals(\"<p:test>\", e.toString());\n }",
"class_method_signature": "XMLStartElementTest.prefix()",
"constructor": false,
"full_signature": "@Test public void prefix()",
"identifier": "prefix"... | {
"fields": [
{
"declarator": "prefix",
"modifier": "private final",
"original_string": "private final String prefix;",
"type": "String",
"var_name": "prefix"
},
{
"declarator": "localName",
"modifier": "private final",
"original_string": "private final Stri... | {
"body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<\" + getName() + \"\");\n \n for (int i = 0; i < getNamespaceCount(); ++i) {\n sb.append(\" xmlns\");\n String prefix = getNamespacePrefix(i);\n if (prefix != null && !prefix.isEmpty(... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_36 | {
"fields": [
{
"declarator": "XMLHEADER = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n\"",
"modifier": "private static final",
"original_string": "private static final String XMLHEADER = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?... | {
"body": "@Test\n public void mixedInit(TestContext context) {\n String strChunk1 = \"{\\\"type\\\":\\\"Feature\\\"}\";\n String strChunk2 = XMLHEADER + \"<root><test chunk=\\\"2\\\"></test></root>\";\n Buffer chunk1 = Buffer.buffer(strChunk1);\n Buffer chunk2 = Buffer.buffer(strChunk2);\n \n GeoJ... | {
"fields": [
{
"declarator": "xmlMerger",
"modifier": "private",
"original_string": "private XMLMerger xmlMerger;",
"type": "XMLMerger",
"var_name": "xmlMerger"
},
{
"declarator": "geoJsonMerger",
"modifier": "private",
"original_string": "private GeoJsonMe... | {
"body": "@Override\n public Completable init(ChunkMeta meta) {\n return ensureMerger(meta)\n .andThen(Completable.defer(() -> {\n if (meta instanceof XMLChunkMeta) {\n return xmlMerger.init((XMLChunkMeta)meta);\n }\n return geoJsonMerger.init((GeoJsonChunkMeta)meta);\n })... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_20 | {
"fields": [
{
"declarator": "ZIP_NAME = \"elasticsearch-dummy.zip\"",
"modifier": "private final",
"original_string": "private final String ZIP_NAME = \"elasticsearch-dummy.zip\";",
"type": "String",
"var_name": "ZIP_NAME"
},
{
"declarator": "rule = new RunTestOnConte... | {
"body": "@Test\n public void download500(TestContext context) throws IOException {\n stubFor(get(urlEqualTo(\"/\" + ZIP_NAME))\n .willReturn(aResponse()\n .withStatus(500)));\n \n Vertx vertx = rule.vertx();\n Async async = context.async();\n File dest = folder.newFolder();\n de... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ElasticsearchInstaller.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(ElasticsearchInstaller.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public Single<String> download(String downloadUrl, String destPath) {\n return download(downloadUrl, destPath, true);\n }",
"class_method_signature": "ElasticsearchInstaller.download(String downloadUrl, String destPath)",
"constructor": false,
"full_signature": "public Single<String> download(Str... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_5 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void manySpaces() {\n assertEquals(Arrays.asList(\"hello\", \"world\"),\n QuotedStringSplitter.split(\" hello world \"));\n }",
"class_method_signature": "QuotedStringSplitterTest.manySpaces()",
"constructor": false,
"full_signature": "@Test public void manySpaces()",
... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_9 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void singleQuotesWithSpaces() {\n assertEquals(Arrays.asList(\" hello world\", \"test\"),\n QuotedStringSplitter.split(\"' hello world' test\"));\n }",
"class_method_signature": "QuotedStringSplitterTest.singleQuotesWithSpaces()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_57 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveLeadingSlash() {\n assertEquals(\"abc\", removeLeadingSlash(\"/abc\"));\n assertEquals(\"abc/abc\", removeLeadingSlash(\"/abc/abc\"));\n String pathWithoutLeadingSlash = \"abc/abc\";\n assertEquals(pathWithoutLeadingSlash, removeLeadingSlash(pathWithoutLeadingSlas... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String removeLeadingSlash(String path) {\n if (path != null && !path.isEmpty() && path.charAt(0) == '/') {\n return path.substring(1);\n }\n return path;\n }",
"class_method_signature": "PathUtils.removeLeadingSlash(String path)",
"constructor": false,
"full_signature": "... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_41 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/JsonUtilsTest.java",
"identifier": "JsonUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void simple() {\n JsonObject obj = new JsonObject()\n .put(\"type\", \"Person\")\n .put(\"person\", new JsonObject()\n .put(\"firstName\", \"Clifford\")\n .put(\"lastName\", \"Thompson\")\n .put(\"age\", 40)\n .put(\"address\", ne... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/JsonUtils.java",
"identifier": "JsonUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonUtils.flatten(JsonObject obj)",
"constructor": false,
"full_signature": "public static JsonObject flatten(... | {
"body": "public static JsonObject flatten(JsonObject obj) {\n JsonObject result = new JsonObject();\n for (String key : obj.fieldNames()) {\n Object value = obj.getValue(key);\n if (value instanceof JsonObject) {\n JsonObject obj2 = (JsonObject)value;\n obj2 = flatten(obj2);\n f... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_16 | {
"fields": [
{
"declarator": "rule = new RunTestOnContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public RunTestOnContext rule = new RunTestOnContext();",
"type": "RunTestOnContext",
"var_name": "rule"
},
{
"declarator": "mongoConnector",
... | {
"body": "@Test\n public void defaultChunkSize(TestContext context) {\n Vertx vertx = rule.vertx();\n getChunkSize(vertx, context.asyncAssertSuccess(cs -> {\n doRead(cs, cs, vertx, context);\n }));\n }",
"class_method_signature": "MongoDBChunkReadStreamTest.defaultChunkSize(TestContext context)",
... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(MongoDBChunkReadStream.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(MongoDBChunkReadStream.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "private void doRead() {\n if (!readInProgress) {\n readInProgress = true;\n Buffer buff = Buffer.buffer(readBufferSize);\n ByteBuffer bb = ByteBuffer.allocate(readBufferSize);\n doRead(buff, bb, ar -> {\n if (ar.succeeded()) {\n readInProgress = false;\n Buff... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_17 | {
"fields": [
{
"declarator": "rule = new RunTestOnContext()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public RunTestOnContext rule = new RunTestOnContext();",
"type": "RunTestOnContext",
"var_name": "rule"
},
{
"declarator": "mongoConnector",
... | {
"body": "@Test\n public void medium(TestContext context) {\n Vertx vertx = rule.vertx();\n getChunkSize(vertx, context.asyncAssertSuccess(cs -> {\n doRead(cs * 3 / 2, cs, vertx, context);\n }));\n }",
"class_method_signature": "MongoDBChunkReadStreamTest.medium(TestContext context)",
"constructo... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(MongoDBChunkReadStream.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(MongoDBChunkReadStream.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "private void doRead() {\n if (!readInProgress) {\n readInProgress = true;\n Buffer buff = Buffer.buffer(readBufferSize);\n ByteBuffer bb = ByteBuffer.allocate(readBufferSize);\n doRead(buff, bb, ar -> {\n if (ar.succeeded()) {\n readInProgress = false;\n Buff... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_40 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/SizeFormatTest.java",
"identifier": "SizeFormatTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void format() {\n assertEquals(\"0 B\", SizeFormat.format(-1));\n assertEquals(\"0 B\", SizeFormat.format(0));\n assertEquals(\"100 B\", SizeFormat.format(100));\n assertEquals(\"1 kB\", SizeFormat.format(1000));\n assertEquals(\"1 kB\", SizeFormat.format(1024));\n assertE... | {
"fields": [
{
"declarator": "UNITS = new String[] {\n \"B\", \"kB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\"\n }",
"modifier": "private static final",
"original_string": "private static final String[] UNITS = new String[] {\n \"B\", \"kB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\"\n };",
... | {
"body": "public static String format(long size) {\n if (size <= 0) {\n return \"0 B\";\n }\n int d = (int)(Math.log10(size) / 3);\n return FORMATTER.format(size / Math.pow(1000, d)) + \" \" + UNITS[d];\n }",
"class_method_signature": "SizeFormat.format(long size)",
"constructor": false,
"ful... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_56 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsAbsolute() {\n assertTrue(isAbsolute(\"/absolute/path\"));\n assertFalse(isAbsolute(\"relative/path\"));\n assertFalse(isAbsolute(\"\"));\n }",
"class_method_signature": "PathUtilsTest.testIsAbsolute()",
"constructor": false,
"full_signature": "@Test public void t... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static boolean isAbsolute(String path) {\n return path != null && !path.isEmpty() && path.charAt(0) == '/';\n }",
"class_method_signature": "PathUtils.isAbsolute(String path)",
"constructor": false,
"full_signature": "public static boolean isAbsolute(String path)",
"identifier": "isAbsol... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_8 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void singleQuotes() {\n assertEquals(Arrays.asList(\"hello world\", \"test\"),\n QuotedStringSplitter.split(\"'hello world' test\"));\n }",
"class_method_signature": "QuotedStringSplitterTest.singleQuotes()",
"constructor": false,
"full_signature": "@Test public void single... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_4 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void noQuotes() {\n assertEquals(Arrays.asList(\"hello\", \"world\"),\n QuotedStringSplitter.split(\"hello world\"));\n }",
"class_method_signature": "QuotedStringSplitterTest.noQuotes()",
"constructor": false,
"full_signature": "@Test public void noQuotes()",
"identifier... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_21 | {
"fields": [
{
"declarator": "ZIP_NAME = \"elasticsearch-dummy.zip\"",
"modifier": "private final",
"original_string": "private final String ZIP_NAME = \"elasticsearch-dummy.zip\";",
"type": "String",
"var_name": "ZIP_NAME"
},
{
"declarator": "rule = new RunTestOnConte... | {
"body": "@Test\n public void downloadInvalidArchive(TestContext context) throws IOException {\n stubFor(get(urlEqualTo(\"/\" + ZIP_NAME))\n .willReturn(aResponse()\n .withBody(\"foobar\")));\n \n Vertx vertx = rule.vertx();\n Async async = context.async();\n File dest = folder.newF... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(ElasticsearchInstaller.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(ElasticsearchInstaller.class);",
"type": "Logger",
"var_name": "log"
},
{
"... | {
"body": "public Single<String> download(String downloadUrl, String destPath) {\n return download(downloadUrl, destPath, true);\n }",
"class_method_signature": "ElasticsearchInstaller.download(String downloadUrl, String destPath)",
"constructor": false,
"full_signature": "public Single<String> download(Str... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_37 | {
"fields": [
{
"declarator": "XMLHEADER = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n\"",
"modifier": "private static final",
"original_string": "private static final String XMLHEADER = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?... | {
"body": "@Test\n public void canMerge(TestContext context) {\n XMLChunkMeta cm2 = new XMLChunkMeta(Arrays.asList(new XMLStartElement(\"other\")), 10, 20);\n XMLChunkMeta cm3 = new XMLChunkMeta(Arrays.asList(new XMLStartElement(\"pre\", \"root\")), 10, 20);\n XMLChunkMeta cm4 = new XMLChunkMeta(Arrays.asLi... | {
"fields": [],
"file": "georocket-server/src/main/java/io/georocket/output/xml/AllSameStrategy.java",
"identifier": "AllSameStrategy",
"interfaces": "",
"methods": [
{
"class_method_signature": "AllSameStrategy.canMerge(XMLChunkMeta meta)",
"constructor": false,
"full_signature": "@Over... | {
"body": "@Override\n public Single<Boolean> canMerge(XMLChunkMeta meta) {\n return Single.defer(() -> {\n if (getParents() == null || getParents().equals(meta.getParents())) {\n return Single.just(Boolean.TRUE);\n } else {\n return Single.just(Boolean.FALSE);\n }\n });\n }",
"... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_60 | {
"fields": [],
"file": "georocket-server-api/src/test/java/io/georocket/util/XMLStartElementTest.java",
"identifier": "XMLStartElementTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void simple() {\n XMLStartElement e = new XMLStartElement(\"test\");\n assertEquals(\"<test>\", e.toString());\n }",
"class_method_signature": "XMLStartElementTest.simple()",
"constructor": false,
"full_signature": "@Test public void simple()",
"identifier": "simple",
"invo... | {
"fields": [
{
"declarator": "prefix",
"modifier": "private final",
"original_string": "private final String prefix;",
"type": "String",
"var_name": "prefix"
},
{
"declarator": "localName",
"modifier": "private final",
"original_string": "private final Stri... | {
"body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<\" + getName() + \"\");\n \n for (int i = 0; i < getNamespaceCount(); ++i) {\n sb.append(\" xmlns\");\n String prefix = getNamespacePrefix(i);\n if (prefix != null && !prefix.isEmpty(... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_51 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void emptyArgumentsJoin() {\n assertEquals(\"\", join());\n assertEquals(\"aa\", join(\"aa\", null));\n assertEquals(\"aa/bb\", join(\"aa\", \"\", \"bb\"));\n }",
"class_method_signature": "PathUtilsTest.emptyArgumentsJoin()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String join(String... paths) {\n String joined = Stream.of(paths)\n .filter(p -> p != null && !p.isEmpty())\n .collect(Collectors.joining(\"/\"));\n return normalize(joined);\n }",
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"f... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_47 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = UnsupportedOperationException.class)\n public void mergeUnmodifiableMapsDifferent() {\n Map<String, String> m1 = new HashMap<>();\n m1.put(\"a\", \"1\");\n m1.put(\"b\", \"0\");\n m1 = Collections.unmodifiableMap(m1);\n Map<String, String> m2 = new HashMap<>();\n m2.put(... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2)",
"constructor": false,
"full_signature": "@S... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> void deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2) {\n for (K k : m2.keySet()) {\n V v1 = m1.get(k);\n V v2 = m2.get(k);\n if (v1 instanceof Collection && v2 instanceof Collection) {\n if (((Collection<Object>)v1)... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_10 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void singleSingleQuote() {\n assertEquals(Arrays.asList(\"that's\", \"cool\"),\n QuotedStringSplitter.split(\"that's cool\"));\n }",
"class_method_signature": "QuotedStringSplitterTest.singleSingleQuote()",
"constructor": false,
"full_signature": "@Test public void singleSi... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_67 | {
"fields": [],
"file": "georocket-server-api/src/test/java/io/georocket/query/ElasticsearchQueryHelperTest.java",
"identifier": "ElasticsearchQueryHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBoolAddShould() {\n JsonObject s = new JsonObject()\n .put(\"term\", new JsonObject()\n .put(\"tags\", \"Fraunhofer IGD\"));\n JsonObject q = boolQuery();\n boolAddShould(q, s);\n JsonObject expected = new JsonObject()\n .put(\"bool\", new JsonObject()\... | {
"fields": [],
"file": "georocket-server-api/src/main/java/io/georocket/query/ElasticsearchQueryHelper.java",
"identifier": "ElasticsearchQueryHelper",
"interfaces": "",
"methods": [
{
"class_method_signature": "ElasticsearchQueryHelper.ElasticsearchQueryHelper()",
"constructor": true,
... | {
"body": "public static void boolAddShould(JsonObject bool, JsonObject should) {\n boolAdd(bool, should, \"should\");\n }",
"class_method_signature": "ElasticsearchQueryHelper.boolAddShould(JsonObject bool, JsonObject should)",
"constructor": false,
"full_signature": "public static void boolAddShould(JsonO... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_30 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void bulkInsert(TestContext context) {\n String url = \"/\" + INDEX + \"/\" + TYPE + \"/_bulk\";\n\n wireMockRule1.stubFor(post(urlEqualTo(url))\n .willReturn(aResponse()\n .withStatus(200)\n .withBody(\"{}\")));\n \n List<Tuple2<String, JsonObject>>... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<JsonObject> bulkInsert(String type,\n List<Tuple2<String, JsonObject>> documents) {\n String uri = \"/\" + index + \"/\" + type + \"/_bulk\";\n \n // prepare the whole body now because it's much faster to send\n // it at once instead of using HTTP chunked mode.\n... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_26 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void typeIndexExistsTrue(TestContext context) {\n wireMockRule1.stubFor(head(urlEqualTo(\"/\" + INDEX + \"/_mapping/\" + TYPE +\n \"?include_type_name=true\"))\n .willReturn(aResponse()\n .withStatus(200)));\n\n Async async = context.async();\n client.typeExist... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> typeExists(String type) {\n // TODO remove include_type_name parameter when we migrate to Elasticsearch 8\n // TODO and drop support for version 6\n return exists(\"/\" + index + \"/_mapping/\" + type + \"?include_type_name=true\");\n }",
"class_method_signat... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_3 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "georocket-server/src/test/java/io... | {
"body": "@Test\n public void detectNone() throws IOException {\n File tempFile = folder.newFile();\n FileUtils.write(tempFile, \" \\n\\n\\n \", StandardCharsets.UTF_8);\n assertNull(detect(tempFile));\n }",
"class_method_signature": "MimeTypeUtilsTest.detectNone()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "XML = \"application/xml\"",
"modifier": "public static final",
"original_string": "public static final String XML = \"application/xml\";",
"type": "String",
"var_name": "XML"
},
{
"declarator": "JSON = \"application/json\"",
"modifie... | {
"body": "public static String detect(File f) throws IOException {\n return detect(f, false);\n }",
"class_method_signature": "MimeTypeUtils.detect(File f)",
"constructor": false,
"full_signature": "public static String detect(File f)",
"identifier": "detect",
"invocations": [
"detect"
],
"modi... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_2 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "georocket-server/src/test/java/io... | {
"body": "@Test\n public void detectXML() throws IOException {\n File tempFile = folder.newFile();\n FileUtils.write(tempFile, \" \\n\\n\\n <root></root> \", StandardCharsets.UTF_8);\n assertEquals(XML, detect(tempFile));\n }",
"class_method_signature": "MimeTypeUtilsTest.detectXML()",
"constructo... | {
"fields": [
{
"declarator": "XML = \"application/xml\"",
"modifier": "public static final",
"original_string": "public static final String XML = \"application/xml\";",
"type": "String",
"var_name": "XML"
},
{
"declarator": "JSON = \"application/json\"",
"modifie... | {
"body": "public static String detect(File f) throws IOException {\n return detect(f, false);\n }",
"class_method_signature": "MimeTypeUtils.detect(File f)",
"constructor": false,
"full_signature": "public static String detect(File f)",
"identifier": "detect",
"invocations": [
"detect"
],
"modi... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_27 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void putMapping(TestContext context) {\n wireMockRule1.stubFor(put(urlEqualTo(\"/\" + INDEX + \"/_mapping/\" + TYPE +\n \"?include_type_name=true\"))\n .willReturn(aResponse()\n .withStatus(200)\n .withBody(ACKNOWLEDGED.encode())));\n\n JsonObject mappings ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> putMapping(String type, JsonObject mapping) {\n // TODO remove include_type_name parameter when we migrate to Elasticsearch 8\n // TODO and drop support for version 6\n String uri = \"/\" + index + \"/_mapping/\" + type + \"?include_type_name=true\";\n return... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_31 | {
"fields": [
{
"declarator": "INDEX = \"myindex\"",
"modifier": "private static final",
"original_string": "private static final String INDEX = \"myindex\";",
"type": "String",
"var_name": "INDEX"
},
{
"declarator": "TYPE = \"mytype\"",
"modifier": "private stati... | {
"body": "@Test\n public void isRunningFalse(TestContext context) {\n Async async = context.async();\n client.isRunning().subscribe(r -> {\n context.assertFalse(r);\n async.complete();\n }, context::fail);\n }",
"class_method_signature": "RemoteElasticsearchClientTest.isRunningFalse(TestContex... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RemoteElasticsearchClient.class)",
"modifier": "private static",
"original_string": "private static Logger log = LoggerFactory.getLogger(RemoteElasticsearchClient.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public Single<Boolean> isRunning() {\n return client.performRequestNoRetry(HttpMethod.HEAD, \"/\", null)\n .map(v -> true).onErrorReturn(t -> false);\n }",
"class_method_signature": "RemoteElasticsearchClient.isRunning()",
"constructor": false,
"full_signature": "@Override pub... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_66 | {
"fields": [],
"file": "georocket-server-api/src/test/java/io/georocket/query/ElasticsearchQueryHelperTest.java",
"identifier": "ElasticsearchQueryHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBoolQuery() {\n assertEquals(new JsonObject().put(\"bool\", new JsonObject()), boolQuery());\n assertEquals(new JsonObject().put(\"bool\", new JsonObject()\n .put(\"minimum_should_match\", 1)), boolQuery(1));\n }",
"class_method_signature": "ElasticsearchQueryHelper... | {
"fields": [],
"file": "georocket-server-api/src/main/java/io/georocket/query/ElasticsearchQueryHelper.java",
"identifier": "ElasticsearchQueryHelper",
"interfaces": "",
"methods": [
{
"class_method_signature": "ElasticsearchQueryHelper.ElasticsearchQueryHelper()",
"constructor": true,
... | {
"body": "public static JsonObject boolQuery() {\n return new JsonObject()\n .put(\"bool\", new JsonObject());\n }",
"class_method_signature": "ElasticsearchQueryHelper.boolQuery()",
"constructor": false,
"full_signature": "public static JsonObject boolQuery()",
"identifier": "boolQuery",
"invoc... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_11 | {
"fields": [],
"file": "georocket-server/src/test/java/io/georocket/util/QuotedStringSplitterTest.java",
"identifier": "QuotedStringSplitterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void mixed() {\n assertEquals(Arrays.asList(\"'s g'\", \"s' \", \"\\\"s\", \"s\\\"\"),\n QuotedStringSplitter.split(\"\\\"'s g'\\\" \\\"s' \\\" '\\\"s' 's\\\"'\"));\n }",
"class_method_signature": "QuotedStringSplitterTest.mixed()",
"constructor": false,
"full_signature": "... | {
"fields": [
{
"declarator": "pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\\\\\\'|[^'])*)'|(\\\\S+)\")",
"modifier": "private static final",
"original_string": "private static final Pattern pattern =\n Pattern.compile(\"\\\"((\\\\\\\\\\\"|[^\\\"])*)\\\"|'((\\\... | {
"body": "public static List<String> split(String str) {\n Matcher m = pattern.matcher(str);\n List<String> result = new ArrayList<>();\n while (m.find()) {\n String r;\n if (m.group(1) != null) {\n r = m.group(1);\n } else if (m.group(3) != null) {\n r = m.group(3);\n } el... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_46 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/MapUtilsTest.java",
"identifier": "MapUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void mergeUnmodifiableMaps() {\n Map<String, String> m1 = new HashMap<>();\n m1.put(\"a\", \"1\");\n m1.put(\"b\", \"0\");\n m1 = Collections.unmodifiableMap(m1);\n Map<String, String> m2 = new HashMap<>();\n m2.put(\"a\", \"1\");\n m2.put(\"b\", \"0\");\n m2 = Colle... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/MapUtils.java",
"identifier": "MapUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MapUtils.deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2)",
"constructor": false,
"full_signature": "@S... | {
"body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> void deepMerge(Map<K, V> m1, Map<? extends K, ? extends V> m2) {\n for (K k : m2.keySet()) {\n V v1 = m1.get(k);\n V v2 = m2.get(k);\n if (v1 instanceof Collection && v2 instanceof Collection) {\n if (((Collection<Object>)v1)... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
58203049_50 | {
"fields": [],
"file": "georocket-common/src/test/java/io/georocket/util/PathUtilsTest.java",
"identifier": "PathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void plainJoin() {\n assertEquals(\"abc\", join(\"abc\"));\n assertEquals(\"aa/bb\", join(\"aa\", \"bb\"));\n assertEquals(\"/aa/bb\", join(\"/aa\", \"bb\"));\n assertEquals(\"/aa/bb\", join(\"/aa\", \"/bb\"));\n assertEquals(\"/aa/bb/\", join(\"/aa\", \"/bb/\"));\n }",
"c... | {
"fields": [],
"file": "georocket-common/src/main/java/io/georocket/util/PathUtils.java",
"identifier": "PathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"full_signature": "public static String join(String...... | {
"body": "public static String join(String... paths) {\n String joined = Stream.of(paths)\n .filter(p -> p != null && !p.isEmpty())\n .collect(Collectors.joining(\"/\"));\n return normalize(joined);\n }",
"class_method_signature": "PathUtils.join(String... paths)",
"constructor": false,
"f... | {
"created": null,
"fork": null,
"fork_count": 23,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 58203049,
"size": 2044,
"stargazer_count": 43,
"stars": null,
"updates": null,
"url": "https://github.com/georocket/georocket"
} |
48418599_0 | {
"fields": [
{
"declarator": "commandHandlerProvider",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CommandHandlerProvider commandHandlerProvider;",
"type": "CommandHandlerProvider",
"var_name": "commandHandlerProvider"
}
],
"file": "fin... | {
"body": "@Test\n public void shouldRegisterHandler() {\n final Long testCommandId = 815L;\n\n final NewCommandSourceHandler registeredHandler = this.commandHandlerProvider.getHandler(\"HUMAN\", \"UPDATE\");\n\n final CommandProcessingResult result = registeredHandler\n .proces... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(CommandHandlerProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CommandHandlerProvider.class);",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public NewCommandSourceHandler getHandler(final String entity, final String action) {\n Preconditions.checkArgument(StringUtils.isNoneEmpty(entity), \"An entity must be given!\");\n Preconditions.checkArgument(StringUtils.isNoneEmpty(action), \"An action must be given!\");\n\n final St... | {
"created": "12/22/2015 8:00:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 48418599,
"size": null,
"stargazer_count": null,
"stars": 379,
"updates": "2020-01-27T21:02:45+00:00",
"url": "https://github.com/apache/fineract... |
48418599_1 | {
"fields": [
{
"declarator": "commandHandlerProvider",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CommandHandlerProvider commandHandlerProvider;",
"type": "CommandHandlerProvider",
"var_name": "commandHandlerProvider"
}
],
"file": "fin... | {
"body": "@Test\n public void shouldThrowUnsupportedCommandException() throws UnsupportedCommandException {\n Assertions.assertThrows(UnsupportedCommandException.class, () -> {\n this.commandHandlerProvider.getHandler(\"WHATEVER\", \"DOSOMETHING\");\n });\n }",
"class_method_signatur... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(CommandHandlerProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CommandHandlerProvider.class);",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public NewCommandSourceHandler getHandler(final String entity, final String action) {\n Preconditions.checkArgument(StringUtils.isNoneEmpty(entity), \"An entity must be given!\");\n Preconditions.checkArgument(StringUtils.isNoneEmpty(action), \"An action must be given!\");\n\n final St... | {
"created": "12/22/2015 8:00:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 48418599,
"size": null,
"stargazer_count": null,
"stars": 379,
"updates": "2020-01-27T21:02:45+00:00",
"url": "https://github.com/apache/fineract... |
48418599_2 | {
"fields": [],
"file": "fineract-provider/src/test/java/org/apache/fineract/infrastructure/security/utils/SQLBuilderTest.java",
"identifier": "SQLBuilderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLowerAndUpperCaseOperators() {\n SQLBuilder sqlBuilder = new SQLBuilder();\n sqlBuilder.addCriteria(\"hobby LIKE \", \"Mifos/Apache Fineract\");\n sqlBuilder.addCriteria(\"hobby like \", \"Mifos/Apache Fineract\");\n }",
"class_method_signature": "SQLBui... | {
"fields": [
{
"declarator": "ATOZ = Pattern.compile(\"([a-zA-Z_][a-zA-Z0-9_-]*\\\\.)?[a-zA-Z_-][a-zA-Z0-9_-]*\")",
"modifier": "private static final",
"original_string": "private static final Pattern ATOZ = Pattern.compile(\"([a-zA-Z_][a-zA-Z0-9_-]*\\\\.)?[a-zA-Z_-][a-zA-Z0-9_-]*\");",
"... | {
"body": "public void addCriteria(String criteria, Object argument) {\n if (criteria == null || criteria.trim().isEmpty()) {\n throw new IllegalArgumentException(\"criteria cannot be null\");\n }\n String trimmedCriteria = criteria.trim();\n if (trimmedCriteria.isEmpty()) {\n ... | {
"created": "12/22/2015 8:00:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 48418599,
"size": null,
"stargazer_count": null,
"stars": 379,
"updates": "2020-01-27T21:02:45+00:00",
"url": "https://github.com/apache/fineract... |
48418599_3 | {
"fields": [],
"file": "fineract-provider/src/test/java/org/apache/fineract/infrastructure/security/utils/SQLBuilderTest.java",
"identifier": "SQLBuilderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAddIllegalArguments() throws Exception {\n assertThrows(IllegalArgumentException.class, () -> {\n new SQLBuilder().addCriteria(\"age<\", 123);\n }, \"space between column and operator\");\n assertThrows(IllegalArgumentException.class, () -> {\n ... | {
"fields": [
{
"declarator": "ATOZ = Pattern.compile(\"([a-zA-Z_][a-zA-Z0-9_-]*\\\\.)?[a-zA-Z_-][a-zA-Z0-9_-]*\")",
"modifier": "private static final",
"original_string": "private static final Pattern ATOZ = Pattern.compile(\"([a-zA-Z_][a-zA-Z0-9_-]*\\\\.)?[a-zA-Z_-][a-zA-Z0-9_-]*\");",
"... | {
"body": "public void addCriteria(String criteria, Object argument) {\n if (criteria == null || criteria.trim().isEmpty()) {\n throw new IllegalArgumentException(\"criteria cannot be null\");\n }\n String trimmedCriteria = criteria.trim();\n if (trimmedCriteria.isEmpty()) {\n ... | {
"created": "12/22/2015 8:00:06 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 48418599,
"size": null,
"stargazer_count": null,
"stars": 379,
"updates": "2020-01-27T21:02:45+00:00",
"url": "https://github.com/apache/fineract... |
43734923_186 | {
"fields": [],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/IndexPlanValidator/TupleReArrangerTest.java",
"identifier": "TupleReArrangerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void tupleReArrangeTest3() throws MalformedQueryException {\n\n String queryString = \"\"//\n + \"SELECT ?a ?b ?c ?d ?e ?x ?y\" //\n + \"{\" //\n + \" Filter(?c = <uri:label2>)\" //\n + \" Filter(?x = <uri:somethingFunny>)... | {
"fields": [
{
"declarator": "joinArgs",
"modifier": "private static",
"original_string": "private static Map<Join, List<List<TupleExpr>>> joinArgs;",
"type": "Map<Join, List<List<TupleExpr>>>",
"var_name": "joinArgs"
},
{
"declarator": "filterArgs",
"modifier": ... | {
"body": "public static List<TupleExpr> getTupleReOrderings(TupleExpr te) {\n\n joinArgs = Maps.newHashMap();\n filterArgs = Maps.newHashMap();\n \n NodeCollector nc = new NodeCollector();\n te.visit(nc);\n joinArgs = nc.getPerms();\n List<Join> joins = Lists.newArray... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_169 | {
"fields": [
{
"declarator": "q7 = \"\"//\n\t\t\t+ \"SELECT ?s ?t ?u \" //\n\t\t\t+ \"{\" //\n\t\t\t+ \" ?s a ?t .\"//\n\t\t\t+ \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n\t\t\t+ \" ?u <uri:talksTo> ?s . \"//\n\t\t\t+ \"}\"",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n\tpublic void testTwoIndexFilter1() throws Exception {\n\n\t\tSPARQLParser parser = new SPARQLParser();\n\n\t\tParsedQuery pq1 = parser.parseQuery(q15, null);\n\t\tParsedQuery pq2 = parser.parseQuery(q16, null);\n\t\tParsedQuery pq3 = parser.parseQuery(q17, null);\n\n\t\tSystem.out.println(\"Query i... | {
"fields": [
{
"declarator": "queryConstantMap",
"modifier": "private",
"original_string": "private Map<String, Integer> queryConstantMap;",
"type": "Map<String, Integer>",
"var_name": "queryConstantMap"
},
{
"declarator": "querySpCount",
"modifier": "private",
... | {
"body": "@Override\n\tpublic List<ExternalTupleSet> getRelevantIndices(List<ExternalTupleSet> indexList) {\n\n List<ExternalTupleSet> relIndexSet = new ArrayList<>();\n\n for (ExternalTupleSet e : indexList) {\n\n if (isRelevant(e.getTupleExpr())) {\n relIndexSet.add(e);\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_240 | {
"fields": [],
"file": "extras/rya.streams/query-manager/src/test/java/org/apache/rya/streams/querymanager/kafka/LocalQueryExecutorTest.java",
"identifier": "LocalQueryExecutorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void stopQuery() throws Exception {\n // Test values.\n final String ryaInstance = \"rya\";\n final StreamsQuery query = new StreamsQuery(UUID.randomUUID(), \"SELECT * WHERE { ?a ?b ?c. }\", true, false);\n\n // Mock the streams factory so that we can tell if t... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(LocalQueryExecutor.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(LocalQueryExecutor.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public void stopQuery(final UUID queryId) throws QueryExecutorException {\n requireNonNull(queryId);\n checkState(state() == State.RUNNING, \"The service must be RUNNING to execute this method.\");\n\n lock.lock();\n try {\n if(byQueryId.containsKey(que... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_305 | {
"fields": [],
"file": "common/rya.api.model/src/test/java/org/apache/rya/api/model/visibility/VisibilitySimplifierTest.java",
"identifier": "VisibilitySimplifierTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void unionAndSimplify_bothAreEmpty() {\n final String simplified = new VisibilitySimplifier().unionAndSimplify(\"\", \"\");\n assertEquals(\"\", simplified);\n }",
"class_method_signature": "VisibilitySimplifierTest.unionAndSimplify_bothAreEmpty()",
"constructor": fal... | {
"fields": [],
"file": "common/rya.api.model/src/main/java/org/apache/rya/api/model/visibility/VisibilitySimplifier.java",
"identifier": "VisibilitySimplifier",
"interfaces": "",
"methods": [
{
"class_method_signature": "VisibilitySimplifier.unionAndSimplify(final String vis1, final String vis2)",
... | {
"body": "public static String unionAndSimplify(final String vis1, final String vis2) {\n requireNonNull(vis1);\n requireNonNull(vis2);\n\n if(vis1.isEmpty()) {\n return vis2;\n }\n\n if(vis2.isEmpty()) {\n return vis1;\n }\n\n return simplify(\"... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_217 | {
"fields": [
{
"declarator": "provider",
"modifier": "private final",
"original_string": "private final AbstractPcjIndexSetProvider provider;",
"type": "AbstractPcjIndexSetProvider",
"var_name": "provider"
}
],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/p... | {
"body": "@Test\n public void testJoinMatcherRejectsLeftJoinPcj() throws Exception {\n\n final String query1 = \"\"//\n + \"SELECT ?e ?c ?l\" //\n + \"{\" //\n + \" ?e a ?c . \"//\n + \" ?e <uri:talksTo> ?l . \"//\n + \" ?e <http... | {
"fields": [
{
"declarator": "factory = new PCJExternalSetMatcherFactory()",
"modifier": "private static final",
"original_string": "private static final PCJExternalSetMatcherFactory factory = new PCJExternalSetMatcherFactory();",
"type": "PCJExternalSetMatcherFactory",
"var_name": ... | {
"body": "@Override\n public void optimize(TupleExpr tupleExpr, final Dataset dataset, final BindingSet bindings) {\n checkNotNull(tupleExpr);\n // first standardize query by pulling all filters to top of query if\n // they exist using TopOfQueryFilterRelocator\n tupleExpr = TopOfQuery... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_352 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "TRUE = ... | {
"body": "@Test\n public void testHours() throws DatatypeConfigurationException, ValueExprEvaluationException {\n DatatypeFactory dtf = DatatypeFactory.newInstance();\n\n ZonedDateTime zTime = testThisTimeDate;\n String time = zTime.format(DateTimeFormatter.ISO_INSTANT);\n\n ZonedDateT... | {
"fields": [
{
"declarator": "FUNCTION_IRI = FN.NAMESPACE + \"dateTimeWithin\"",
"modifier": "private static final",
"original_string": "private static final String FUNCTION_IRI = FN.NAMESPACE + \"dateTimeWithin\";",
"type": "String",
"var_name": "FUNCTION_IRI"
}
],
"file": ... | {
"body": "@Override\n public Value evaluate(ValueFactory valueFactory, Value... values) throws ValueExprEvaluationException {\n checkNotNull(valueFactory);\n checkNotNull(values);\n try {\n // general validation of input\n checkArgument(values.length == 4);\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_128 | {
"fields": [
{
"declarator": "accCon",
"modifier": "private",
"original_string": "private Connector accCon;",
"type": "Connector",
"var_name": "accCon"
},
{
"declarator": "tablename = \"table\"",
"modifier": "",
"original_string": "String tablename = \"tabl... | {
"body": "@Test\n public void testBasicColumnSubjObjPrefix() throws Exception {\n\n BatchWriter bw = null;\n\n bw = accCon.createBatchWriter(tablename, 500L * 1024L * 1024L, Long.MAX_VALUE, 30);\n\n for (int i = 0; i < 100; i++) {\n\n Mutation m = new Mutation(new Text(\"\" + i));\... | {
"fields": [
{
"declarator": "nullText = new Text()",
"modifier": "protected",
"original_string": "protected Text nullText = new Text();",
"type": "Text",
"var_name": "nullText"
},
{
"declarator": "log = Logger.getLogger(DocumentIndexIntersectingIterator.class)",
... | {
"body": "public static void setColumnFamilies(IteratorSetting cfg, TextColumn[] columns) {\n if (columns.length < 2)\n throw new IllegalArgumentException(\"Must supply at least two terms to intersect\");\n \n boolean[] prefix = new boolean[columns.length];\n \n for(int i = 0; i < columns.length;... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_201 | {
"fields": [],
"file": "extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverterTest.java",
"identifier": "TypeDocumentConverterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void toDocument() {\n // Convert a Type into a Document.\n final Type type = new Type(new RyaIRI(\"urn:icecream\"),\n ImmutableSet.<RyaIRI>builder()\n .add(new RyaIRI(\"urn:brand\"))\n .add(new RyaIRI(\"urn:flavor\"))\n ... | {
"fields": [
{
"declarator": "ID = \"_id\"",
"modifier": "public static final",
"original_string": "public static final String ID = \"_id\";",
"type": "String",
"var_name": "ID"
},
{
"declarator": "PROPERTY_NAMES = \"propertyNames\"",
"modifier": "public static f... | {
"body": "@Override\n public Document toDocument(final Type type) {\n requireNonNull(type);\n\n final Document doc = new Document();\n doc.append(ID, type.getId().getData());\n\n final List<String> propertyNames = new ArrayList<>();\n type.getPropertyNames().forEach(field -> pro... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_344 | {
"fields": [],
"file": "common/rya.api/src/test/java/org/apache/rya/api/utils/QueryInvestigatorTest.java",
"identifier": "QueryInvestigatorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = MalformedQueryException.class)\n public void isConstruct_false_malformed() throws MalformedQueryException {\n assertFalse( QueryInvestigator.isConstruct(\"not sparql\") );\n }",
"class_method_signature": "QueryInvestigatorTest.isConstruct_false_malformed()",
"constructor":... | {
"fields": [
{
"declarator": "PARSER = new SPARQLParser()",
"modifier": "private static final",
"original_string": "private static final SPARQLParser PARSER = new SPARQLParser();",
"type": "SPARQLParser",
"var_name": "PARSER"
}
],
"file": "common/rya.api/src/main/java/org/ap... | {
"body": "public static boolean isConstruct(final String sparql) throws MalformedQueryException {\n requireNonNull(sparql);\n\n try {\n // Constructs are queries, so try to create a ParsedQuery.\n PARSER.parseQuery(sparql, null);\n\n // Check to see if the SPARQL looks ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_190 | {
"fields": [
{
"declarator": "q7 = \"\"//\n\t\t\t+ \"SELECT ?s ?t ?u \" //\n\t\t\t+ \"{\" //\n\t\t\t+ \" ?s a ?t .\"//\n\t\t\t+ \" ?t <http://www.w3.org/2000/01/rdf-schema#label> ?u .\"//\n\t\t\t+ \" ?u <uri:talksTo> ?s . \"//\n\t\t\t+ \"}\"",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n\tpublic void testTwoIndex() throws Exception {\n\n\t\tString q1 = \"\"//\n\t\t\t\t+ \"SELECT ?f ?m ?d ?h ?i \" //\n\t\t\t\t+ \"{\" //\n\t\t\t\t+ \" ?f a ?m .\"//\n\t\t\t\t+ \" ?m <http://www.w3.org/2000/01/rdf-schema#label> ?d .\"//\n\t\t\t\t+ \" ?d <uri:talksTo> ?f . \"//\n\t\t\t\t+ \" ?d <uri... | {
"fields": [
{
"declarator": "query",
"modifier": "private",
"original_string": "private TupleExpr query;",
"type": "TupleExpr",
"var_name": "query"
},
{
"declarator": "queryNodeCount = 0",
"modifier": "private",
"original_string": "private int queryNodeCou... | {
"body": "@Override\n public TupleExpr getThreshholdQueryPlan(Iterator<TupleExpr> tuples, double threshhold, double indexWeight,\n double commonVarWeight, double extProdWeight) {\n\n if (threshhold < 0 || threshhold > 1) {\n throw new IllegalArgumentException(\"Threshhold must be betw... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_256 | {
"fields": [],
"file": "extras/kafka.connect/api/src/test/java/org/apache/rya/kafka/connect/api/sink/RyaSinkTaskTest.java",
"identifier": "RyaSinkTaskTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalStateException.class)\n public void start_ryaInstanceDoesNotExist() {\n // Create the task that will be tested.\n final RyaSinkTask task = new RyaSinkTask() {\n @Override\n protected void checkRyaInstanceExists(final Map<String, String> taskCon... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RyaSinkTask.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RyaSinkTask.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "@Override\n public void start(final Map<String, String> props) throws ConnectException {\n requireNonNull(props);\n\n // Ensure the configured Rya Instance is installed within the configured database.\n checkRyaInstanceExists(props);\n\n // Create the Sail object that is conn... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_313 | {
"fields": [],
"file": "common/rya.api.function/src/test/java/org/apache/rya/api/function/sp/StatementPatternMatcherTest.java",
"identifier": "StatementPatternMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void matchesContext() throws Exception {\n // Create a matcher against a pattern that matches a specific context.\n final StatementPatternMatcher matcher = new StatementPatternMatcher(getSp(\n \"SELECT * WHERE {\" +\n \"GRAPH <urn:testGraph>... | {
"fields": [
{
"declarator": "pattern",
"modifier": "private final",
"original_string": "private final StatementPattern pattern;",
"type": "StatementPattern",
"var_name": "pattern"
}
],
"file": "common/rya.api.function/src/main/java/org/apache/rya/api/function/sp/StatementPa... | {
"body": "private boolean matchesContext(@Nullable final Var cntxVar, @Nullable final Value stmtCntx, final QueryBindingSet bs) {\n if(cntxVar == null) {\n // If there is no context, automatically matches.\n return true;\n } else if(stmtCntx == null) {\n // If no value ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_104 | {
"fields": [],
"file": "extras/rya.forwardchain/src/test/java/org/apache/rya/forwardchain/rule/RulesetTest.java",
"identifier": "RulesetTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIndirectDependencies() {\n StatementPattern genericSP = new StatementPattern(new Var(\"a\"), new Var(\"b\"), new Var(\"c\"));\n StatementPattern typeSP = new StatementPattern(new Var(\"x\"), c(RDF.TYPE), new Var(\"t\"));\n StatementPattern scoSP = new Stateme... | {
"fields": [
{
"declarator": "rules",
"modifier": "private final",
"original_string": "private final Set<Rule> rules;",
"type": "Set<Rule>",
"var_name": "rules"
},
{
"declarator": "successors",
"modifier": "private final",
"original_string": "private final ... | {
"body": "public boolean pathExists(Rule r1, Rule r2) {\n if (r1 == null || r2 == null) {\n return false;\n }\n Set<Rule> forwardFrontier = new HashSet<>();\n Set<Rule> backwardFrontier = new HashSet<>();\n Set<Rule> visitedForward = new HashSet<>();\n Set<Rule> v... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_67 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "extras/rya.indexing... | {
"body": "@Test\n\tpublic void basicLongUriBsTest() throws BindingSetConversionException {\n\t\tfinal QueryBindingSet bs = new QueryBindingSet();\n\t\tbs.addBinding(\"X\", VF.createIRI(\"http://uri1\"));\n\t\tbs.addBinding(\"Y\", VF.createIRI(\"http://uri2\"));\n\t\tbs.addBinding(\"Z\",VF.createIRI(\"http://uri3\"))... | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/AccumuloPcjSerializer.java",
"identifier": "AccumuloPcjSerializer",
"interfaces": "implements BindingSetConverter<byte[]>",
"methods": [
{
"class_method_signature": "AccumuloPcjSerializer.conv... | {
"body": "@Override\n public byte[] convert(BindingSet bindingSet, VariableOrder varOrder) throws BindingSetConversionException {\n checkNotNull(bindingSet);\n checkNotNull(varOrder);\n\n // A list that holds all of the byte segments that will be concatenated at the end.\n // This mini... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_88 | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/test/java/org/apache/rya/indexing/pcj/storage/accumulo/ShiftVarOrderFactoryTest.java",
"identifier": "ShiftVarOrderFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void makeVarOrders_fromVarOrder() {\n // The VariableOrder whose PCJ var orders will be generated from.\n final VariableOrder varOrder = new VariableOrder(\"a\", \"b\", \"c\");\n\n // Run the test.\n final PcjVarOrderFactory factory = new ShiftVarOrderFactory()... | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/ShiftVarOrderFactory.java",
"identifier": "ShiftVarOrderFactory",
"interfaces": "implements PcjVarOrderFactory",
"methods": [
{
"class_method_signature": "ShiftVarOrderFactory.makeVarOrders(fi... | {
"body": "@Override\n public Set<VariableOrder> makeVarOrders(final String sparql) throws MalformedQueryException {\n requireNonNull(sparql);\n\n final Set<String> bindingNames = new SPARQLParser().parseQuery(sparql, null)\n .getTupleExpr()\n .getBindingNames();\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_368 | {
"fields": [
{
"declarator": "INPUT_AND_EXPECTED_BOOLEAN_EXPRESSIONS =\n ImmutableList.of(\n Pair.of(\"A\", \"A\"),\n Pair.of(\"A&B\", \"A&B\"),\n Pair.of(\"A|B\", \"A|B\"),\n Pair.of(\"A&(B|C)\", \"(A&B)|(A&C)\"),\n Pair.of(\"A|(B&C)\", \"A|(B&... | {
"body": "@Test\n public void testTruthTableSize2FromList() {\n final byte[][] truthTable = DisjunctiveNormalFormConverter.createTruthTableInputs(ImmutableList.of(\"A\", \"B\"));\n final byte[][] expected =\n {\n {0, 0},\n {0, 1},\n {1, 0},\n ... | {
"fields": [
{
"declarator": "log = Logger.getLogger(DisjunctiveNormalFormConverter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.getLogger(DisjunctiveNormalFormConverter.class);",
"type": "Logger",
"var_name": "log"
}
... | {
"body": "public static byte[][] createTruthTableInputs(final Node node, final byte[] expression) {\n final List<String> terms = findNodeTerms(node, expression);\n return createTruthTableInputs(terms);\n }",
"class_method_signature": "DisjunctiveNormalFormConverter.createTruthTableInputs(final Nod... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_387 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LUBM = ... | {
"body": "@Test\n public void testDistinct() {\n final AggregationPipelineQueryNode base = new AggregationPipelineQueryNode(\n collection,\n new LinkedList<>(),\n Sets.newHashSet(\"x\", \"y\"),\n Sets.newHashSet(\"x\", \"y\", \"opt\"),\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "VALUES = \"<VALUES>\"",
"modifier":... | {
"body": "public boolean distinct() {\n final List<String> key = new LinkedList<>();\n for (final String varName : bindingNames) {\n key.add(hashFieldExpr(varName));\n }\n final List<BsonField> reduceOps = new LinkedList<>();\n for (final String field : FIELDS) {\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_30 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java",
"identifier": "RyaCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSparqlQuery_fromPrompt() throws InstanceDoesNotExistException, RyaClientException, IOException {\n // Mock the object that performs the create operation.\n final String instanceName = \"unitTest\";\n final String queryContent = \"SELECT * WHERE { ?person <htt... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RyaCommands.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RyaCommands.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "@CliCommand(value = SPARQL_QUERY_CMD, help = \"Executes the provided SPARQL Query on the connected Rya instance.\")\n public String sparqlQuery(\n @CliOption(key = { \"file\" }, mandatory = false, help = \"A local file containing the SPARQL Query that is to be read and executed.\")\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_153 | {
"fields": [
{
"declarator": "conf",
"modifier": "",
"original_string": "Configuration conf;",
"type": "Configuration",
"var_name": "conf"
},
{
"declarator": "tIndexer",
"modifier": "",
"original_string": "AccumuloTemporalIndexer tIndexer;",
"type": "... | {
"body": "@Test\n public void testQueryInstantEqualsInstant() throws IOException, QueryEvaluationException, TableNotFoundException, AccumuloException, AccumuloSecurityException {\n // tiB02_E30 read as: Begins 2 seconds, ends at 30 seconds\n // these should not match as they are not instances.\n ... | {
"fields": [
{
"declarator": "TABLE_SUFFIX = \"temporal\"",
"modifier": "private static final",
"original_string": "private static final String TABLE_SUFFIX = \"temporal\";",
"type": "String",
"var_name": "TABLE_SUFFIX"
},
{
"declarator": "logger = Logger.getLogger(Acc... | {
"body": "@Override\n public CloseableIteration<Statement, QueryEvaluationException> queryInstantEqualsInstant(\n final TemporalInstant queryInstant, final StatementConstraints constraints)\n throws QueryEvaluationException {\n // get rows where the repository time is equal to the... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_295 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "NT_INPU... | {
"body": "@Test\n public void testStatementInput() throws Exception {\n RdfFileInputFormat.setRDFFormat(job, RDFFormat.NTRIPLES);\n init(NT_INPUT);\n String prefix = \"urn:lubm:rdfts#\";\n IRI[] gs = {\n VF.createIRI(prefix + \"GraduateStudent01\"),\n VF.c... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(RdfFileInputFormat.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(RdfFileInputFormat.class);",
"type": "Logger",
"var_name": "logger"
},
{
"d... | {
"body": "public static void setRDFFormat(Job job, RDFFormat format) {\n job.getConfiguration().set(FORMAT_PROP, format.getName());\n }",
"class_method_signature": "RdfFileInputFormat.setRDFFormat(Job job, RDFFormat format)",
"constructor": false,
"full_signature": "public static void setRDFFormat(Jo... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_145 | {
"fields": [],
"file": "extras/indexing/src/test/java/org/apache/rya/sail/config/RyaAccumuloSailFactoryTest.java",
"identifier": "RyaAccumuloSailFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Ignore\n @Test\n public void testAddStatement() throws Exception {\n SailRepositoryFactory f = new SailRepositoryFactory();\n Repository r = f.getRepository(getConfig());\n r.initialize();\n RepositoryConnection rc = r.getConnection();\n\n ValueFactory vf = rc.getV... | {
"fields": [
{
"declarator": "SAIL_TYPE = \"rya:RyaAccumuloSail\"",
"modifier": "public static final",
"original_string": "public static final String SAIL_TYPE = \"rya:RyaAccumuloSail\";",
"type": "String",
"var_name": "SAIL_TYPE"
}
],
"file": "extras/indexing/src/main/java/... | {
"body": "@Override\n public SailImplConfig getConfig() {\n return new RyaAccumuloSailConfig();\n }",
"class_method_signature": "RyaAccumuloSailFactory.getConfig()",
"constructor": false,
"full_signature": "@Override public SailImplConfig getConfig()",
"identifier": "getConfig",
"invocations":... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_26 | {
"fields": [],
"file": "extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java",
"identifier": "RyaCommandsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = RuntimeException.class)\n public void testLoadData_specifyInvalidFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {\n // Mock the object that performs the create operation.\n final String instanceName = \"unitTest\";\n final String stat... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(RyaCommands.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = LoggerFactory.getLogger(RyaCommands.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator... | {
"body": "@CliCommand(value = LOAD_DATA_CMD, help = \"Loads RDF Statement data from a local file to the connected Rya instance.\")\n public String loadData(\n @CliOption(key = { \"file\" }, mandatory = true, help = \"A local file containing RDF Statements that is to be loaded.\")\n final Str... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_329 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
},
{
"declarator": "LANGUAG... | {
"body": "@Test\n public void testConvertLiteral_nullDataType() {\n final String expectedData = \"Ice Cream\";\n final RyaType ryaType = new RyaType(null, expectedData);\n final Literal literal = RyaToRdfConversions.convertLiteral(ryaType);\n final Literal expected = VF.createLiteral(e... | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "common/rya.api/src/... | {
"body": "public static Literal convertLiteral(final RyaType ryaType) {\n if (XMLSchema.STRING.equals(ryaType.getDataType())) {\n return VF.createLiteral(ryaType.getData());\n } else if (RDF.LANGSTRING.equals(ryaType.getDataType())) {\n final String data = ryaType.getData();\n ... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_283 | {
"fields": [
{
"declarator": "DELIM = \"\\u0000\"",
"modifier": "private static final",
"original_string": "private static final String DELIM = \"\\u0000\";",
"type": "String",
"var_name": "DELIM"
},
{
"declarator": "EMPTY_BYTE = new byte[0]",
"modifier": "privat... | {
"body": "@Test\n public void testOptimizeQ5() throws Exception {\n\n RdfEvalStatsDAO<RdfCloudTripleStoreConfiguration> res = new ProspectorServiceEvalStatsDAO(conn, arc);\n AccumuloSelectivityEvalDAO accc = new AccumuloSelectivityEvalDAO();\n accc.setConf(arc);\n accc.setConnector(conn);\n accc.setR... | {
"fields": [
{
"declarator": "statistics",
"modifier": "private final",
"original_string": "private final EvaluationStatistics statistics;",
"type": "EvaluationStatistics",
"var_name": "statistics"
},
{
"declarator": "eval",
"modifier": "private final",
"or... | {
"body": "public void optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings) {\n tupleExpr.visit(new JoinVisitor());\n }",
"class_method_signature": "QueryJoinSelectOptimizer.optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings)",
"constructor": false,
"full_signature": "public v... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_71 | {
"fields": [
{
"declarator": "VF = SimpleValueFactory.getInstance()",
"modifier": "private static final",
"original_string": "private static final ValueFactory VF = SimpleValueFactory.getInstance();",
"type": "ValueFactory",
"var_name": "VF"
}
],
"file": "extras/rya.indexing... | {
"body": "@Test\n\tpublic void basicMixUriLiteralBsTest() throws BindingSetConversionException {\n\t\tfinal QueryBindingSet bs = new QueryBindingSet();\n\t\tbs.addBinding(\"X\", VF.createLiteral(\"literal1\"));\n\t\tbs.addBinding(\"Y\", VF.createLiteral(\"5\", VF.createIRI(\"http://www.w3.org/2001/XMLSchema#integer\... | {
"fields": [],
"file": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/AccumuloPcjSerializer.java",
"identifier": "AccumuloPcjSerializer",
"interfaces": "implements BindingSetConverter<byte[]>",
"methods": [
{
"class_method_signature": "AccumuloPcjSerializer.conv... | {
"body": "@Override\n public byte[] convert(BindingSet bindingSet, VariableOrder varOrder) throws BindingSetConversionException {\n checkNotNull(bindingSet);\n checkNotNull(varOrder);\n\n // A list that holds all of the byte segments that will be concatenated at the end.\n // This mini... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
43734923_112 | {
"fields": [],
"file": "extras/rya.forwardchain/src/test/java/org/apache/rya/forwardchain/rule/ConstructConsequentVisitorTest.java",
"identifier": "ConstructConsequentVisitorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMissingVariables() {\n Extension extension = new Extension(new SingletonSet(),\n new ExtensionElem(new ValueConstant(FOAF.PERSON), \"x\"),\n new ExtensionElem(new ValueConstant(RDF.TYPE), \"y\"));\n Projection projection = new Projectio... | {
"fields": [
{
"declarator": "consequentStatementPatterns = new HashSet<>()",
"modifier": "private",
"original_string": "private Set<StatementPattern> consequentStatementPatterns = new HashSet<>();",
"type": "Set<StatementPattern>",
"var_name": "consequentStatementPatterns"
},
... | {
"body": "public Set<StatementPattern> getConsequents() {\n return consequentStatementPatterns;\n }",
"class_method_signature": "ConstructConsequentVisitor.getConsequents()",
"constructor": false,
"full_signature": "public Set<StatementPattern> getConsequents()",
"identifier": "getConsequents",
"... | {
"created": null,
"fork": null,
"fork_count": 72,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 43734923,
"size": 8707,
"stargazer_count": 93,
"stars": null,
"updates": null,
"url": "https://github.com/apache/rya"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.