id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
8087042_16 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testSendNoRetry_json_emptyRegIds() throws Exception {\n sender.sendNoRetry(message, Collections.<String>emptyList());\n }",
"class_method_signature": "SenderTest.testSendNoRetry_json_emptyRegIds()",
"constructor": false,
"full_signat... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "public Result sendNoRetry(Message message, String registrationId)\n throws IOException {\n StringBuilder body = newBody(PARAM_REGISTRATION_ID, registrationId);\n Boolean delayWhileIdle = message.isDelayWhileIdle();\n if (delayWhileIdle != null) {\n addParameter(body, PARAM_DELAY_WHILE_ID... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_20 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testNewKeyValues() {\n Map<String, String> x = Sender.newKeyValues(\"key\", \"value\");\n assertEquals(1, x.size());\n assertEquals(\"value\", x.get(\"key\"));\n }",
"class_method_signature": "SenderTest.testNewKeyValues()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "protected static final Map<String, String> newKeyValues(String key,\n String value) {\n Map<String, String> keyValues = new HashMap<String, String>(1);\n keyValues.put(nonNull(key), nonNull(value));\n return keyValues;\n }",
"class_method_signature": "Sender.newKeyValues(String key,\n ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_2 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testSendNoRetry_ok() throws Exception {\n setResponseExpectations(200, \"id=4815162342\");\n Result result = sender.sendNoRetry(message, regId);\n assertNotNull(result);\n assertEquals(\"4815162342\", result.getMessageId());\n assertNull(result.getCanonicalRegistrationId... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "public Result sendNoRetry(Message message, String registrationId)\n throws IOException {\n StringBuilder body = newBody(PARAM_REGISTRATION_ID, registrationId);\n Boolean delayWhileIdle = message.isDelayWhileIdle();\n if (delayWhileIdle != null) {\n addParameter(body, PARAM_DELAY_WHILE_ID... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_36 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testPost_customType() throws Exception {\n String requestBody = \"req\";\n String responseBody = \"resp\";\n setResponseExpectations(200, responseBody);\n HttpURLConnection response =\n sender.post(Constants.GCM_SEND_ENDPOINT, \"stuff\", requestBody);\n assertEqua... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "protected HttpURLConnection post(String url, String body)\n throws IOException {\n return post(url, \"application/x-www-form-urlencoded;charset=UTF-8\", body);\n }",
"class_method_signature": "Sender.post(String url, String body)",
"constructor": false,
"full_signature": "protected HttpURLCo... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_11 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test(expected = IOException.class)\n public void testSendNoRetry_invalidToken() throws Exception {\n setResponseExpectations(200, \"bad=token\");\n sender.sendNoRetry(message, regId);\n }",
"class_method_signature": "SenderTest.testSendNoRetry_invalidToken()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "public Result sendNoRetry(Message message, String registrationId)\n throws IOException {\n StringBuilder body = newBody(PARAM_REGISTRATION_ID, registrationId);\n Boolean delayWhileIdle = message.isDelayWhileIdle();\n if (delayWhileIdle != null) {\n addParameter(body, PARAM_DELAY_WHILE_ID... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_9 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test(expected = IOException.class)\n public void testSendNoRetry_emptyBody() throws Exception {\n setResponseExpectations(200, \"\");\n sender.sendNoRetry(message, regId);\n }",
"class_method_signature": "SenderTest.testSendNoRetry_emptyBody()",
"constructor": false,
"full_signature": "@Test... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "public Result sendNoRetry(Message message, String registrationId)\n throws IOException {\n StringBuilder body = newBody(PARAM_REGISTRATION_ID, registrationId);\n Boolean delayWhileIdle = message.isDelayWhileIdle();\n if (delayWhileIdle != null) {\n addParameter(body, PARAM_DELAY_WHILE_ID... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_31 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testGetString_stripsLastLine() throws Exception {\n InputStream stream = new ByteArrayInputStream(\"108\\n\".getBytes());\n String stripped = Sender.getString(stream);\n assertEquals(\"108\", stripped);\n }",
"class_method_signature": "SenderTest.testGetString_stripsLastLin... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "protected static String getString(InputStream stream) throws IOException {\n if (stream == null) {\n return \"\";\n }\n BufferedReader reader =\n new BufferedReader(new InputStreamReader(stream));\n StringBuilder content = new StringBuilder();\n String newLine;\n do {\n n... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_5 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testSendNoRetry_unauthorized_nullStream() throws Exception {\n setResponseExpectations(401, null);\n try {\n sender.sendNoRetry(message, regId);\n fail(\"Should have thrown InvalidRequestException\");\n } catch (InvalidRequestException e) {\n assertEquals(401, e... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "public Result sendNoRetry(Message message, String registrationId)\n throws IOException {\n StringBuilder body = newBody(PARAM_REGISTRATION_ID, registrationId);\n Boolean delayWhileIdle = message.isDelayWhileIdle();\n if (delayWhileIdle != null) {\n addParameter(body, PARAM_DELAY_WHILE_ID... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_27 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testAddParameter_nullBody() {\n Sender.addParameter(null, \"key\", \"value\");\n }",
"class_method_signature": "SenderTest.testAddParameter_nullBody()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentExcepti... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "protected static void addParameter(StringBuilder body, String name,\n String value) {\n nonNull(body).append('&')\n .append(nonNull(name)).append('=').append(nonNull(value));\n }",
"class_method_signature": "Sender.addParameter(StringBuilder body, String name,\n String value)",
"co... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_26 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testAddParameter() {\n StringBuilder body = new StringBuilder(\"P=NP\");\n Sender.addParameter(body, \"name\", \"value\");\n assertEquals(\"P=NP&name=value\", body.toString());\n }",
"class_method_signature": "SenderTest.testAddParameter()",
"constructor": false,
"full_... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "protected static void addParameter(StringBuilder body, String name,\n String value) {\n nonNull(body).append('&')\n .append(nonNull(name)).append('=').append(nonNull(value));\n }",
"class_method_signature": "Sender.addParameter(StringBuilder body, String name,\n String value)",
"co... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_4 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testSendNoRetry_unauthorized() throws Exception {\n setResponseExpectations(401, \"\");\n try {\n sender.sendNoRetry(message, regId);\n fail(\"Should have thrown InvalidRequestException\");\n } catch (InvalidRequestException e) {\n assertEquals(401, e.getHttpSta... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "public Result sendNoRetry(Message message, String registrationId)\n throws IOException {\n StringBuilder body = newBody(PARAM_REGISTRATION_ID, registrationId);\n Boolean delayWhileIdle = message.isDelayWhileIdle();\n if (delayWhileIdle != null) {\n addParameter(body, PARAM_DELAY_WHILE_ID... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_30 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testGetString_oneLine() throws Exception {\n String expected = \"108\";\n InputStream stream = new ByteArrayInputStream(expected.getBytes());\n String actual = Sender.getString(stream);\n assertEquals(expected, actual);\n }",
"class_method_signature": "SenderTest.testGet... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "protected static String getString(InputStream stream) throws IOException {\n if (stream == null) {\n return \"\";\n }\n BufferedReader reader =\n new BufferedReader(new InputStreamReader(stream));\n StringBuilder content = new StringBuilder();\n String newLine;\n do {\n n... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_8 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test\n public void testSendNoRetry_internalServerError() throws Exception {\n setResponseExpectations(500, \"\");\n Result result = sender.sendNoRetry(message, regId);\n assertNull(result);\n assertRequestBody();\n }",
"class_method_signature": "SenderTest.testSendNoRetry_internalServerErr... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "public Result sendNoRetry(Message message, String registrationId)\n throws IOException {\n StringBuilder body = newBody(PARAM_REGISTRATION_ID, registrationId);\n Boolean delayWhileIdle = message.isDelayWhileIdle();\n if (delayWhileIdle != null) {\n addParameter(body, PARAM_DELAY_WHILE_ID... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
8087042_10 | {
"fields": [
{
"declarator": "regId = \"15;16\"",
"modifier": "private final",
"original_string": "private final String regId = \"15;16\";",
"type": "String",
"var_name": "regId"
},
{
"declarator": "collapseKey = \"collapseKey\"",
"modifier": "private final",
... | {
"body": "@Test(expected = IOException.class)\n public void testSendNoRetry_noToken() throws Exception {\n setResponseExpectations(200, \"no token\");\n sender.sendNoRetry(message, regId);\n }",
"class_method_signature": "SenderTest.testSendNoRetry_noToken()",
"constructor": false,
"full_signature": "@... | {
"fields": [
{
"declarator": "UTF8 = \"UTF-8\"",
"modifier": "protected static final",
"original_string": "protected static final String UTF8 = \"UTF-8\";",
"type": "String",
"var_name": "UTF8"
},
{
"declarator": "BACKOFF_INITIAL_DELAY = 1000",
"modifier": "prote... | {
"body": "public Result sendNoRetry(Message message, String registrationId)\n throws IOException {\n StringBuilder body = newBody(PARAM_REGISTRATION_ID, registrationId);\n Boolean delayWhileIdle = message.isDelayWhileIdle();\n if (delayWhileIdle != null) {\n addParameter(body, PARAM_DELAY_WHILE_ID... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 8087042,
"size": 228,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/guetux/gcm-sample"
} |
20710724_2 | {
"fields": [
{
"declarator": "PER = new EntityClass(\"PERSON\")",
"modifier": "static final",
"original_string": "static final EntityClass PER = new EntityClass(\"PERSON\");",
"type": "EntityClass",
"var_name": "PER"
},
{
"declarator": "ORG = new EntityClass(\"ORGANIZA... | {
"body": "@Test(dataProvider = \"testProcess\")\n public void testProcess(final String phrase, final List<Result> resultList) {\n final NerResultSet result = namedEntityAnalyser.process(phrase);\n\n // check that we have the correctly matched phrases and types\n final Map<EntityClass, Set<Str... | {
"fields": [
{
"declarator": "extractor",
"modifier": "private final",
"original_string": "private final NameExtractor extractor;",
"type": "NameExtractor",
"var_name": "extractor"
},
{
"declarator": "classifier",
"modifier": "private final",
"original_stri... | {
"body": "public NerResultSet process(final String text) {\n // program pipeline: (Text) ------> (Phrases without classified) ------> (Phrases classified)\n // extractor classifier\n final NerResultSet rs = extractor.process(text);\n clas... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 20710724,
"size": 55517,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/NICTA/nicta-ner"
} |
20710724_3 | {
"fields": [],
"file": "nicta-ner/src/test/java/org/t3as/ner/resource/ConfigurationTest.java",
"identifier": "ConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"configTest\")\n public void configTest(final String configResource, final Result r) throws IOException, InterruptedException {\n final Configuration config = new Configuration(this.getClass().getResourceAsStream(configResource), false);\n assertEquals(config.getFeatu... | {
"fields": [
{
"declarator": "DEFAULT_CONFIG_RESOURCE = \"config\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_CONFIG_RESOURCE = \"config\";",
"type": "String",
"var_name": "DEFAULT_CONFIG_RESOURCE"
},
{
"declarator": "tr... | {
"body": "public FeatureMap getFeatureMap() { return featureMap; }",
"class_method_signature": "Configuration.getFeatureMap()",
"constructor": false,
"full_signature": "public FeatureMap getFeatureMap()",
"identifier": "getFeatureMap",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"re... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 20710724,
"size": 55517,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/NICTA/nicta-ner"
} |
20710724_0 | {
"fields": [],
"file": "nicta-ner/src/test/java/org/t3as/ner/data/DateMatcherTest.java",
"identifier": "DateMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"dateStrings\")\n public void testIsDate(final String s, final boolean expected) {\n Assert.assertEquals(DateMatcher.isDate(s), expected, s);\n }",
"class_method_signature": "DateMatcherTest.testIsDate(final String s, final boolean expected)",
"constructor": false,
... | {
"fields": [
{
"declarator": "PATTERNS",
"modifier": "private static final",
"original_string": "private static final ImmutableCollection<Pattern> PATTERNS;",
"type": "ImmutableCollection<Pattern>",
"var_name": "PATTERNS"
}
],
"file": "nicta-ner/src/main/java/org/t3as/ner/da... | {
"body": "public static boolean isDate(final String text) {\n for (final Pattern pattern : PATTERNS) {\n if (pattern.matcher(text).matches()) return true;\n }\n return false;\n }",
"class_method_signature": "DateMatcher.isDate(final String text)",
"constructor": false,
"full_... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 20710724,
"size": 55517,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/NICTA/nicta-ner"
} |
20710724_1 | {
"fields": [],
"file": "nicta-ner/src/test/java/org/t3as/ner/util/TokenizerTest.java",
"identifier": "TokenizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"text\")\n public void testProcess(final String text, final List<List<Token>> expected) {\n final Tokenizer t = new Tokenizer(Tokenizer.Mode.WITH_PUNCTUATION);\n final List<List<Token>> result = t.process(text);\n Assert.assertEquals(result, expected, \"Wrong e... | {
"fields": [
{
"declarator": "ABBREVIATION_EXCEPTIONS",
"modifier": "private static final",
"original_string": "private static final ImmutableCollection<String> ABBREVIATION_EXCEPTIONS;",
"type": "ImmutableCollection<String>",
"var_name": "ABBREVIATION_EXCEPTIONS"
},
{
... | {
"body": "public List<List<Token>> process(final String text) {\n final List<List<Token>> paragraph = new ArrayList<>();\n currentSentence = new ArrayList<>();\n final Tokens tokens = splitText(text);\n\n while (tokens.hasNext()) {\n final Token t = tokens.next();\n ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 20710724,
"size": 55517,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/NICTA/nicta-ner"
} |
3411081_20 | {
"fields": [
{
"declarator": "factory",
"modifier": "final",
"original_string": "final BalancerFactory factory;",
"type": "BalancerFactory",
"var_name": "factory"
},
{
"declarator": "databases = new MockDatabase[] { new MockDatabase(\"0\", 0), new MockDatabase(\"1\", 1... | {
"body": "@Test\n\tpublic void containsAll()\n\t{\n\t\tBalancer<Void, MockDatabase> balancer = this.factory.createBalancer(Collections.<MockDatabase>emptySet());\n\n\t\tassertTrue(balancer.containsAll(Collections.emptyList()));\n\t\tassertFalse(balancer.containsAll(Collections.singletonList(this.databases[0])));\n\t... | {
"fields": [],
"file": "core/src/main/java/net/sf/hajdbc/balancer/AbstractBalancer.java",
"identifier": "AbstractBalancer",
"interfaces": "implements Balancer<Z, D>",
"methods": [
{
"class_method_signature": "AbstractBalancer.getDatabases()",
"constructor": false,
"full_signature": "pro... | {
"body": "@Override\n\tpublic boolean containsAll(Collection<?> databases)\n\t{\n\t\treturn this.getDatabases().containsAll(databases);\n\t}",
"class_method_signature": "AbstractBalancer.containsAll(Collection<?> databases)",
"constructor": false,
"full_signature": "@Override public boolean containsAll(Collect... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_61 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void evaluateCurrentTimestamp()\n\t{\n\t\tjava.sql.Timestamp timestamp = new java.sql.Timestamp(System.currentTimeMillis());\n\t\t\n\t\tassertEquals(String.format(\"SELECT TIMESTAMP '%s' FROM test\", timestamp.toString()), this.dialect.evaluateCurrentTimestamp(\"SELECT CURRENT_TIMESTAMP FRO... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String evaluateCurrentTimestamp(String sql, java.sql.Timestamp timestamp)\n\t{\n\t\treturn evaluateTemporal(sql, this.currentTimestampPattern, timestamp, this.timestampLiteralFormat());\n\t}",
"class_method_signature": "StandardDialect.evaluateCurrentTimestamp(String sql, java.sql.Tim... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_36 | {
"fields": [
{
"declarator": "factory = new SQLExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<SQLException> factory = new SQLExceptionFactory();",
"type": "ExceptionFactory<SQLException>",
"var_name": "factory"
}
],
"file... | {
"body": "@Test\n\tpublic void indicatesFailure()\n\t{\n\t\tDialect dialect = mock(Dialect.class);\n\t\tSQLException exception = new SQLException();\n\t\tSQLException nextException = new SQLException();\n\t\t\n\t\twhen(dialect.indicatesFailure(exception)).thenReturn(true);\n\t\t\n\t\tboolean result = this.factory.in... | {
"fields": [
{
"declarator": "serialVersionUID = -7352436527312370925L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -7352436527312370925L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic boolean indicatesFailure(SQLException exception, Dialect dialect)\n\t{\n\t\tSQLException nextException = exception.getNextException();\n\t\t\n\t\treturn dialect.indicatesFailure(exception) || ((nextException != null) && this.indicatesFailure(nextException, dialect));\n\t}",
"class_met... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_41 | {
"fields": [
{
"declarator": "factory = new XAExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<XAException> factory = new XAExceptionFactory();",
"type": "ExceptionFactory<XAException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void equals()\n\t{\n\t\tassertTrue(this.factory.equals(new XAException(), new XAException()));\n\t\t\n\t\tassertTrue(this.factory.equals(new XAException(XAException.XA_HEURCOM), new XAException(XAException.XA_HEURCOM)));\n\t\tassertFalse(this.factory.equals(new XAException(XAException.XA_HE... | {
"fields": [
{
"declarator": "serialVersionUID = -8802252233361030433L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8802252233361030433L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic boolean equals(XAException exception1, XAException exception2)\n\t{\n\t\t// Match by error code, if defined\n\t\tif ((exception1.errorCode != 0) || (exception2.errorCode != 0))\n\t\t{\n\t\t\treturn exception1.errorCode == exception2.errorCode;\n\t\t}\n\n\t\treturn super.equals(exception... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_6 | {
"fields": [
{
"declarator": "properties = new Properties()",
"modifier": "private final",
"original_string": "private final Properties properties = new Properties();",
"type": "Properties",
"var_name": "properties"
},
{
"declarator": "reader = mock(XMLStreamReader.cla... | {
"body": "@Test\n\tpublic void getAttributeValueByName()\n\t{\n\t\tString namespaceURI = \"url\";\n\t\tString localName = \"name\";\n\t\tString expected = \"expected\";\n\t\t\n\t\twhen(this.reader.getAttributeValue(namespaceURI, localName)).thenReturn(expected);\n\n\t\tString result = this.filter.getAttributeValue(n... | {
"fields": [
{
"declarator": "PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\");",
"type": "Pattern",
"var_name": "PATTERN"
},... | {
"body": "@Override\n\tpublic String getAttributeValue(int index)\n\t{\n\t\treturn this.replace(super.getAttributeValue(index));\n\t}",
"class_method_signature": "PropertyReplacementFilter.getAttributeValue(int index)",
"constructor": false,
"full_signature": "@Override public String getAttributeValue(int inde... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_16 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/util/CollectionsTest.java",
"identifier": "CollectionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void singletonSortedMap()\n\t{\n\t\tSortedMap<Integer, String> map = new TreeMap<>();\n\t\tmap.put(1, \"\");\n\t\t\n\t\tverify(Collections.<Integer, String>singletonSortedMap(1, \"\"), map, 0, 1, \"\");\n\t}",
"class_method_signature": "CollectionsTest.singletonSortedMap()",
"constructo... | {
"fields": [
{
"declarator": "EMPTY_SORTED_SET = new EmptySortedSet<>()",
"modifier": "public static final",
"original_string": "public static final SortedSet<?> EMPTY_SORTED_SET = new EmptySortedSet<>();",
"type": "SortedSet<?>",
"var_name": "EMPTY_SORTED_SET"
},
{
"d... | {
"body": "public static <K, V> SortedMap<K, V> singletonSortedMap(K key, V value)\n\t{\n\t\treturn new SingletonSortedMap<>(key, value);\n\t}",
"class_method_signature": "Collections.singletonSortedMap(K key, V value)",
"constructor": false,
"full_signature": "public static SortedMap<K, V> singletonSortedMap(K... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_57 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getDefaultSchemas() throws SQLException\n\t{\n\t\tDatabaseMetaData metaData = mock(DatabaseMetaData.class);\n\t\t\n\t\tString user = \"user\";\n\t\t\n\t\twhen(metaData.getUserName()).thenReturn(user);\n\t\t\n\t\tList<String> result = this.dialect.getDefaultSchemas(metaData);\n\t\t\n\t\... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic List<String> getDefaultSchemas(DatabaseMetaData metaData) throws SQLException\n\t{\n\t\treturn Collections.singletonList(metaData.getUserName());\n\t}",
"class_method_signature": "StandardDialect.getDefaultSchemas(DatabaseMetaData metaData)",
"constructor": false,
"full_signature"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_56 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void parseSequence() throws SQLException\n\t{\n\t\tSequenceSupport support = this.dialect.getSequenceSupport();\n\t\t\n\t\tif (support != null)\n\t\t{\n\t\t\tassertEquals(\"test\", support.parseSequence(\"SELECT NEXT VALUE FOR test\"));\n\t\t\tassertEquals(\"test\", support.parseSequence(\"... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String parseSequence(String sql)\n\t{\n\t\treturn this.parse(this.sequencePattern, sql);\n\t}",
"class_method_signature": "StandardDialect.parseSequence(String sql)",
"constructor": false,
"full_signature": "@Override public String parseSequence(String sql)",
"identifier": "pars... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_17 | {
"fields": [
{
"declarator": "factory",
"modifier": "final",
"original_string": "final BalancerFactory factory;",
"type": "BalancerFactory",
"var_name": "factory"
},
{
"declarator": "databases = new MockDatabase[] { new MockDatabase(\"0\", 0), new MockDatabase(\"1\", 1... | {
"body": "@Test\n\tpublic void backups()\n\t{\n\t\tBalancer<Void, MockDatabase> balancer = this.factory.createBalancer(Collections.<MockDatabase>emptySet());\n\n\t\tIterable<MockDatabase> result = balancer.backups();\t\t\n\t\tassertNotNull(result);\n\t\tIterator<MockDatabase> backups = result.iterator();\n\t\tassert... | {
"fields": [],
"file": "core/src/main/java/net/sf/hajdbc/balancer/AbstractBalancer.java",
"identifier": "AbstractBalancer",
"interfaces": "implements Balancer<Z, D>",
"methods": [
{
"class_method_signature": "AbstractBalancer.getDatabases()",
"constructor": false,
"full_signature": "pro... | {
"body": "@Override\n\tpublic Iterable<D> backups()\n\t{\n\t\tIterator<D> databases = this.getDatabases().iterator();\n\t\t\n\t\tif (!databases.hasNext() || ((databases.next() != null) && !databases.hasNext())) return Collections.emptySet();\n\t\t\n\t\tD database = databases.next();\n\t\t\n\t\tif (!databases.hasNext... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_7 | {
"fields": [
{
"declarator": "properties = new Properties()",
"modifier": "private final",
"original_string": "private final Properties properties = new Properties();",
"type": "Properties",
"var_name": "properties"
},
{
"declarator": "reader = mock(XMLStreamReader.cla... | {
"body": "@Test\n\tpublic void getElementText() throws XMLStreamException\n\t{\n\t\tString expected = \"expected\";\n\t\t\n\t\twhen(this.reader.getElementText()).thenReturn(expected);\n\n\t\tString result = this.filter.getElementText();\n\t\t\n\t\tassertSame(expected, result);\n\t\t\n\t\twhen(this.reader.getElementT... | {
"fields": [
{
"declarator": "PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\");",
"type": "Pattern",
"var_name": "PATTERN"
},... | {
"body": "@Override\n\tpublic String getElementText() throws XMLStreamException\n\t{\n\t\treturn this.replace(super.getElementText());\n\t}",
"class_method_signature": "PropertyReplacementFilter.getElementText()",
"constructor": false,
"full_signature": "@Override public String getElementText()",
"identifier... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_40 | {
"fields": [
{
"declarator": "factory = new XAExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<XAException> factory = new XAExceptionFactory();",
"type": "ExceptionFactory<XAException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void getType()\n\t{\n\t\tExceptionType result = this.factory.getType();\n\t\t\n\t\tassertSame(ExceptionType.XA, result);\n\t}",
"class_method_signature": "XAExceptionFactoryTest.getType()",
"constructor": false,
"full_signature": "@Test public void getType()",
"identifier": "getType... | {
"fields": [
{
"declarator": "serialVersionUID = -8802252233361030433L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8802252233361030433L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic ExceptionType getType()\n\t{\n\t\treturn ExceptionType.XA;\n\t}",
"class_method_signature": "XAExceptionFactory.getType()",
"constructor": false,
"full_signature": "@Override public ExceptionType getType()",
"identifier": "getType",
"invocations": [],
"modifiers": "@Override... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_37 | {
"fields": [
{
"declarator": "factory = new XAExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<XAException> factory = new XAExceptionFactory();",
"type": "ExceptionFactory<XAException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void createExceptionFromMessage()\n\t{\n\t\tString message = \"message\";\n\t\t\n\t\tXAException result = this.factory.createException(message);\n\t\t\n\t\tassertSame(message, result.getMessage());\n\t\tassertNull(result.getCause());\n\t}",
"class_method_signature": "XAExceptionFactoryTes... | {
"fields": [
{
"declarator": "serialVersionUID = -8802252233361030433L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8802252233361030433L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic XAException createException(String message)\n\t{\n\t\treturn new XAException(message);\n\t}",
"class_method_signature": "XAExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public XAException createException(String message)",
"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_60 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void evaluateCurrentTime()\n\t{\n\t\tjava.sql.Time time = new java.sql.Time(System.currentTimeMillis());\n\t\t\n\t\tassertEquals(String.format(\"SELECT TIME '%s' FROM test\", time.toString()), this.dialect.evaluateCurrentTime(\"SELECT CURRENT_TIME FROM test\", time));\n\t\tassertEquals(Stri... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String evaluateCurrentTime(String sql, java.sql.Time time)\n\t{\n\t\treturn evaluateTemporal(sql, this.currentTimePattern, time, this.timeLiteralFormat());\n\t}",
"class_method_signature": "StandardDialect.evaluateCurrentTime(String sql, java.sql.Time time)",
"constructor": false,
... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_21 | {
"fields": [
{
"declarator": "factory",
"modifier": "final",
"original_string": "final BalancerFactory factory;",
"type": "BalancerFactory",
"var_name": "factory"
},
{
"declarator": "databases = new MockDatabase[] { new MockDatabase(\"0\", 0), new MockDatabase(\"1\", 1... | {
"body": "@Test\n\tpublic void isEmpty()\n\t{\n\t\tBalancer<Void, MockDatabase> balancer = this.factory.createBalancer(Collections.<MockDatabase>emptySet());\n\n\t\tassertTrue(balancer.isEmpty());\n\t\t\n\t\tbalancer = this.factory.createBalancer(Collections.singleton(this.databases[0]));\n\n\t\tassertFalse(balancer... | {
"fields": [],
"file": "core/src/main/java/net/sf/hajdbc/balancer/AbstractBalancer.java",
"identifier": "AbstractBalancer",
"interfaces": "implements Balancer<Z, D>",
"methods": [
{
"class_method_signature": "AbstractBalancer.getDatabases()",
"constructor": false,
"full_signature": "pro... | {
"body": "@Override\n\tpublic boolean isEmpty()\n\t{\n\t\treturn this.getDatabases().isEmpty();\n\t}",
"class_method_signature": "AbstractBalancer.isEmpty()",
"constructor": false,
"full_signature": "@Override public boolean isEmpty()",
"identifier": "isEmpty",
"invocations": [
"isEmpty",
"getDatab... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_47 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getColumnType() throws SQLException\n\t{\n\t\tColumnProperties column = mock(ColumnProperties.class);\n\t\t\n\t\twhen(column.getType()).thenReturn(Types.INTEGER);\n\t\t\n\t\tint result = this.dialect.getColumnType(column);\n\t\t\n\t\tassertEquals(Types.INTEGER, result);\n\t}",
"class... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic int getColumnType(ColumnProperties properties)\n\t{\n\t\treturn properties.getType();\n\t}",
"class_method_signature": "StandardDialect.getColumnType(ColumnProperties properties)",
"constructor": false,
"full_signature": "@Override public int getColumnType(ColumnProperties propert... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_0 | {
"fields": [
{
"declarator": "KEY = \"x4zOovfg7+Y=\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"x4zOovfg7+Y=\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "ALGORITHM = \"DES\"",
"modifier": "private... | {
"body": "@Test\n\tpublic void test() throws SQLException\n\t{\n\t\tCodec codec = new CipherCodecFactory().createCodec(\"cluster\");\n\t\t\n\t\tAssert.assertTrue(codec instanceof CipherCodec);\n\t\tAssert.assertEquals(this.key, ((CipherCodec) codec).getKey());\n\t}",
"class_method_signature": "CipherCodecFactoryTe... | {
"fields": [
{
"declarator": "serialVersionUID = -4409167180573651279L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -4409167180573651279L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "DEF... | {
"body": "@Override\n\tpublic Codec createCodec(String clusterId) throws SQLException\n\t{\n\t\tString type = getProperty(clusterId, Property.KEYSTORE_TYPE);\n\t\tFile file = new File(getProperty(clusterId, Property.KEYSTORE_FILE));\n\t\tString password = getProperty(clusterId, Property.KEYSTORE_PASSWORD);\n\n\t\tSt... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_10 | {
"fields": [
{
"declarator": "properties = new Properties()",
"modifier": "private final",
"original_string": "private final Properties properties = new Properties();",
"type": "Properties",
"var_name": "properties"
},
{
"declarator": "reader = mock(XMLStreamReader.cla... | {
"body": "@Test\n\tpublic void getTextCharacters()\n\t{\n\t\tchar[] expected = \"expected\".toCharArray();\n\t\t\n\t\twhen(this.reader.getTextCharacters()).thenReturn(expected);\n\n\t\tchar[] result = this.filter.getTextCharacters();\n\t\t\n\t\tassertArrayEquals(expected, result);\n\t\t\n\t\twhen(this.reader.getText... | {
"fields": [
{
"declarator": "PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\");",
"type": "Pattern",
"var_name": "PATTERN"
},... | {
"body": "@Override\n\tpublic char[] getTextCharacters()\n\t{\n\t\treturn this.replace(String.valueOf(super.getTextCharacters())).toCharArray();\n\t}",
"class_method_signature": "PropertyReplacementFilter.getTextCharacters()",
"constructor": false,
"full_signature": "@Override public char[] getTextCharacters()... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_51 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getDropUniqueConstraintSQL() throws SQLException\n\t{\n\t\tQualifiedName table = mock(QualifiedName.class);\n\t\tUniqueConstraint constraint = mock(UniqueConstraint.class);\n\t\t\n\t\twhen(table.getDDLName()).thenReturn(\"table\");\n\t\twhen(constraint.getName()).thenReturn(\"name\");\... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String getDropUniqueConstraintSQL(UniqueConstraint constraint)\n\t{\n\t\treturn MessageFormat.format(this.dropUniqueConstraintFormat(), constraint.getName(), constraint.getTable().getDDLName());\n\t}",
"class_method_signature": "StandardDialect.getDropUniqueConstraintSQL(UniqueConstra... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_26 | {
"fields": [
{
"declarator": "factory = new IOExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<IOException> factory = new IOExceptionFactory();",
"type": "ExceptionFactory<IOException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void createExceptionFromException()\n\t{\n\t\tString message = \"message\";\n\t\tException exception = new Exception(message);\n\t\t\n\t\tIOException result = this.factory.createException(exception);\n\t\t\n\t\tassertNotNull(result.getMessage());\n\t\tassertSame(exception.getMessage(), resu... | {
"fields": [
{
"declarator": "serialVersionUID = -8896643332546657350L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8896643332546657350L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic IOException createException(String message)\n\t{\n\t\treturn new IOException(message);\n\t}",
"class_method_signature": "IOExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public IOException createException(String message)",
"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_71 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/VersionTest.java",
"identifier": "VersionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void alpha()\n\t{\n\t\tparse(new Version(\"1.2.3-alpha-4\"), 1, 2, 3);\n\t}",
"class_method_signature": "VersionTest.alpha()",
"constructor": false,
"full_signature": "@Test public void alpha()",
"identifier": "alpha",
"invocations": [
"parse"
],
"modifiers": "@Test public... | {
"fields": [
{
"declarator": "CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"version\"))",
"modifier": "public static final",
"original_string": "public static final Version CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"... | {
"body": "private int parse(int index)\n\t{\n\t\treturn Integer.parseInt(this.version.split(Pattern.quote(Strings.DASH))[0].split(Pattern.quote(Strings.DOT))[index]);\n\t}",
"class_method_signature": "Version.parse(int index)",
"constructor": false,
"full_signature": "private int parse(int index)",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_67 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getConnectionProperties() throws SQLException\n\t{\n\t\tDatabase<Void> database = mock(Database.class);\n\t\tCredentials credentials = mock(Credentials.class);\n\t\tDecoder decoder = mock(Decoder.class);\n\t\tConnection connection = mock(Connection.class);\n\t\tDatabaseMetaData metaDat... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic <Z, D extends Database<Z>> ConnectionProperties getConnectionProperties(D database, Decoder decoder) throws SQLException\n\t{\n\t\tfinal String password = database.getCredentials().decodePassword(decoder);\n\t\ttry (Connection connection = database.connect(decoder))\n\t\t{\n\t\t\tDataba... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_30 | {
"fields": [
{
"declarator": "factory = new IOExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<IOException> factory = new IOExceptionFactory();",
"type": "ExceptionFactory<IOException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void indicatesFailure()\n\t{\n\t\tDialect dialect = mock(Dialect.class);\n\t\t\n\t\tassertFalse(this.factory.indicatesFailure(new IOException(), dialect));\n\n\t\tMockito.verifyNoMoreInteractions(dialect);\n\t}",
"class_method_signature": "IOExceptionFactoryTest.indicatesFailure()",
"co... | {
"fields": [
{
"declarator": "serialVersionUID = -8896643332546657350L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8896643332546657350L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic boolean indicatesFailure(IOException exception, Dialect dialect)\n\t{\n\t\treturn false;\n\t}",
"class_method_signature": "IOExceptionFactory.indicatesFailure(IOException exception, Dialect dialect)",
"constructor": false,
"full_signature": "@Override public boolean indicatesFailu... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_31 | {
"fields": [
{
"declarator": "factory = new SQLExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<SQLException> factory = new SQLExceptionFactory();",
"type": "ExceptionFactory<SQLException>",
"var_name": "factory"
}
],
"file... | {
"body": "@Test\n\tpublic void createExceptionFromMessage()\n\t{\n\t\tString message = \"message\";\n\t\t\n\t\tSQLException result = this.factory.createException(message);\n\t\t\n\t\tassertSame(message, result.getMessage());\n\t\tassertNull(result.getCause());\n\t}",
"class_method_signature": "SQLExceptionFactoryT... | {
"fields": [
{
"declarator": "serialVersionUID = -7352436527312370925L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -7352436527312370925L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic SQLException createException(String message)\n\t{\n\t\treturn new SQLException(message);\n\t}",
"class_method_signature": "SQLExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public SQLException createException(String message)",... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_66 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void isValid() throws SQLException\n\t{\n\t\tConnection connection = mock(Connection.class);\n\t\t\n\t\twhen(connection.isValid(0)).thenReturn(true);\n\t\t\n\t\tboolean result = this.dialect.isValid(connection);\n\t\t\n\t\tassertTrue(result);\n\t}",
"class_method_signature": "StandardDial... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic boolean isValid(Connection connection) throws SQLException\n\t{\n\t\treturn connection.isValid(0);\n\t}",
"class_method_signature": "StandardDialect.isValid(Connection connection)",
"constructor": false,
"full_signature": "@Override public boolean isValid(Connection connection)",
... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_70 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/VersionTest.java",
"identifier": "VersionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void beta()\n\t{\n\t\tparse(new Version(\"1.2.3-beta-4\"), 1, 2, 3);\n\t}",
"class_method_signature": "VersionTest.beta()",
"constructor": false,
"full_signature": "@Test public void beta()",
"identifier": "beta",
"invocations": [
"parse"
],
"modifiers": "@Test public",
... | {
"fields": [
{
"declarator": "CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"version\"))",
"modifier": "public static final",
"original_string": "public static final Version CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"... | {
"body": "private int parse(int index)\n\t{\n\t\treturn Integer.parseInt(this.version.split(Pattern.quote(Strings.DASH))[0].split(Pattern.quote(Strings.DOT))[index]);\n\t}",
"class_method_signature": "Version.parse(int index)",
"constructor": false,
"full_signature": "private int parse(int index)",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_27 | {
"fields": [
{
"declarator": "factory = new IOExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<IOException> factory = new IOExceptionFactory();",
"type": "ExceptionFactory<IOException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void createExceptionFromSQLException()\n\t{\n\t\tIOException exception = new IOException();\n\t\t\n\t\tIOException result = this.factory.createException(exception);\n\t\t\n\t\tassertSame(exception, result);\n\t}",
"class_method_signature": "IOExceptionFactoryTest.createExceptionFromSQLExc... | {
"fields": [
{
"declarator": "serialVersionUID = -8896643332546657350L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8896643332546657350L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic IOException createException(String message)\n\t{\n\t\treturn new IOException(message);\n\t}",
"class_method_signature": "IOExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public IOException createException(String message)",
"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_50 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getDropForeignKeyConstraintSQL() throws SQLException\n\t{\n\t\tQualifiedName table = mock(QualifiedName.class);\n\t\tQualifiedName foreignTable = mock(QualifiedName.class);\n\t\tForeignKeyConstraint constraint = mock(ForeignKeyConstraint.class);\n\t\t\n\t\twhen(table.getDDLName()).then... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String getDropForeignKeyConstraintSQL(ForeignKeyConstraint key)\n\t{\n\t\treturn MessageFormat.format(this.dropForeignKeyConstraintFormat(), key.getName(), key.getTable().getDDLName());\n\t}",
"class_method_signature": "StandardDialect.getDropForeignKeyConstraintSQL(ForeignKeyConstrai... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_11 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/xml/XMLDatabaseClusterConfigurationFactoryTest.java",
"identifier": "XMLDatabaseClusterConfigurationFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void createDriverBasedConfiguration() throws SQLException\n\t{\n\t\tDriver driver = new MockDriver(mock(Connection.class));\n\n\t\tDriverManager.registerDriver(driver);\n\t\ttry\n\t\t{\n\t\t\tString url1 = \"jdbc:mock:db1\";\n\t\t\tMap.Entry<String, String> property1 = new SimpleImmutableEn... | {
"fields": [
{
"declarator": "serialVersionUID = -8796872297122349961L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8796872297122349961L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "CON... | {
"body": "@Override\n\tpublic <B extends DatabaseBuilder<Z, D>> DatabaseClusterConfiguration<Z, D> createConfiguration(DatabaseClusterConfigurationBuilder<Z, D, B> builder) throws SQLException\n\t{\n\t\tlogger.log(Level.INFO, messages.init(Version.CURRENT, this.streamFactory));\n\t\t\n\t\ttry\n\t\t{\n\t\t\tXMLStream... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_1 | {
"fields": [
{
"declarator": "KEY = \"x4zOovfg7+Y=\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"x4zOovfg7+Y=\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "ALGORITHM = \"DES\"",
"modifier": "private... | {
"body": "@Test\n\tpublic void encode() throws SQLException\n\t{\n\t\tAssert.assertEquals(ENCODED, this.codec.encode(PASSWORD));\n\t}",
"class_method_signature": "CipherCodecTest.encode()",
"constructor": false,
"full_signature": "@Test public void encode()",
"identifier": "encode",
"invocations": [
"a... | {
"fields": [
{
"declarator": "key",
"modifier": "private final",
"original_string": "private final Key key;",
"type": "Key",
"var_name": "key"
}
],
"file": "core/src/main/java/net/sf/hajdbc/codec/crypto/CipherCodec.java",
"identifier": "CipherCodec",
"interfaces": "imple... | {
"body": "@Override\n\tpublic String encode(String value) throws SQLException\n\t{\n\t\ttry\n\t\t{\n\t\t\tCipher cipher = Cipher.getInstance(this.key.getAlgorithm());\n\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, this.key);\n\t\t\t\n\t\t\treturn Base64.getEncoder().encodeToString(cipher.doFinal(value.getBytes()));\n\t\t... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_46 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getAlterSequenceSQL() throws SQLException\n\t{\n\t\tSequenceSupport support = this.dialect.getSequenceSupport();\n\t\t\n\t\tif (support != null)\n\t\t{\n\t\t\tSequenceProperties sequence = mock(SequenceProperties.class);\n\t\t\tQualifiedName name = mock(QualifiedName.class);\n\t\t\t\n\... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String getAlterSequenceSQL(SequenceProperties sequence, long value)\n\t{\n\t\treturn MessageFormat.format(this.alterSequenceFormat(), sequence.getName().getDDLName(), String.valueOf(value), String.valueOf(sequence.getIncrement()));\n\t}",
"class_method_signature": "StandardDialect.get... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_53 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getSequences() throws SQLException\n\t{\n\t\tSequenceSupport support = this.dialect.getSequenceSupport();\n\t\t\n\t\tif (support != null)\n\t\t{\n\t\t\tSequencePropertiesFactory factory = mock(SequencePropertiesFactory.class);\n\t\t\tSequenceProperties sequence1 = mock(SequenceProperti... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic Collection<SequenceProperties> getSequences(DatabaseMetaData metaData, SequencePropertiesFactory factory) throws SQLException\n\t{\n\t\ttry (ResultSet resultSet = metaData.getTables(Strings.EMPTY, null, Strings.ANY, new String[] { this.sequenceTableType() }))\n\t\t{\n\t\t\tList<Sequence... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_12 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/xml/XMLDatabaseClusterConfigurationFactoryTest.java",
"identifier": "XMLDatabaseClusterConfigurationFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void createDataSourceBasedConfiguration() throws SQLException\n\t{\n\t\tString location = MockDataSource.class.getName();\n\t\tMap.Entry<String, String> property1 = new SimpleImmutableEntry<>(\"name\", \"db1\");\n\t\tMap.Entry<String, String> property2 = new SimpleImmutableEntry<>(\"name\",... | {
"fields": [
{
"declarator": "serialVersionUID = -8796872297122349961L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8796872297122349961L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "CON... | {
"body": "@Override\n\tpublic <B extends DatabaseBuilder<Z, D>> DatabaseClusterConfiguration<Z, D> createConfiguration(DatabaseClusterConfigurationBuilder<Z, D, B> builder) throws SQLException\n\t{\n\t\tlogger.log(Level.INFO, messages.init(Version.CURRENT, this.streamFactory));\n\t\t\n\t\ttry\n\t\t{\n\t\t\tXMLStream... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_2 | {
"fields": [
{
"declarator": "KEY = \"x4zOovfg7+Y=\"",
"modifier": "private static final",
"original_string": "private static final String KEY = \"x4zOovfg7+Y=\";",
"type": "String",
"var_name": "KEY"
},
{
"declarator": "ALGORITHM = \"DES\"",
"modifier": "private... | {
"body": "@Test\n\tpublic void decode() throws SQLException\n\t{\n\t\tAssert.assertEquals(PASSWORD, this.codec.decode(ENCODED));\n\t}",
"class_method_signature": "CipherCodecTest.decode()",
"constructor": false,
"full_signature": "@Test public void decode()",
"identifier": "decode",
"invocations": [
"a... | {
"fields": [
{
"declarator": "key",
"modifier": "private final",
"original_string": "private final Key key;",
"type": "Key",
"var_name": "key"
}
],
"file": "core/src/main/java/net/sf/hajdbc/codec/crypto/CipherCodec.java",
"identifier": "CipherCodec",
"interfaces": "imple... | {
"body": "@Override\n\tpublic String decode(String value) throws SQLException\n\t{\n\t\ttry\n\t\t{\n\t\t\tCipher cipher = Cipher.getInstance(this.key.getAlgorithm());\n\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, this.key);\n\t\t\t\n\t\t\treturn new String(cipher.doFinal(Base64.getDecoder().decode(value)));\n\t\t}\n\t\t... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_45 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getIdentityColumnSupport()\n\t{\n\t\tassertNull(this.dialect.getIdentityColumnSupport());\n\t}",
"class_method_signature": "StandardDialectTest.getIdentityColumnSupport()",
"constructor": false,
"full_signature": "@Test public void getIdentityColumnSupport()",
"identifier": "ge... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic IdentityColumnSupport getIdentityColumnSupport()\n\t{\n\t\treturn null;\n\t}",
"class_method_signature": "StandardDialect.getIdentityColumnSupport()",
"constructor": false,
"full_signature": "@Override public IdentityColumnSupport getIdentityColumnSupport()",
"identifier": "getI... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_69 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/VersionTest.java",
"identifier": "VersionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void rc()\n\t{\n\t\tparse(new Version(\"1.2.3-rc-4\"), 1, 2, 3);\n\t}",
"class_method_signature": "VersionTest.rc()",
"constructor": false,
"full_signature": "@Test public void rc()",
"identifier": "rc",
"invocations": [
"parse"
],
"modifiers": "@Test public",
"parameter... | {
"fields": [
{
"declarator": "CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"version\"))",
"modifier": "public static final",
"original_string": "public static final Version CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"... | {
"body": "private int parse(int index)\n\t{\n\t\treturn Integer.parseInt(this.version.split(Pattern.quote(Strings.DASH))[0].split(Pattern.quote(Strings.DOT))[index]);\n\t}",
"class_method_signature": "Version.parse(int index)",
"constructor": false,
"full_signature": "private int parse(int index)",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_28 | {
"fields": [
{
"declarator": "factory = new IOExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<IOException> factory = new IOExceptionFactory();",
"type": "ExceptionFactory<IOException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void getType()\n\t{\n\t\tExceptionType result = this.factory.getType();\n\t\t\n\t\tassertSame(ExceptionType.IO, result);\n\t}",
"class_method_signature": "IOExceptionFactoryTest.getType()",
"constructor": false,
"full_signature": "@Test public void getType()",
"identifier": "getType... | {
"fields": [
{
"declarator": "serialVersionUID = -8896643332546657350L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8896643332546657350L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic ExceptionType getType()\n\t{\n\t\treturn ExceptionType.IO;\n\t}",
"class_method_signature": "IOExceptionFactory.getType()",
"constructor": false,
"full_signature": "@Override public ExceptionType getType()",
"identifier": "getType",
"invocations": [],
"modifiers": "@Override... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_49 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getCreateUniqueConstraintSQL() throws SQLException\n\t{\n\t\tQualifiedName table = mock(QualifiedName.class);\n\t\tUniqueConstraint constraint = mock(UniqueConstraint.class);\n\t\t\n\t\twhen(table.getDDLName()).thenReturn(\"table\");\n\t\twhen(constraint.getName()).thenReturn(\"name\")... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String getCreateUniqueConstraintSQL(UniqueConstraint constraint)\n\t{\n\t\treturn MessageFormat.format(this.createUniqueConstraintFormat(), constraint.getName(), constraint.getTable().getDDLName(), Strings.join(constraint.getColumnList(), Strings.PADDED_COMMA));\n\t}",
"class_method_s... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_32 | {
"fields": [
{
"declarator": "factory = new SQLExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<SQLException> factory = new SQLExceptionFactory();",
"type": "ExceptionFactory<SQLException>",
"var_name": "factory"
}
],
"file... | {
"body": "@Test\n\tpublic void createExceptionFromException()\n\t{\n\t\tString message = \"message\";\n\t\tException exception = new Exception(message);\n\t\t\n\t\tSQLException result = this.factory.createException(exception);\n\t\t\n\t\tassertNotNull(result.getMessage());\n\t\tassertSame(exception.getMessage(), res... | {
"fields": [
{
"declarator": "serialVersionUID = -7352436527312370925L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -7352436527312370925L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic SQLException createException(String message)\n\t{\n\t\treturn new SQLException(message);\n\t}",
"class_method_signature": "SQLExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public SQLException createException(String message)",... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_65 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void indicatesFailureXAException()\n\t{\n\t\tassertTrue(this.dialect.indicatesFailure(new XAException(XAException.XAER_RMFAIL)));\n\t\tassertFalse(this.dialect.indicatesFailure(new XAException(XAException.XA_HEURCOM)));\n\t\tassertFalse(this.dialect.indicatesFailure(new XAException(XAExcept... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic boolean indicatesFailure(SQLException e)\n\t{\n\t\tif ((e instanceof SQLNonTransientConnectionException) || (e instanceof SQLTransientConnectionException))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tString sqlState = e.getSQLState();\n\t\tif ((sqlState != null) && this.indicatesFailur... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_73 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/VersionTest.java",
"identifier": "VersionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void betaSnapshot()\n\t{\n\t\tparse(new Version(\"1.2.3-beta-4-SNAPSHOT\"), 1, 2, 3);\n\t}",
"class_method_signature": "VersionTest.betaSnapshot()",
"constructor": false,
"full_signature": "@Test public void betaSnapshot()",
"identifier": "betaSnapshot",
"invocations": [
"pars... | {
"fields": [
{
"declarator": "CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"version\"))",
"modifier": "public static final",
"original_string": "public static final Version CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"... | {
"body": "private int parse(int index)\n\t{\n\t\treturn Integer.parseInt(this.version.split(Pattern.quote(Strings.DASH))[0].split(Pattern.quote(Strings.DOT))[index]);\n\t}",
"class_method_signature": "Version.parse(int index)",
"constructor": false,
"full_signature": "private int parse(int index)",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_24 | {
"fields": [
{
"declarator": "configurationFactory = mock(DatabaseClusterConfigurationFactory.class)",
"modifier": "private",
"original_string": "private DatabaseClusterConfigurationFactory<java.sql.Driver, DriverDatabase> configurationFactory = mock(DatabaseClusterConfigurationFactory.class);"... | {
"body": "@Test\n\tpublic void connect() throws Exception\n\t{\n\t\tthis.connect(\"jdbc:ha-jdbc:cluster1\", \"cluster1\");\n\t\tthis.connect(\"jdbc:ha-jdbc://cluster2\", \"cluster2\");\n\t\tthis.connect(\"jdbc:ha-jdbc://cluster3/dummy\", \"cluster3\");\n\t}",
"class_method_signature": "DriverTest.connect()",
"co... | {
"fields": [
{
"declarator": "URL_PATTERN = Pattern.compile(\"jdbc:ha-jdbc:(?://)?([^/]+)(?:/.+)?\")",
"modifier": "private static final",
"original_string": "private static final Pattern URL_PATTERN = Pattern.compile(\"jdbc:ha-jdbc:(?://)?([^/]+)(?:/.+)?\");",
"type": "Pattern",
"v... | {
"body": "@Override\n\tpublic Connection connect(String url, final Properties properties) throws SQLException\n\t{\n\t\tString id = this.parse(url);\n\t\t\n\t\t// JDBC spec compliance\n\t\tif (id == null) return null;\n\t\t\n\t\tMap.Entry<DriverProxyFactory, java.sql.Driver> entry = getProxyEntry(id, properties);\n\... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_25 | {
"fields": [
{
"declarator": "factory = new IOExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<IOException> factory = new IOExceptionFactory();",
"type": "ExceptionFactory<IOException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void createExceptionFromMessage()\n\t{\n\t\tString message = \"message\";\n\t\t\n\t\tIOException result = this.factory.createException(message);\n\t\t\n\t\tassertSame(message, result.getMessage());\n\t\tassertNull(result.getCause());\n\t}",
"class_method_signature": "IOExceptionFactoryTes... | {
"fields": [
{
"declarator": "serialVersionUID = -8896643332546657350L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8896643332546657350L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic IOException createException(String message)\n\t{\n\t\treturn new IOException(message);\n\t}",
"class_method_signature": "IOExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public IOException createException(String message)",
"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_72 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/VersionTest.java",
"identifier": "VersionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void finalSnapshot()\n\t{\n\t\tparse(new Version(\"1.2.3-SNAPSHOT\"), 1, 2, 3);\n\t}",
"class_method_signature": "VersionTest.finalSnapshot()",
"constructor": false,
"full_signature": "@Test public void finalSnapshot()",
"identifier": "finalSnapshot",
"invocations": [
"parse"
... | {
"fields": [
{
"declarator": "CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"version\"))",
"modifier": "public static final",
"original_string": "public static final Version CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"... | {
"body": "private int parse(int index)\n\t{\n\t\treturn Integer.parseInt(this.version.split(Pattern.quote(Strings.DASH))[0].split(Pattern.quote(Strings.DOT))[index]);\n\t}",
"class_method_signature": "Version.parse(int index)",
"constructor": false,
"full_signature": "private int parse(int index)",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_64 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void indicatesFailureSQLException()\n\t{\n\t\tassertTrue(this.dialect.indicatesFailure(new SQLNonTransientConnectionException()));\n\t\tassertTrue(this.dialect.indicatesFailure(new SQLTransientConnectionException()));\n\t\tint i = 0;\n\t\tchar[] alphabet = new char[36];\n\t\tfor (char c = '... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic boolean indicatesFailure(SQLException e)\n\t{\n\t\tif ((e instanceof SQLNonTransientConnectionException) || (e instanceof SQLTransientConnectionException))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tString sqlState = e.getSQLState();\n\t\tif ((sqlState != null) && this.indicatesFailur... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_33 | {
"fields": [
{
"declarator": "factory = new SQLExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<SQLException> factory = new SQLExceptionFactory();",
"type": "ExceptionFactory<SQLException>",
"var_name": "factory"
}
],
"file... | {
"body": "@Test\n\tpublic void createExceptionFromSQLException()\n\t{\n\t\tSQLException exception = new SQLException();\n\t\t\n\t\tSQLException result = this.factory.createException(exception);\n\t\t\n\t\tassertSame(exception, result);\n\t}",
"class_method_signature": "SQLExceptionFactoryTest.createExceptionFromSQ... | {
"fields": [
{
"declarator": "serialVersionUID = -7352436527312370925L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -7352436527312370925L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic SQLException createException(String message)\n\t{\n\t\treturn new SQLException(message);\n\t}",
"class_method_signature": "SQLExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public SQLException createException(String message)",... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_48 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getCreateForeignKeyConstraintSQL() throws SQLException\n\t{\n\t\tQualifiedName table = mock(QualifiedName.class);\n\t\tQualifiedName foreignTable = mock(QualifiedName.class);\n\t\tForeignKeyConstraint constraint = mock(ForeignKeyConstraint.class);\n\t\t\n\t\twhen(table.getDDLName()).th... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String getCreateForeignKeyConstraintSQL(ForeignKeyConstraint key)\n\t{\n\t\treturn MessageFormat.format(this.createForeignKeyConstraintFormat(), key.getName(), key.getTable().getDDLName(), Strings.join(key.getColumnList(), Strings.PADDED_COMMA), key.getForeignTable().getDDLName(), Strin... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_29 | {
"fields": [
{
"declarator": "factory = new IOExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<IOException> factory = new IOExceptionFactory();",
"type": "ExceptionFactory<IOException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void correctHeuristic()\n\t{\n\t\tassertFalse(this.factory.correctHeuristic(new IOException(), Phase.COMMIT));\n\t\tassertFalse(this.factory.correctHeuristic(new IOException(), Phase.FORGET));\n\t\tassertFalse(this.factory.correctHeuristic(new IOException(), Phase.PREPARE));\n\t\tassertFals... | {
"fields": [
{
"declarator": "serialVersionUID = -8896643332546657350L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8896643332546657350L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic boolean correctHeuristic(IOException exception, Phase phase)\n\t{\n\t\treturn false;\n\t}",
"class_method_signature": "IOExceptionFactory.correctHeuristic(IOException exception, Phase phase)",
"constructor": false,
"full_signature": "@Override public boolean correctHeuristic(IOExc... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_68 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/VersionTest.java",
"identifier": "VersionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void finalRelease()\n\t{\n\t\tparse(new Version(\"1.2.3\"), 1, 2, 3);\n\t}",
"class_method_signature": "VersionTest.finalRelease()",
"constructor": false,
"full_signature": "@Test public void finalRelease()",
"identifier": "finalRelease",
"invocations": [
"parse"
],
"modif... | {
"fields": [
{
"declarator": "CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"version\"))",
"modifier": "public static final",
"original_string": "public static final Version CURRENT = new Version(ResourceBundle.getBundle(Version.class.getName()).getString(\"... | {
"body": "private int parse(int index)\n\t{\n\t\treturn Integer.parseInt(this.version.split(Pattern.quote(Strings.DASH))[0].split(Pattern.quote(Strings.DOT))[index]);\n\t}",
"class_method_signature": "Version.parse(int index)",
"constructor": false,
"full_signature": "private int parse(int index)",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_44 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getSequenceSupport()\n\t{\n\t\tassertNull(this.dialect.getSequenceSupport());\n\t}",
"class_method_signature": "StandardDialectTest.getSequenceSupport()",
"constructor": false,
"full_signature": "@Test public void getSequenceSupport()",
"identifier": "getSequenceSupport",
"in... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic SequenceSupport getSequenceSupport()\n\t{\n\t\treturn null;\n\t}",
"class_method_signature": "StandardDialect.getSequenceSupport()",
"constructor": false,
"full_signature": "@Override public SequenceSupport getSequenceSupport()",
"identifier": "getSequenceSupport",
"invocation... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_3 | {
"fields": [
{
"declarator": "factory = new SimpleCodecFactory()",
"modifier": "private",
"original_string": "private CodecFactory factory = new SimpleCodecFactory();",
"type": "CodecFactory",
"var_name": "factory"
}
],
"file": "core/src/test/java/net/sf/hajdbc/codec/SimpleC... | {
"body": "@Test\n\tpublic void encode() throws SQLException\n\t{\n\t\tCodec codec = this.factory.createCodec(null);\n\t\t\n\t\tAssert.assertEquals(\"password\", codec.encode(\"password\"));\n\t}",
"class_method_signature": "SimpleCodecFactoryTest.encode()",
"constructor": false,
"full_signature": "@Test public... | {
"fields": [
{
"declarator": "serialVersionUID = -472755264720942251L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -472755264720942251L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/jav... | {
"body": "@Override\n\tpublic String encode(String value)\n\t{\n\t\treturn value;\n\t}",
"class_method_signature": "SimpleCodecFactory.encode(String value)",
"constructor": false,
"full_signature": "@Override public String encode(String value)",
"identifier": "encode",
"invocations": [],
"modifiers": "@O... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_13 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/util/CollectionsTest.java",
"identifier": "CollectionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void emptySortedSet()\n\t{\n\t\tverify(Collections.<Integer>emptySortedSet(), new TreeSet<Integer>(), 0, 1);\n\t}",
"class_method_signature": "CollectionsTest.emptySortedSet()",
"constructor": false,
"full_signature": "@Test public void emptySortedSet()",
"identifier": "emptySortedS... | {
"fields": [
{
"declarator": "EMPTY_SORTED_SET = new EmptySortedSet<>()",
"modifier": "public static final",
"original_string": "public static final SortedSet<?> EMPTY_SORTED_SET = new EmptySortedSet<>();",
"type": "SortedSet<?>",
"var_name": "EMPTY_SORTED_SET"
},
{
"d... | {
"body": "@SuppressWarnings(\"unchecked\")\n\tpublic static <E> SortedSet<E> emptySortedSet()\n\t{\n\t\treturn (SortedSet<E>) EMPTY_SORTED_SET;\n\t}",
"class_method_signature": "Collections.emptySortedSet()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") public static SortedSet<E> e... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_52 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getNextSequenceValueSQL() throws SQLException\n\t{\n\t\tSequenceSupport support = this.dialect.getSequenceSupport();\n\t\t\n\t\tif (support != null)\n\t\t{\n\t\t\tQualifiedName name = mock(QualifiedName.class);\n\t\t\tSequenceProperties sequence = mock(SequenceProperties.class);\n\t\t\... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String getNextSequenceValueSQL(SequenceProperties sequence)\n\t{\n\t\treturn this.executeFunctionSQL(MessageFormat.format(this.nextSequenceValueFormat(), sequence.getName().getDMLName()));\n\t}",
"class_method_signature": "StandardDialect.getNextSequenceValueSQL(SequenceProperties seq... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_59 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void evaluateCurrentDate()\n\t{\n\t\tjava.sql.Date date = new java.sql.Date(System.currentTimeMillis());\n\t\t\n\t\tassertEquals(String.format(\"SELECT DATE '%s' FROM test\", date.toString()), this.dialect.evaluateCurrentDate(\"SELECT CURRENT_DATE FROM test\", date));\n\t\tassertEquals(\"SE... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String evaluateCurrentDate(String sql, java.sql.Date date)\n\t{\n\t\treturn evaluateTemporal(sql, this.currentDatePattern, date, this.dateLiteralFormat());\n\t}",
"class_method_signature": "StandardDialect.evaluateCurrentDate(String sql, java.sql.Date date)",
"constructor": false,
... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_8 | {
"fields": [
{
"declarator": "properties = new Properties()",
"modifier": "private final",
"original_string": "private final Properties properties = new Properties();",
"type": "Properties",
"var_name": "properties"
},
{
"declarator": "reader = mock(XMLStreamReader.cla... | {
"body": "@Test\n\tpublic void getProperty()\n\t{\n\t\tString property = \"property\";\n\t\tObject expected = new Object();\n\t\t\n\t\twhen(this.reader.getProperty(property)).thenReturn(expected);\n\t\t\n\t\tObject result = this.filter.getProperty(property);\n\t\t\n\t\tassertSame(expected, result);\n\t}",
"class_m... | {
"fields": [
{
"declarator": "PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\");",
"type": "Pattern",
"var_name": "PATTERN"
},... | {
"body": "private String getProperty(String[] keys, String defaultValue)\n\t{\n\t\tfor (String key: keys)\n\t\t{\n\t\t\tString value = this.properties.getProperty(key.trim());\n\t\t\t\n\t\t\tif (value != null) return value;\n\t\t}\n\n\t\treturn defaultValue;\n\t}",
"class_method_signature": "PropertyReplacementFil... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_18 | {
"fields": [
{
"declarator": "factory",
"modifier": "final",
"original_string": "final BalancerFactory factory;",
"type": "BalancerFactory",
"var_name": "factory"
},
{
"declarator": "databases = new MockDatabase[] { new MockDatabase(\"0\", 0), new MockDatabase(\"1\", 1... | {
"body": "@Test\n\tpublic void iterator()\n\t{\n\t\tBalancer<Void, MockDatabase> balancer = this.factory.createBalancer(Collections.<MockDatabase>emptySet());\n\n\t\tIterator<MockDatabase> result = balancer.iterator();\n\t\tassertFalse(result.hasNext());\n\t\t\n\t\tbalancer = this.factory.createBalancer(Collections.... | {
"fields": [],
"file": "core/src/main/java/net/sf/hajdbc/balancer/AbstractBalancer.java",
"identifier": "AbstractBalancer",
"interfaces": "implements Balancer<Z, D>",
"methods": [
{
"class_method_signature": "AbstractBalancer.getDatabases()",
"constructor": false,
"full_signature": "pro... | {
"body": "@Override\n\tpublic Iterator<D> iterator()\n\t{\n\t\treturn this.getDatabases().iterator();\n\t}",
"class_method_signature": "AbstractBalancer.iterator()",
"constructor": false,
"full_signature": "@Override public Iterator<D> iterator()",
"identifier": "iterator",
"invocations": [
"iterator",... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_34 | {
"fields": [
{
"declarator": "factory = new SQLExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<SQLException> factory = new SQLExceptionFactory();",
"type": "ExceptionFactory<SQLException>",
"var_name": "factory"
}
],
"file... | {
"body": "@Test\n\tpublic void getType()\n\t{\n\t\tExceptionType result = this.factory.getType();\n\t\t\n\t\tassertSame(ExceptionType.SQL, result);\n\t}",
"class_method_signature": "SQLExceptionFactoryTest.getType()",
"constructor": false,
"full_signature": "@Test public void getType()",
"identifier": "getTy... | {
"fields": [
{
"declarator": "serialVersionUID = -7352436527312370925L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -7352436527312370925L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic ExceptionType getType()\n\t{\n\t\treturn ExceptionType.SQL;\n\t}",
"class_method_signature": "SQLExceptionFactory.getType()",
"constructor": false,
"full_signature": "@Override public ExceptionType getType()",
"identifier": "getType",
"invocations": [],
"modifiers": "@Overri... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_63 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getAlterIdentityColumnSQL() throws SQLException\n\t{\n\t\tIdentityColumnSupport support = this.dialect.getIdentityColumnSupport();\n\t\t\n\t\tif (support != null)\n\t\t{\n\t\t\tTableProperties table = mock(TableProperties.class);\n\t\t\tColumnProperties column = mock(ColumnProperties.c... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String getAlterIdentityColumnSQL(TableProperties table, ColumnProperties column, long value)\n\t{\n\t\treturn MessageFormat.format(this.alterIdentityColumnFormat(), table.getName().getDDLName(), column.getName(), String.valueOf(value));\n\t}",
"class_method_signature": "StandardDialec... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_22 | {
"fields": [
{
"declarator": "factory",
"modifier": "final",
"original_string": "final BalancerFactory factory;",
"type": "BalancerFactory",
"var_name": "factory"
},
{
"declarator": "databases = new MockDatabase[] { new MockDatabase(\"0\", 0), new MockDatabase(\"1\", 1... | {
"body": "@Test\n\tpublic void size()\n\t{\n\t\tBalancer<Void, MockDatabase> balancer = this.factory.createBalancer(Collections.<MockDatabase>emptySet());\n\n\t\tassertEquals(0, balancer.size());\n\t\t\n\t\tbalancer = this.factory.createBalancer(Collections.singleton(this.databases[0]));\n\n\t\tassertEquals(1, balan... | {
"fields": [],
"file": "core/src/main/java/net/sf/hajdbc/balancer/AbstractBalancer.java",
"identifier": "AbstractBalancer",
"interfaces": "implements Balancer<Z, D>",
"methods": [
{
"class_method_signature": "AbstractBalancer.getDatabases()",
"constructor": false,
"full_signature": "pro... | {
"body": "@Override\n\tpublic int size()\n\t{\n\t\treturn this.getDatabases().size();\n\t}",
"class_method_signature": "AbstractBalancer.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"invocations": [
"size",
"getDatabases"
],
"modifiers": ... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_55 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void isSelectForUpdate() throws SQLException\n\t{\n\t\tassertTrue(this.dialect.isSelectForUpdate(\"SELECT * FROM test FOR UPDATE\"));\n\t\tassertFalse(this.dialect.isSelectForUpdate(\"SELECT * FROM test\"));\n\t}",
"class_method_signature": "StandardDialectTest.isSelectForUpdate()",
"co... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic boolean isSelectForUpdate(String sql)\n\t{\n\t\treturn this.selectForUpdatePattern.matcher(sql).find();\n\t}",
"class_method_signature": "StandardDialect.isSelectForUpdate(String sql)",
"constructor": false,
"full_signature": "@Override public boolean isSelectForUpdate(String sql)... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_14 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/util/CollectionsTest.java",
"identifier": "CollectionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void singletonSortedSet()\n\t{\n\t\tSortedSet<Integer> set = new TreeSet<>();\n\t\tset.add(1);\n\t\t\n\t\tverify(Collections.<Integer>singletonSortedSet(1), set, 0, 1);\n\t}",
"class_method_signature": "CollectionsTest.singletonSortedSet()",
"constructor": false,
"full_signature": "@T... | {
"fields": [
{
"declarator": "EMPTY_SORTED_SET = new EmptySortedSet<>()",
"modifier": "public static final",
"original_string": "public static final SortedSet<?> EMPTY_SORTED_SET = new EmptySortedSet<>();",
"type": "SortedSet<?>",
"var_name": "EMPTY_SORTED_SET"
},
{
"d... | {
"body": "public static <E> SortedSet<E> singletonSortedSet(E element)\n\t{\n\t\treturn new SingletonSortedSet<>(element);\n\t}",
"class_method_signature": "Collections.singletonSortedSet(E element)",
"constructor": false,
"full_signature": "public static SortedSet<E> singletonSortedSet(E element)",
"identif... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_4 | {
"fields": [
{
"declarator": "factory = new SimpleCodecFactory()",
"modifier": "private",
"original_string": "private CodecFactory factory = new SimpleCodecFactory();",
"type": "CodecFactory",
"var_name": "factory"
}
],
"file": "core/src/test/java/net/sf/hajdbc/codec/SimpleC... | {
"body": "@Test\n\tpublic void decode() throws SQLException\n\t{\n\t\tCodec codec = this.factory.createCodec(null);\n\t\t\n\t\tAssert.assertEquals(\"password\", codec.decode(\"password\"));\n\t}",
"class_method_signature": "SimpleCodecFactoryTest.decode()",
"constructor": false,
"full_signature": "@Test public... | {
"fields": [
{
"declarator": "serialVersionUID = -472755264720942251L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -472755264720942251L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/jav... | {
"body": "@Override\n\tpublic String decode(String value)\n\t{\n\t\treturn value;\n\t}",
"class_method_signature": "SimpleCodecFactory.decode(String value)",
"constructor": false,
"full_signature": "@Override public String decode(String value)",
"identifier": "decode",
"invocations": [],
"modifiers": "@O... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_43 | {
"fields": [
{
"declarator": "factory = new XAExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<XAException> factory = new XAExceptionFactory();",
"type": "ExceptionFactory<XAException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void indicatesFailure()\n\t{\n\t\tDialect dialect = mock(Dialect.class);\n\t\tXAException exception = new XAException();\n\t\t\n\t\twhen(dialect.indicatesFailure(exception)).thenReturn(true);\n\t\t\n\t\tboolean result = this.factory.indicatesFailure(exception, dialect);\n\t\t\n\t\tassertTru... | {
"fields": [
{
"declarator": "serialVersionUID = -8802252233361030433L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8802252233361030433L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic boolean indicatesFailure(XAException exception, Dialect dialect)\n\t{\n\t\treturn dialect.indicatesFailure(exception);\n\t}",
"class_method_signature": "XAExceptionFactory.indicatesFailure(XAException exception, Dialect dialect)",
"constructor": false,
"full_signature": "@Override... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_38 | {
"fields": [
{
"declarator": "factory = new XAExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<XAException> factory = new XAExceptionFactory();",
"type": "ExceptionFactory<XAException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void createExceptionFromException()\n\t{\n\t\tString message = \"message\";\n\t\tException exception = new Exception(\"message\");\n\t\t\n\t\tXAException result = this.factory.createException(exception);\n\t\t\n\t\tassertNotNull(result.getMessage());\n\t\tassertSame(message, result.getMessa... | {
"fields": [
{
"declarator": "serialVersionUID = -8802252233361030433L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8802252233361030433L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic XAException createException(String message)\n\t{\n\t\treturn new XAException(message);\n\t}",
"class_method_signature": "XAExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public XAException createException(String message)",
"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_39 | {
"fields": [
{
"declarator": "factory = new XAExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<XAException> factory = new XAExceptionFactory();",
"type": "ExceptionFactory<XAException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void createExceptionFromXAException()\n\t{\n\t\tXAException exception = new XAException();\n\t\t\n\t\tXAException result = this.factory.createException(exception);\n\t\t\n\t\tassertSame(exception, result);\n\t}",
"class_method_signature": "XAExceptionFactoryTest.createExceptionFromXAExcep... | {
"fields": [
{
"declarator": "serialVersionUID = -8802252233361030433L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8802252233361030433L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic XAException createException(String message)\n\t{\n\t\treturn new XAException(message);\n\t}",
"class_method_signature": "XAExceptionFactory.createException(String message)",
"constructor": false,
"full_signature": "@Override public XAException createException(String message)",
"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_42 | {
"fields": [
{
"declarator": "factory = new XAExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<XAException> factory = new XAExceptionFactory();",
"type": "ExceptionFactory<XAException>",
"var_name": "factory"
}
],
"file": "... | {
"body": "@Test\n\tpublic void correctHeuristic()\n\t{\n\t\tassertFalse(this.factory.correctHeuristic(new XAException(XAException.XA_RBBASE), Phase.PREPARE));\n\t\tassertFalse(this.factory.correctHeuristic(new XAException(XAException.XA_RBCOMMFAIL), Phase.PREPARE));\n\t\tassertFalse(this.factory.correctHeuristic(new... | {
"fields": [
{
"declarator": "serialVersionUID = -8802252233361030433L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -8802252233361030433L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic boolean correctHeuristic(XAException exception, Phase phase)\n\t{\n\t\tswitch (phase)\n\t\t{\n\t\t\tcase COMMIT:\n\t\t\t{\n\t\t\t\treturn exception.errorCode == XAException.XA_HEURCOM;\n\t\t\t}\n\t\t\tcase ROLLBACK:\n\t\t\t{\n\t\t\t\treturn exception.errorCode == XAException.XA_HEURRB;\... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_5 | {
"fields": [
{
"declarator": "properties = new Properties()",
"modifier": "private final",
"original_string": "private final Properties properties = new Properties();",
"type": "Properties",
"var_name": "properties"
},
{
"declarator": "reader = mock(XMLStreamReader.cla... | {
"body": "@Test\n\tpublic void getAttributeValue()\n\t{\n\t\tString expected = \"expected\";\n\t\tint index = 10;\n\t\t\n\t\twhen(this.reader.getAttributeValue(index)).thenReturn(expected);\n\n\t\tString result = this.filter.getAttributeValue(index);\n\t\t\n\t\tassertSame(expected, result);\n\t\t\n\t\twhen(this.read... | {
"fields": [
{
"declarator": "PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\");",
"type": "Pattern",
"var_name": "PATTERN"
},... | {
"body": "@Override\n\tpublic String getAttributeValue(int index)\n\t{\n\t\treturn this.replace(super.getAttributeValue(index));\n\t}",
"class_method_signature": "PropertyReplacementFilter.getAttributeValue(int index)",
"constructor": false,
"full_signature": "@Override public String getAttributeValue(int inde... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_15 | {
"fields": [],
"file": "core/src/test/java/net/sf/hajdbc/util/CollectionsTest.java",
"identifier": "CollectionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void emptySortedMap()\n\t{\n\t\tverify(Collections.<Integer, String>emptySortedMap(), new TreeMap<Integer, String>(), 0, 1, \"\");\n\t}",
"class_method_signature": "CollectionsTest.emptySortedMap()",
"constructor": false,
"full_signature": "@Test public void emptySortedMap()",
"iden... | {
"fields": [
{
"declarator": "EMPTY_SORTED_SET = new EmptySortedSet<>()",
"modifier": "public static final",
"original_string": "public static final SortedSet<?> EMPTY_SORTED_SET = new EmptySortedSet<>();",
"type": "SortedSet<?>",
"var_name": "EMPTY_SORTED_SET"
},
{
"d... | {
"body": "@SuppressWarnings(\"unchecked\")\n\tpublic static <K, V> SortedMap<K, V> emptySortedMap()\n\t{\n\t\treturn (SortedMap<K, V>) EMPTY_SORTED_MAP;\n\t}",
"class_method_signature": "Collections.emptySortedMap()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") public static Sorte... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_54 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void getTruncateTableSQL() throws SQLException\n\t{\n\t\tTableProperties table = mock(TableProperties.class);\n\t\tQualifiedName name = mock(QualifiedName.class);\n\t\t\n\t\twhen(table.getName()).thenReturn(name);\n\t\twhen(name.getDMLName()).thenReturn(\"table\");\n\t\t\n\t\tString result ... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String getTruncateTableSQL(TableProperties properties)\n\t{\n\t\treturn MessageFormat.format(this.truncateTableFormat(), properties.getName().getDMLName());\n\t}",
"class_method_signature": "StandardDialect.getTruncateTableSQL(TableProperties properties)",
"constructor": false,
"f... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_23 | {
"fields": [
{
"declarator": "factory",
"modifier": "final",
"original_string": "final BalancerFactory factory;",
"type": "BalancerFactory",
"var_name": "factory"
},
{
"declarator": "databases = new MockDatabase[] { new MockDatabase(\"0\", 0), new MockDatabase(\"1\", 1... | {
"body": "@Test\n\tpublic void toArray()\n\t{\n\t\tBalancer<Void, MockDatabase> balancer = this.factory.createBalancer(Collections.<MockDatabase>emptySet());\n\n\t\tassertTrue(Arrays.equals(new Object[0], balancer.toArray()));\n\t\t\n\t\tbalancer = this.factory.createBalancer(Collections.singleton(this.databases[0])... | {
"fields": [],
"file": "core/src/main/java/net/sf/hajdbc/balancer/AbstractBalancer.java",
"identifier": "AbstractBalancer",
"interfaces": "implements Balancer<Z, D>",
"methods": [
{
"class_method_signature": "AbstractBalancer.getDatabases()",
"constructor": false,
"full_signature": "pro... | {
"body": "@Override\n\tpublic Object[] toArray()\n\t{\n\t\treturn this.getDatabases().toArray();\n\t}",
"class_method_signature": "AbstractBalancer.toArray()",
"constructor": false,
"full_signature": "@Override public Object[] toArray()",
"identifier": "toArray",
"invocations": [
"toArray",
"getDat... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_62 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void evaluateRand()\n\t{\n\t\tassertTrue(Pattern.matches(\"SELECT ((0\\\\.\\\\d+)|([1-9]\\\\.\\\\d+E\\\\-\\\\d+)) FROM test\", this.dialect.evaluateRand(\"SELECT RAND() FROM test\")));\n\t\tassertTrue(Pattern.matches(\"SELECT ((0\\\\.\\\\d+)|([1-9]\\\\.\\\\d+E\\\\-\\\\d+)) FROM test\", this... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String evaluateRand(String sql)\n\t{\t\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tMatcher matcher = this.randomPattern.matcher(sql);\n\t\t\n\t\twhile (matcher.find())\n\t\t{\n\t\t\tmatcher.appendReplacement(buffer, Double.toString(Math.random()));\n\t\t}\n\t\t\n\t\treturn match... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_35 | {
"fields": [
{
"declarator": "factory = new SQLExceptionFactory()",
"modifier": "private final",
"original_string": "private final ExceptionFactory<SQLException> factory = new SQLExceptionFactory();",
"type": "ExceptionFactory<SQLException>",
"var_name": "factory"
}
],
"file... | {
"body": "@Test\n\tpublic void equals()\n\t{\n\t\tassertTrue(this.factory.equals(null, null));\n\t\tassertFalse(this.factory.equals(new SQLException(), null));\n\t\tassertTrue(this.factory.equals(new SQLException(), new SQLException()));\n\n\t\tassertTrue(this.factory.equals(new java.sql.SQLDataException(), new java... | {
"fields": [
{
"declarator": "serialVersionUID = -7352436527312370925L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -7352436527312370925L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "core/src/main/j... | {
"body": "@Override\n\tpublic boolean equals(SQLException exception1, SQLException exception2)\n\t{\n\t\t// Terminator for exception chain recursion\n\t\tif ((exception1 == null) || (exception2 == null))\n\t\t{\n\t\t\treturn exception1 == exception2;\n\t\t}\n\t\t\n\t\t// Fast-fail for mismatched Java 1.6 SQLExceptio... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_19 | {
"fields": [
{
"declarator": "factory",
"modifier": "final",
"original_string": "final BalancerFactory factory;",
"type": "BalancerFactory",
"var_name": "factory"
},
{
"declarator": "databases = new MockDatabase[] { new MockDatabase(\"0\", 0), new MockDatabase(\"1\", 1... | {
"body": "@Test\n\tpublic void contains()\n\t{\n\t\tBalancer<Void, MockDatabase> balancer = this.factory.createBalancer(Collections.<MockDatabase>emptySet());\n\n\t\tassertFalse(balancer.contains(this.databases[0]));\n\t\tassertFalse(balancer.contains(this.databases[1]));\n\t\tassertFalse(balancer.contains(this.data... | {
"fields": [],
"file": "core/src/main/java/net/sf/hajdbc/balancer/AbstractBalancer.java",
"identifier": "AbstractBalancer",
"interfaces": "implements Balancer<Z, D>",
"methods": [
{
"class_method_signature": "AbstractBalancer.getDatabases()",
"constructor": false,
"full_signature": "pro... | {
"body": "@Override\n\tpublic boolean contains(Object database)\n\t{\n\t\treturn this.getDatabases().contains(database);\n\t}",
"class_method_signature": "AbstractBalancer.contains(Object database)",
"constructor": false,
"full_signature": "@Override public boolean contains(Object database)",
"identifier": "... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_9 | {
"fields": [
{
"declarator": "properties = new Properties()",
"modifier": "private final",
"original_string": "private final Properties properties = new Properties();",
"type": "Properties",
"var_name": "properties"
},
{
"declarator": "reader = mock(XMLStreamReader.cla... | {
"body": "@Test\n\tpublic void getText()\n\t{\n\t\tString expected = \"expected\";\n\t\t\n\t\twhen(this.reader.getText()).thenReturn(expected);\n\n\t\tString result = this.filter.getText();\n\t\t\n\t\tassertSame(expected, result);\n\t\t\n\t\twhen(this.reader.getText()).thenReturn(String.format(\"Expect the un%s!\", ... | {
"fields": [
{
"declarator": "PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = Pattern.compile(\"\\\\$\\\\{([^\\\\}]+)\\\\}\");",
"type": "Pattern",
"var_name": "PATTERN"
},... | {
"body": "@Override\n\tpublic String getText()\n\t{\n\t\treturn this.replace(super.getText());\n\t}",
"class_method_signature": "PropertyReplacementFilter.getText()",
"constructor": false,
"full_signature": "@Override public String getText()",
"identifier": "getText",
"invocations": [
"replace",
"g... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
3411081_58 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private DialectFactory factory;",
"type": "DialectFactory",
"var_name": "factory"
},
{
"declarator": "dialect",
"modifier": "",
"original_string": "Dialect dialect;",
"... | {
"body": "@Test\n\tpublic void parseInsertTable() throws SQLException\n\t{\n\t\tIdentityColumnSupport support = this.dialect.getIdentityColumnSupport();\n\t\t\n\t\tif (support != null)\n\t\t{\n\t\t\tassertEquals(\"table\", support.parseInsertTable(\"INSERT INTO table (column1, column2) VALUES (1, 2)\"));\n\t\t\tasse... | {
"fields": [
{
"declarator": "SQL_2003_RESERVED_KEY_WORDS = new String[] {\n\t\t\"ABS\", \"ALL\", \"ALLOCATE\", \"ALTER\", \"AND\", \"ANY\", \"ARE\", \"ARRAY\", \"AS\", \"ASENSITIVE\", \"ASYMMETRIC\", \"AT\", \"ATOMIC\", \"AUTHORIZATION\", \"AVG\",\n\t\t\"BEGIN\", \"BETWEEN\", \"BIGINT\", \"BINARY\", \"BLO... | {
"body": "@Override\n\tpublic String parseInsertTable(String sql)\n\t{\n\t\treturn this.parse(this.insertIntoTablePattern, sql);\n\t}",
"class_method_signature": "StandardDialect.parseInsertTable(String sql)",
"constructor": false,
"full_signature": "@Override public String parseInsertTable(String sql)",
"id... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 3411081,
"size": 80470,
"stargazer_count": 122,
"stars": null,
"updates": null,
"url": "https://github.com/ha-jdbc/ha-jdbc"
} |
12959153_5 | {
"fields": [
{
"declarator": "tokenizer",
"modifier": "private",
"original_string": "private TagTokenizer tokenizer;",
"type": "TagTokenizer",
"var_name": "tokenizer"
}
],
"file": "library/src/test/java/com/tokenautocomplete/TagTokenizerTest.java",
"identifier": "TagTokeni... | {
"body": "@Test\n public void allowsOneCharacterCandidateRangeMatchesWithWhitespace() {\n String text = \" #\";\n\n List<Range> ranges = tokenizer.findTokenRanges(text, 0, text.length());\n assertEquals(Collections.singletonList(new Range(1,2)), ranges);\n }",
"class_method_signature": "... | {
"fields": [
{
"declarator": "tagPrefixes",
"modifier": "private",
"original_string": "private ArrayList<Character> tagPrefixes;",
"type": "ArrayList<Character>",
"var_name": "tagPrefixes"
},
{
"declarator": "CREATOR = new Parcelable.Creator<TagTokenizer>() {\n ... | {
"body": "@Override\n @NonNull\n public List<Range> findTokenRanges(CharSequence charSequence, int start, int end) {\n ArrayList<Range>result = new ArrayList<>();\n\n if (start == end) {\n //Can't have a 0 length token\n return result;\n }\n\n int tokenStart = ... | {
"created": "9/19/2013 8:53:27 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 12959153,
"size": null,
"stargazer_count": null,
"stars": 1217,
"updates": "2020-01-17T13:38:06+00:00",
"url": "https://github.com/splitwise/Token... |
12959153_13 | {
"fields": [],
"file": "library/src/test/java/com/tokenautocomplete/CharacterTokenizerTest.java",
"identifier": "CharacterTokenizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void matchesSingleLetterTokens() {\n CharacterTokenizer tokenizer = new CharacterTokenizer(Collections.singletonList(','), \"\");\n String text = \"t,r, a,,b\";\n\n List<Range> ranges = tokenizer.findTokenRanges(text, 0, text.length());\n assertEquals(Arrays.as... | {
"fields": [
{
"declarator": "splitChar",
"modifier": "private",
"original_string": "private ArrayList<Character> splitChar;",
"type": "ArrayList<Character>",
"var_name": "splitChar"
},
{
"declarator": "tokenTerminator",
"modifier": "private",
"original_str... | {
"body": "@Override\n @NonNull\n public List<Range> findTokenRanges(CharSequence charSequence, int start, int end) {\n ArrayList<Range>result = new ArrayList<>();\n\n if (start == end) {\n //Can't have a 0 length token\n return result;\n }\n\n int tokenStart = ... | {
"created": "9/19/2013 8:53:27 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 12959153,
"size": null,
"stargazer_count": null,
"stars": 1217,
"updates": "2020-01-17T13:38:06+00:00",
"url": "https://github.com/splitwise/Token... |
12959153_9 | {
"fields": [],
"file": "library/src/test/java/com/tokenautocomplete/CharacterTokenizerTest.java",
"identifier": "CharacterTokenizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void handleLotsOfWhitespaceWithWhitespaceTokenizer() {\n CharacterTokenizer tokenizer = new CharacterTokenizer(Collections.singletonList(' '), \"\");\n String text = \"bears, \\t ponies \\n ,another\";\n\n List<Range> ranges = tokenizer.findTokenRanges(text, 0, t... | {
"fields": [
{
"declarator": "splitChar",
"modifier": "private",
"original_string": "private ArrayList<Character> splitChar;",
"type": "ArrayList<Character>",
"var_name": "splitChar"
},
{
"declarator": "tokenTerminator",
"modifier": "private",
"original_str... | {
"body": "@Override\n @NonNull\n public List<Range> findTokenRanges(CharSequence charSequence, int start, int end) {\n ArrayList<Range>result = new ArrayList<>();\n\n if (start == end) {\n //Can't have a 0 length token\n return result;\n }\n\n int tokenStart = ... | {
"created": "9/19/2013 8:53:27 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 12959153,
"size": null,
"stargazer_count": null,
"stars": 1217,
"updates": "2020-01-17T13:38:06+00:00",
"url": "https://github.com/splitwise/Token... |
12959153_8 | {
"fields": [],
"file": "library/src/test/java/com/tokenautocomplete/CharacterTokenizerTest.java",
"identifier": "CharacterTokenizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void handleLotsOfWhitespace() {\n CharacterTokenizer tokenizer = new CharacterTokenizer(Collections.singletonList(','), \"\");\n String text = \"bears, ponies ,another\";\n\n List<Range> ranges = tokenizer.findTokenRanges(text, 0, text.length());\n ass... | {
"fields": [
{
"declarator": "splitChar",
"modifier": "private",
"original_string": "private ArrayList<Character> splitChar;",
"type": "ArrayList<Character>",
"var_name": "splitChar"
},
{
"declarator": "tokenTerminator",
"modifier": "private",
"original_str... | {
"body": "@Override\n @NonNull\n public List<Range> findTokenRanges(CharSequence charSequence, int start, int end) {\n ArrayList<Range>result = new ArrayList<>();\n\n if (start == end) {\n //Can't have a 0 length token\n return result;\n }\n\n int tokenStart = ... | {
"created": "9/19/2013 8:53:27 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 12959153,
"size": null,
"stargazer_count": null,
"stars": 1217,
"updates": "2020-01-17T13:38:06+00:00",
"url": "https://github.com/splitwise/Token... |
12959153_12 | {
"fields": [],
"file": "library/src/test/java/com/tokenautocomplete/CharacterTokenizerTest.java",
"identifier": "CharacterTokenizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void doesntMatchWhitespaceAsCandidateTokenRange() {\n CharacterTokenizer tokenizer = new CharacterTokenizer(Collections.singletonList(','), \"\");\n String text = \"test, \";\n\n List<Range> ranges = tokenizer.findTokenRanges(text, 0, text.length());\n assertEq... | {
"fields": [
{
"declarator": "splitChar",
"modifier": "private",
"original_string": "private ArrayList<Character> splitChar;",
"type": "ArrayList<Character>",
"var_name": "splitChar"
},
{
"declarator": "tokenTerminator",
"modifier": "private",
"original_str... | {
"body": "@Override\n @NonNull\n public List<Range> findTokenRanges(CharSequence charSequence, int start, int end) {\n ArrayList<Range>result = new ArrayList<>();\n\n if (start == end) {\n //Can't have a 0 length token\n return result;\n }\n\n int tokenStart = ... | {
"created": "9/19/2013 8:53:27 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 12959153,
"size": null,
"stargazer_count": null,
"stars": 1217,
"updates": "2020-01-17T13:38:06+00:00",
"url": "https://github.com/splitwise/Token... |
12959153_4 | {
"fields": [
{
"declarator": "tokenizer",
"modifier": "private",
"original_string": "private TagTokenizer tokenizer;",
"type": "TagTokenizer",
"var_name": "tokenizer"
}
],
"file": "library/src/test/java/com/tokenautocomplete/TagTokenizerTest.java",
"identifier": "TagTokeni... | {
"body": "@Test\n public void allowsOneCharacterCandidateRangeMatches() {\n String text = \"#\";\n\n List<Range> ranges = tokenizer.findTokenRanges(text, 0, text.length());\n assertEquals(Collections.singletonList(new Range(0,1)), ranges);\n }",
"class_method_signature": "TagTokenizerTes... | {
"fields": [
{
"declarator": "tagPrefixes",
"modifier": "private",
"original_string": "private ArrayList<Character> tagPrefixes;",
"type": "ArrayList<Character>",
"var_name": "tagPrefixes"
},
{
"declarator": "CREATOR = new Parcelable.Creator<TagTokenizer>() {\n ... | {
"body": "@Override\n @NonNull\n public List<Range> findTokenRanges(CharSequence charSequence, int start, int end) {\n ArrayList<Range>result = new ArrayList<>();\n\n if (start == end) {\n //Can't have a 0 length token\n return result;\n }\n\n int tokenStart = ... | {
"created": "9/19/2013 8:53:27 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 12959153,
"size": null,
"stargazer_count": null,
"stars": 1217,
"updates": "2020-01-17T13:38:06+00:00",
"url": "https://github.com/splitwise/Token... |
12959153_3 | {
"fields": [
{
"declarator": "tokenizer",
"modifier": "private",
"original_string": "private TagTokenizer tokenizer;",
"type": "TagTokenizer",
"var_name": "tokenizer"
}
],
"file": "library/src/test/java/com/tokenautocomplete/TagTokenizerTest.java",
"identifier": "TagTokeni... | {
"body": "@Test\n public void testMissingTokenContentInput() {\n String test = \"@token @ asdm @asjdfhajks sdfasdf\";\n assertEquals(Arrays.asList(new Range(0,6), new Range(25, 36)),\n tokenizer.findTokenRanges(test, 0, test.length()));\n }",
"class_method_signatu... | {
"fields": [
{
"declarator": "tagPrefixes",
"modifier": "private",
"original_string": "private ArrayList<Character> tagPrefixes;",
"type": "ArrayList<Character>",
"var_name": "tagPrefixes"
},
{
"declarator": "CREATOR = new Parcelable.Creator<TagTokenizer>() {\n ... | {
"body": "@Override\n @NonNull\n public List<Range> findTokenRanges(CharSequence charSequence, int start, int end) {\n ArrayList<Range>result = new ArrayList<>();\n\n if (start == end) {\n //Can't have a 0 length token\n return result;\n }\n\n int tokenStart = ... | {
"created": "9/19/2013 8:53:27 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 12959153,
"size": null,
"stargazer_count": null,
"stars": 1217,
"updates": "2020-01-17T13:38:06+00:00",
"url": "https://github.com/splitwise/Token... |
12959153_2 | {
"fields": [
{
"declarator": "tokenizer",
"modifier": "private",
"original_string": "private TagTokenizer tokenizer;",
"type": "TagTokenizer",
"var_name": "tokenizer"
}
],
"file": "library/src/test/java/com/tokenautocomplete/TagTokenizerTest.java",
"identifier": "TagTokeni... | {
"body": "@Test\n public void testNonTokenInput() {\n String test = \"This is some input with @names and #hash #tags inside\";\n assertEquals(Arrays.asList(new Range(24,30), new Range(35,40), new Range(41,46)),\n tokenizer.findTokenRanges(test, 0, test.length()));\n }",
"class_me... | {
"fields": [
{
"declarator": "tagPrefixes",
"modifier": "private",
"original_string": "private ArrayList<Character> tagPrefixes;",
"type": "ArrayList<Character>",
"var_name": "tagPrefixes"
},
{
"declarator": "CREATOR = new Parcelable.Creator<TagTokenizer>() {\n ... | {
"body": "@Override\n @NonNull\n public List<Range> findTokenRanges(CharSequence charSequence, int start, int end) {\n ArrayList<Range>result = new ArrayList<>();\n\n if (start == end) {\n //Can't have a 0 length token\n return result;\n }\n\n int tokenStart = ... | {
"created": "9/19/2013 8:53:27 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 12959153,
"size": null,
"stargazer_count": null,
"stars": 1217,
"updates": "2020-01-17T13:38:06+00:00",
"url": "https://github.com/splitwise/Token... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.