id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
1980382_4 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
}
],
"file": "core/src/test/java/com/lightboxtechnologies/io/IOU... | {
"body": "@Test(expected=IOException.class)\n public void testCopyExactTooLittle() throws IOException {\n final byte[] buf = new byte[1024];\n\n final byte[] expected = new byte[9999];\n final long seed = System.currentTimeMillis();\n final Random rng = new Random(seed);\n rng.nextBytes(expected);\n\... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/io/IOUtils.java",
"identifier": "IOUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "IOUtils.IOUtils()",
"constructor": true,
"full_signature": "protected IOUtils()",
"identifier": "IOUtils",
... | {
"body": "public static int copy(InputStream in, OutputStream out, byte[] buffer)\n throws IOException {\n final long count = copyLarge(in, out, buffer);\n return count > Integer.MAX_VALUE ? -1 : (int) count;\n }",
"class_method_signature": "IOUtils.... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_19 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/nsrl/RecordTest.java",
"identifier": "RecordTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=BadDataException.class)\n public void putDuplicate() throws BadDataException {\n final Map<String,String> map = new HashMap<String,String>();\n final String key = \"Bernadotte\";\n final String val1 = \"marshal of France\";\n final String val2 = \"king of Sweeden\";\n\n Recor... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/Record.java",
"identifier": "Record",
"interfaces": "",
"methods": [
{
"class_method_signature": "Record.Record()",
"constructor": true,
"full_signature": "protected Record()",
"identifier": "Record",
... | {
"body": "public static <K,V> void put(K key, V value, Map<K,V> map)\n throws BadDataException {\n final V old = map.put(key, value);\n if (old != null) {\n // duplicate key\n throw new BadDataException(\"duplicate key: \" + key);\n }\n }",
"... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_58 | {
"fields": [
{
"declarator": "code = 1",
"modifier": "private static final",
"original_string": "private static final int code = 1;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Greatest Common Divisor Finder\"",
"modifier": "private static fin... | {
"body": "@Test(expected=BadDataException.class)\n public void processTooManyCols() throws BadDataException {\n final RecordProcessor<ProdData> proc = new ProdRecordProcessor();\n final String[] cols = new String[9];\n Arrays.fill(cols, \"foo\");\n proc.process(cols);\n }",
"class_method_signature": ... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/ProdRecordProcessor.java",
"identifier": "ProdRecordProcessor",
"interfaces": "implements RecordProcessor<ProdData>",
"methods": [
{
"class_method_signature": "ProdRecordProcessor.process(String[] col)",
"constructor": f... | {
"body": "public ProdData process(String[] col) throws BadDataException {\n if (col.length < 7) {\n throw new BadDataException(\"too few columns\");\n }\n else if (col.length > 7) {\n throw new BadDataException(\"too many columns\");\n }\n\n Integer code = null;\n try {\n code = Inte... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_23 | {
"fields": [
{
"declarator": "code = \"YourMomsCode\"",
"modifier": "private static final",
"original_string": "private static final String code = \"YourMomsCode\";",
"type": "String",
"var_name": "code"
},
{
"declarator": "name = \"MomOS\"",
"modifier": "private... | {
"body": "@Test\n public void notEqualsOtherType() {\n final OSData osd = new OSData(code, name, version, mfg_code);\n assertFalse(osd.equals(\"bogus\"));\n assertFalse(\"bogus\".equals(osd));\n }",
"class_method_signature": "OSDataTest.notEqualsOtherType()",
"constructor": false,
"full_signature": ... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final String code;",
"type": "String",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof OSData)) return false;\n final OSData d = (OSData) o;\n return code.equals(d.code) && name.equals(d.name) &&\n version.equals(d.version) && mfg_code.equals(d.mfg_code);\n }",
"class_me... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_120 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery() {\n {\n setImposteriser(ClassImposteriser.INSTANCE);\n }\n }",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery() {\n {\n setImposteriser(ClassImposteriser.INSTA... | {
"body": "@Test\n public void readArrayOneExtentTest() throws IOException {\n final Map<String,Object> extent = new HashMap<String,Object>();\n extent.put(\"addr\", Long.valueOf(42));\n extent.put(\"len\", Long.valueOf(10));\n \n final List<Map<String,Object>> extents = Collections.singletonList(exte... | {
"fields": [
{
"declarator": "in",
"modifier": "protected final",
"original_string": "protected final FSDataInputStream in;",
"type": "FSDataInputStream",
"var_name": "in"
},
{
"declarator": "ext_iter",
"modifier": "protected final",
"original_string": "pro... | {
"body": "@Override\n public int read() throws IOException {\n final byte[] b = new byte[1];\n\n // keep trying until we read one byte or hit EOF\n int rlen;\n do {\n rlen = read(b, 0, 1);\n } while (rlen == 0);\n\n return rlen == -1 ? -1 : b[0];\n }",
"class_method_signature": "ExtentsInp... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_74 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testJsonMap() {\n assertEquals(JSON, typeVal(new HashMap<String,Object>()));\n }",
"class_method_signature": "FsEntryHBaseCommonTest.testJsonMap()",
"constructor": false,
"full_signature": "@Test public void testJsonMap()",
"identifier": "testJsonMap",
"invocations": [
... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "public static byte typeVal(Object o) {\n if (o instanceof Long || o instanceof Integer) {\n return LONG;\n }\n else if (o instanceof String) {\n return STRING;\n }\n else if (o instanceof Date) {\n return DATE;\n }\n else if (o instanceof Map || o instanceof List) {\n ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_62 | {
"fields": [
{
"declarator": "code = \"SPFT\"",
"modifier": "private static final",
"original_string": "private static final String code = \"SPFT\";",
"type": "String",
"var_name": "code"
},
{
"declarator": "name = \"Stay Puft Marshmallow Corporation\"",
"modifie... | {
"body": "@Test\n public void equalsSelf() {\n final MfgData osd = new MfgData(code, name);\n assertTrue(osd.equals(osd));\n }",
"class_method_signature": "MfgDataTest.equalsSelf()",
"constructor": false,
"full_signature": "@Test public void equalsSelf()",
"identifier": "equalsSelf",
"invocations":... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final String code;",
"type": "String",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof MfgData)) return false;\n final MfgData d = (MfgData) o;\n return code.equals(d.code) && name.equals(d.name);\n }",
"class_method_signature": "MfgData.equals(Object o)",
"constructor": false,
... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_35 | {
"fields": [
{
"declarator": "code = 99",
"modifier": "private static final",
"original_string": "private static final int code = 99;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Lern Yerself Scouse\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void hashCodeSelf() {\n final ProdData pd =\n new ProdData(code, name, version, os_code, mfg_code, language, app_type);\n\n assertTrue(pd.hashCode() == pd.hashCode());\n }",
"class_method_signature": "ProdDataTest.hashCodeSelf()",
"constructor": false,
"full_signature": "@... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final int code;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
"typ... | {
"body": "@Override\n public int hashCode() {\n return new HashCodeBuilder().append(code)\n .append(name)\n .append(version)\n .append(os_code)\n .append(mfg_code)\n ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_7 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
}
],
"file": "core/src/test/java/com/lightboxtechnologies/io/IOU... | {
"body": "@Test\n public void testCloseQuietlyCloseableNull() {\n IOUtils.closeQuietly((Closeable) null);\n }",
"class_method_signature": "IOUtilsTest.testCloseQuietlyCloseableNull()",
"constructor": false,
"full_signature": "@Test public void testCloseQuietlyCloseableNull()",
"identifier": "testCloseQu... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/io/IOUtils.java",
"identifier": "IOUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "IOUtils.IOUtils()",
"constructor": true,
"full_signature": "protected IOUtils()",
"identifier": "IOUtils",
... | {
"body": "public static void closeQuietly(Closeable c) {\n if (c == null) return;\n\n try {\n c.close();\n }\n catch (IOException e) {\n // ignore\n }\n }",
"class_method_signature": "IOUtils.closeQuietly(Closeable c)",
"constructor": false,
"full_signature": "public static void close... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_119 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery() {\n {\n setImposteriser(ClassImposteriser.INSTANCE);\n }\n }",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery() {\n {\n setImposteriser(ClassImposteriser.INSTA... | {
"body": "@Test\n public void readByteNoExtentsTest() throws IOException {\n final List<Map<String,Object>> extents = Collections.emptyList();\n \n final FSDataInputStream in = new ArrayFSDataInputStream(new byte[0]);\n\n final InputStream eis = new ExtentsInputStream(in, extents);\n\n assertEquals(-... | {
"fields": [
{
"declarator": "in",
"modifier": "protected final",
"original_string": "protected final FSDataInputStream in;",
"type": "FSDataInputStream",
"var_name": "in"
},
{
"declarator": "ext_iter",
"modifier": "protected final",
"original_string": "pro... | {
"body": "@Override\n public int read() throws IOException {\n final byte[] b = new byte[1];\n\n // keep trying until we read one byte or hit EOF\n int rlen;\n do {\n rlen = read(b, 0, 1);\n } while (rlen == 0);\n\n return rlen == -1 ? -1 : b[0];\n }",
"class_method_signature": "ExtentsInp... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_20 | {
"fields": [
{
"declarator": "code = \"YourMomsCode\"",
"modifier": "private static final",
"original_string": "private static final String code = \"YourMomsCode\";",
"type": "String",
"var_name": "code"
},
{
"declarator": "name = \"MomOS\"",
"modifier": "private... | {
"body": "@Test\n public void equalsSelf() {\n final OSData osd = new OSData(code, name, version, mfg_code);\n assertTrue(osd.equals(osd));\n }",
"class_method_signature": "OSDataTest.equalsSelf()",
"constructor": false,
"full_signature": "@Test public void equalsSelf()",
"identifier": "equalsSelf",
... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final String code;",
"type": "String",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof OSData)) return false;\n final OSData d = (OSData) o;\n return code.equals(d.code) && name.equals(d.name) &&\n version.equals(d.version) && mfg_code.equals(d.mfg_code);\n }",
"class_me... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_77 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStream() {\n assertEquals(BUFFER_STREAM, typeVal(new BufferProxy(new byte[] {0x01, 0x02, 0x03, 0x04})));\n }",
"class_method_signature": "FsEntryHBaseCommonTest.testStream()",
"constructor": false,
"full_signature": "@Test public void testStream()",
"identifier": "testS... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "public static byte typeVal(Object o) {\n if (o instanceof Long || o instanceof Integer) {\n return LONG;\n }\n else if (o instanceof String) {\n return STRING;\n }\n else if (o instanceof Date) {\n return DATE;\n }\n else if (o instanceof Map || o instanceof List) {\n ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_98 | {
"fields": [
{
"declarator": "mapper = new ObjectMapper()",
"modifier": "private static final",
"original_string": "private static final ObjectMapper mapper = new ObjectMapper();",
"type": "ObjectMapper",
"var_name": "mapper"
}
],
"file": "core/src/test/java/com/lightboxtech... | {
"body": "@Test\n public void testParseJson() {\n FsEntry e = new FsEntry();\n assertEquals(null, e.getPath());\n assertTrue(e.parseJson(\"{\\\"path\\\":\\\"/my/path/\\\", \\\"name\\\":{\\\"name\\\":\\\"myname\\\",\\\"flags\\\":3,\\\"meta_seq\\\":2,\\\"type\\\":2,\\\"dirIndex\\\":2}}\"));\n assertEquals... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "hasMRec",
"modifier": "private",
... | {
"body": "public boolean parseJson(String jsonstr) {\n \n // slurp the JSON into a temporary map\n Map<String,Object> json = null;\n try {\n json = (Map<String,Object>) mapper.readValue(jsonstr, Map.class);\n }\n catch (IOException e) {\n return false;\n }\n\n final Map<String,Objec... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_61 | {
"fields": [
{
"declarator": "code = 1",
"modifier": "private static final",
"original_string": "private static final int code = 1;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Greatest Common Divisor Finder\"",
"modifier": "private static fin... | {
"body": "@Test(expected=BadDataException.class)\n public void processNegativeCode() throws BadDataException {\n final RecordProcessor<ProdData> proc = new ProdRecordProcessor();\n proc.process(new String[] { \"-1\", \"\", \"\", \"\", \"\", \"\", \"\" });\n }",
"class_method_signature": "ProdRecordProcesso... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/ProdRecordProcessor.java",
"identifier": "ProdRecordProcessor",
"interfaces": "implements RecordProcessor<ProdData>",
"methods": [
{
"class_method_signature": "ProdRecordProcessor.process(String[] col)",
"constructor": f... | {
"body": "public ProdData process(String[] col) throws BadDataException {\n if (col.length < 7) {\n throw new BadDataException(\"too few columns\");\n }\n else if (col.length > 7) {\n throw new BadDataException(\"too many columns\");\n }\n\n Integer code = null;\n try {\n code = Inte... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_36 | {
"fields": [
{
"declarator": "code = 99",
"modifier": "private static final",
"original_string": "private static final int code = 99;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Lern Yerself Scouse\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void hashCodeSame() {\n final ProdData a =\n new ProdData(code, name, version, os_code, mfg_code, language, app_type);\n final ProdData b =\n new ProdData(code, name, version, os_code, mfg_code, language, app_type);\n assertTrue(a.hashCode() == b.hashCode());\n }",
"cl... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final int code;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
"typ... | {
"body": "@Override\n public int hashCode() {\n return new HashCodeBuilder().append(code)\n .append(name)\n .append(version)\n .append(os_code)\n .append(mfg_code)\n ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_41 | {
"fields": [
{
"declarator": "hex = new Hex()",
"modifier": "private static final",
"original_string": "private static final Hex hex = new Hex();",
"type": "Hex",
"var_name": "hex"
},
{
"declarator": "name = \"c'est ne pas un name\"",
"modifier": "private static ... | {
"body": "@Test\n public void notEqualsOtherType() {\n final HashData hd = new HashData(\n sha1, md5, crc32, name, size, prod_code, os_code, special_code);\n\n assertFalse(hd.equals(\"bogus\"));\n assertFalse(\"bogus\".equals(hd));\n }",
"class_method_signature": "HashDataTest.notEqualsOtherType()"... | {
"fields": [
{
"declarator": "sha1",
"modifier": "public final",
"original_string": "public final byte[] sha1;",
"type": "byte[]",
"var_name": "sha1"
},
{
"declarator": "md5",
"modifier": "public final",
"original_string": "public final byte[] md5;",
... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof HashData)) return false;\n final HashData d = (HashData) o;\n return Arrays.equals(sha1, d.sha1) && Arrays.equals(md5, d.md5) &&\n Arrays.equals(crc32, d.crc32) && name.equals(d.name) &&\... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_16 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "private final",
"original_string": "private final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
},
{
"declarator": "line = \"Jackdaws love my great sphinx of ... | {
"body": "@Test\n public void loadInputStream() throws IOException {\n final LineHandler lh = buildLineHandler(limit, line);\n final RecordLoader loader = new RecordLoader();\n\n InputStream in = null;\n try {\n in = IOUtils.toInputStream(buildInput(limit, line).toString());\n loader.load(in, ... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/RecordLoader.java",
"identifier": "RecordLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "RecordLoader.load(Reader r, LineHandler lh)",
"constructor": false,
"full_signature": "public void load(... | {
"body": "public void load(Reader r, LineHandler lh) throws IOException {\n BufferedReader br = null;\n try {\n br = new BufferedReader(r);\n\n // first line gives column names, skip it\n br.readLine();\n\n // process each line\n String line;\n long linenum = 0;\n while ((lin... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_103 | {
"fields": [
{
"declarator": "mapper = new ObjectMapper()",
"modifier": "private static final",
"original_string": "private static final ObjectMapper mapper = new ObjectMapper();",
"type": "ObjectMapper",
"var_name": "mapper"
}
],
"file": "core/src/test/java/com/lightboxtech... | {
"body": "@Test\n public void testGetInputStream() throws Exception {\n FsEntry e = new FsEntry();\n byte[] expected = {0, 1, 2, 3, 4, 5};\n byte[] actual = new byte[6];\n \n e.getStreams().put(\"Content\", new BufferProxy(expected));\n InputStream stream = e.getInputStream();\n assertTrue(st... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "hasMRec",
"modifier": "private",
... | {
"body": "public InputStream getInputStream() throws IOException {\n return getInputStream(\"Content\");\n }",
"class_method_signature": "FsEntry.getInputStream()",
"constructor": false,
"full_signature": "public InputStream getInputStream()",
"identifier": "getInputStream",
"invocations": [
"getIn... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_57 | {
"fields": [
{
"declarator": "code = 1",
"modifier": "private static final",
"original_string": "private static final int code = 1;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Greatest Common Divisor Finder\"",
"modifier": "private static fin... | {
"body": "@Test(expected=BadDataException.class)\n public void processTooFewCols() throws BadDataException {\n final RecordProcessor<ProdData> proc = new ProdRecordProcessor();\n proc.process(new String[] { \"foo\" });\n }",
"class_method_signature": "ProdRecordProcessorTest.processTooFewCols()",
"constr... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/ProdRecordProcessor.java",
"identifier": "ProdRecordProcessor",
"interfaces": "implements RecordProcessor<ProdData>",
"methods": [
{
"class_method_signature": "ProdRecordProcessor.process(String[] col)",
"constructor": f... | {
"body": "public ProdData process(String[] col) throws BadDataException {\n if (col.length < 7) {\n throw new BadDataException(\"too few columns\");\n }\n else if (col.length > 7) {\n throw new BadDataException(\"too many columns\");\n }\n\n Integer code = null;\n try {\n code = Inte... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_94 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/JSONTest.java",
"identifier": "JSONTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetNonNullOk() throws JSON.DataException {\n final Map<String,Object> json = new HashMap<String,Object>();\n final String key = \"foo\";\n json.put(key, 42);\n assertTrue(JSON.getNonNull(json, key) != null);\n }",
"class_method_signature": "JSONTest.testGetNonNullOk(... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/spectrum/JSON.java",
"identifier": "JSON",
"interfaces": "",
"methods": [
{
"class_method_signature": "JSON.JSON()",
"constructor": true,
"full_signature": "protected JSON()",
"identifier": "JSON",
"modifie... | {
"body": "public static Object getNonNull(Map<String,Object> json, String key)\n throws DataException {\n if (key == null) {\n throw new DataException(\"key is null\");\n }\n\n if (!json.containsKey(key)) {\n throw new DataException(key + \" ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_82 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnmarshallString() {\n ByteArrayOutputStream colSpec = new ByteArrayOutputStream();\n colSpec.write(STRING);\n colSpec.write(65);\n byte[] c = colSpec.toByteArray();\n assertEquals(\"Test\", unmarshall(c, Bytes.toBytes(\"Test\")));\n }",
"class_method_signature": ... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "@SuppressWarnings(\"fallthrough\")\n public static Object unmarshall(byte[] colSpec, byte[] colVal) {\n byte type = colSpec[0];\n switch (type) {\n case LONG:\n return Bytes.toLong(colVal);\n case STRING:\n return Bytes.toString(colVal);\n case DATE:\n return new ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_83 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnmarshallDate() {\n ByteArrayOutputStream colSpec = new ByteArrayOutputStream();\n colSpec.write(DATE);\n colSpec.write(65);\n byte[] c = colSpec.toByteArray();\n Date d = new Date(1267313232000L);\n assertEquals(d, unmarshall(c, Bytes.toBytes(d.getTime())));\n ... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "@SuppressWarnings(\"fallthrough\")\n public static Object unmarshall(byte[] colSpec, byte[] colVal) {\n byte type = colSpec[0];\n switch (type) {\n case LONG:\n return Bytes.toLong(colVal);\n case STRING:\n return Bytes.toString(colVal);\n case DATE:\n return new ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_95 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/JSONTest.java",
"identifier": "JSONTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=JSON.DataException.class)\n public void testGetNonNullNullKey() throws JSON.DataException {\n final Map<String,Object> json = new HashMap<String,Object>();\n JSON.getNonNull(json, null);\n }",
"class_method_signature": "JSONTest.testGetNonNullNullKey()",
"constructor": false,
"... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/spectrum/JSON.java",
"identifier": "JSON",
"interfaces": "",
"methods": [
{
"class_method_signature": "JSON.JSON()",
"constructor": true,
"full_signature": "protected JSON()",
"identifier": "JSON",
"modifie... | {
"body": "public static Object getNonNull(Map<String,Object> json, String key)\n throws DataException {\n if (key == null) {\n throw new DataException(\"key is null\");\n }\n\n if (!json.containsKey(key)) {\n throw new DataException(key + \" ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_56 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/nsrl/OSRecordProcessorTest.java",
"identifier": "OSRecordProcessorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void processJustRightCols() throws BadDataException {\n final String code = \"1\";\n final String name = \"TuringOS\";\n final String version = \"0.1\";\n final String mfg_code = \"AT\";\n\n final OSData osd = new OSData(code, name, version, mfg_code);\n\n final RecordProc... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/OSRecordProcessor.java",
"identifier": "OSRecordProcessor",
"interfaces": "implements RecordProcessor<OSData>",
"methods": [
{
"class_method_signature": "OSRecordProcessor.process(String[] col)",
"constructor": false,
... | {
"body": "public OSData process(String[] col) throws BadDataException {\n if (col.length < 4) {\n throw new BadDataException(\"too few columns\");\n }\n else if (col.length > 4) {\n throw new BadDataException(\"too many columns\");\n }\n\n return new OSData(col[0], col[1], col[2], col[3]);\n... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_102 | {
"fields": [
{
"declarator": "mapper = new ObjectMapper()",
"modifier": "private static final",
"original_string": "private static final ObjectMapper mapper = new ObjectMapper();",
"type": "ObjectMapper",
"var_name": "mapper"
}
],
"file": "core/src/test/java/com/lightboxtech... | {
"body": "@Test\n public void testExtension() {\n FsEntry e = new FsEntry();\n e.put(\"name\", \"foo\");\n assertEquals(\"\", e.extension());\n\n e.clear();\n e.put(\"name\", \"foo.txt\");\n assertEquals(\"txt\", e.extension());\n\n e.clear();\n e.put(\"name\", \"foo..txt\");\n assertEqua... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "hasMRec",
"modifier": "private",
... | {
"body": "public String extension() {\n final String s = getName();\n final int dot = s.lastIndexOf('.');\n if (-1 < dot && dot < s.length() - 1) {\n return s.substring(dot + 1).toLowerCase();\n }\n return \"\";\n }",
"class_method_signature": "FsEntry.extension()",
"constructor": false,
"... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_17 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "private final",
"original_string": "private final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
},
{
"declarator": "line = \"Jackdaws love my great sphinx of ... | {
"body": "@Test\n public void loadFilename() throws IOException {\n final LineHandler lh = buildLineHandler(limit, line);\n final String filename = \"src/test/java/com/lightboxtechnologies/nsrl/jackdaws\";\n\n final RecordLoader loader = new RecordLoader();\n loader.load(filename, lh);\n }",
"class_m... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/RecordLoader.java",
"identifier": "RecordLoader",
"interfaces": "",
"methods": [
{
"class_method_signature": "RecordLoader.load(Reader r, LineHandler lh)",
"constructor": false,
"full_signature": "public void load(... | {
"body": "public void load(Reader r, LineHandler lh) throws IOException {\n BufferedReader br = null;\n try {\n br = new BufferedReader(r);\n\n // first line gives column names, skip it\n br.readLine();\n\n // process each line\n String line;\n long linenum = 0;\n while ((lin... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_40 | {
"fields": [
{
"declarator": "hex = new Hex()",
"modifier": "private static final",
"original_string": "private static final Hex hex = new Hex();",
"type": "Hex",
"var_name": "hex"
},
{
"declarator": "name = \"c'est ne pas un name\"",
"modifier": "private static ... | {
"body": "@Test\n public void notEqualsNull() {\n final HashData hd = new HashData(\n sha1, md5, crc32, name, size, prod_code, os_code, special_code);\n\n assertFalse(hd.equals(null));\n }",
"class_method_signature": "HashDataTest.notEqualsNull()",
"constructor": false,
"full_signature": "@Test pu... | {
"fields": [
{
"declarator": "sha1",
"modifier": "public final",
"original_string": "public final byte[] sha1;",
"type": "byte[]",
"var_name": "sha1"
},
{
"declarator": "md5",
"modifier": "public final",
"original_string": "public final byte[] md5;",
... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof HashData)) return false;\n final HashData d = (HashData) o;\n return Arrays.equals(sha1, d.sha1) && Arrays.equals(md5, d.md5) &&\n Arrays.equals(crc32, d.crc32) && name.equals(d.name) &&\... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_37 | {
"fields": [
{
"declarator": "code = 99",
"modifier": "private static final",
"original_string": "private static final int code = 99;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Lern Yerself Scouse\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void hashCodeDifferent() {\n final ProdData a = new ProdData(\n code, name, version, os_code, mfg_code, language, app_type);\n final ProdData b = new ProdData(\n code, name, version, os_code, \"gammy anded\", language, app_type);\n\n assertTrue(a.hashCode() != b.hashCode(... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final int code;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
"typ... | {
"body": "@Override\n public int hashCode() {\n return new HashCodeBuilder().append(code)\n .append(name)\n .append(version)\n .append(os_code)\n .append(mfg_code)\n ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_60 | {
"fields": [
{
"declarator": "code = 1",
"modifier": "private static final",
"original_string": "private static final int code = 1;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Greatest Common Divisor Finder\"",
"modifier": "private static fin... | {
"body": "@Test(expected=BadDataException.class)\n public void processNonnumericCode() throws BadDataException {\n final RecordProcessor<ProdData> proc = new ProdRecordProcessor();\n proc.process(new String[] { \"not a number\", \"\", \"\", \"\", \"\", \"\", \"\" });\n }",
"class_method_signature": "ProdRe... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/ProdRecordProcessor.java",
"identifier": "ProdRecordProcessor",
"interfaces": "implements RecordProcessor<ProdData>",
"methods": [
{
"class_method_signature": "ProdRecordProcessor.process(String[] col)",
"constructor": f... | {
"body": "public ProdData process(String[] col) throws BadDataException {\n if (col.length < 7) {\n throw new BadDataException(\"too few columns\");\n }\n else if (col.length > 7) {\n throw new BadDataException(\"too many columns\");\n }\n\n Integer code = null;\n try {\n code = Inte... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_76 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testByteArray() {\n assertEquals(BYTE_ARRAY, typeVal(new byte[] {0x01, 0x02, 0x03}));\n }",
"class_method_signature": "FsEntryHBaseCommonTest.testByteArray()",
"constructor": false,
"full_signature": "@Test public void testByteArray()",
"identifier": "testByteArray",
"inv... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "public static byte typeVal(Object o) {\n if (o instanceof Long || o instanceof Integer) {\n return LONG;\n }\n else if (o instanceof String) {\n return STRING;\n }\n else if (o instanceof Date) {\n return DATE;\n }\n else if (o instanceof Map || o instanceof List) {\n ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_99 | {
"fields": [
{
"declarator": "mapper = new ObjectMapper()",
"modifier": "private static final",
"original_string": "private static final ObjectMapper mapper = new ObjectMapper();",
"type": "ObjectMapper",
"var_name": "mapper"
}
],
"file": "core/src/test/java/com/lightboxtech... | {
"body": "@Test\n public void testFullPath() {\n FsEntry e = new FsEntry();\n assertTrue(e.parseJson(\"{\\\"path\\\":\\\"a/path/\\\", \\\"name\\\":{\\\"name\\\":\\\"aname\\\",\\\"dirIndex\\\":2}}\"));\n assertEquals(\"a/path/aname\", e.fullPath());\n assertTrue(e.parseJson(\"{\\\"path\\\":\\\"\\\", \\\"... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "hasMRec",
"modifier": "private",
... | {
"body": "public String fullPath() {\n if (Path == null) {\n Path = (String)get(\"path\");\n }\n\n if (Name == null) {\n Name = (String)get(\"name\");\n }\n\n final StringBuilder buf = new StringBuilder(Path);\n if (buf.length() > 0 && '/' != buf.charAt(buf.length() - 1)) {\n buf.app... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_21 | {
"fields": [
{
"declarator": "code = \"YourMomsCode\"",
"modifier": "private static final",
"original_string": "private static final String code = \"YourMomsCode\";",
"type": "String",
"var_name": "code"
},
{
"declarator": "name = \"MomOS\"",
"modifier": "private... | {
"body": "@Test\n public void equalsSame() {\n final OSData a = new OSData(code, name, version, mfg_code);\n final OSData b = new OSData(code, name, version, mfg_code);\n assertTrue(a.equals(b));\n assertTrue(b.equals(a));\n }",
"class_method_signature": "OSDataTest.equalsSame()",
"constructor": fa... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final String code;",
"type": "String",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof OSData)) return false;\n final OSData d = (OSData) o;\n return code.equals(d.code) && name.equals(d.name) &&\n version.equals(d.version) && mfg_code.equals(d.mfg_code);\n }",
"class_me... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_122 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery() {\n {\n setImposteriser(ClassImposteriser.INSTANCE);\n }\n }",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery() {\n {\n setImposteriser(ClassImposteriser.INSTA... | {
"body": "@Test\n public void readArrayMultipleExtentsTest() throws IOException {\n final int n = 10;\n\n final byte[] src = new byte[2*n];\n for (int i = 0; i < src.length; ++i) {\n src[i] = (byte) (i % 256);\n }\n\n final List<Map<String,Object>> extents =\n new ArrayList<Map<String,Objec... | {
"fields": [
{
"declarator": "in",
"modifier": "protected final",
"original_string": "protected final FSDataInputStream in;",
"type": "FSDataInputStream",
"var_name": "in"
},
{
"declarator": "ext_iter",
"modifier": "protected final",
"original_string": "pro... | {
"body": "@Override\n public int read() throws IOException {\n final byte[] b = new byte[1];\n\n // keep trying until we read one byte or hit EOF\n int rlen;\n do {\n rlen = read(b, 0, 1);\n } while (rlen == 0);\n\n return rlen == -1 ? -1 : b[0];\n }",
"class_method_signature": "ExtentsInp... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_118 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery() {\n {\n setImposteriser(ClassImposteriser.INSTANCE);\n }\n }",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery() {\n {\n setImposteriser(ClassImposteriser.INSTA... | {
"body": "@Test\n public void readArrayNoExtentsTest() throws IOException {\n final List<Map<String,Object>> extents = Collections.emptyList();\n \n final FSDataInputStream in = new ArrayFSDataInputStream(new byte[0]);\n \n final InputStream eis = new ExtentsInputStream(in, extents);\n\n final byte... | {
"fields": [
{
"declarator": "in",
"modifier": "protected final",
"original_string": "protected final FSDataInputStream in;",
"type": "FSDataInputStream",
"var_name": "in"
},
{
"declarator": "ext_iter",
"modifier": "protected final",
"original_string": "pro... | {
"body": "@Override\n public int read() throws IOException {\n final byte[] b = new byte[1];\n\n // keep trying until we read one byte or hit EOF\n int rlen;\n do {\n rlen = read(b, 0, 1);\n } while (rlen == 0);\n\n return rlen == -1 ? -1 : b[0];\n }",
"class_method_signature": "ExtentsInp... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_6 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
}
],
"file": "core/src/test/java/com/lightboxtechnologies/io/IOU... | {
"body": "@Test\n public void testCloseQuietlyCloseableThrows() throws IOException {\n final Closeable c = context.mock(Closeable.class);\n\n context.checking(new Expectations() {\n {\n oneOf(c).close(); will(throwException(new IOException()));\n }\n });\n\n IOUtils.closeQuietly(c);\n ... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/io/IOUtils.java",
"identifier": "IOUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "IOUtils.IOUtils()",
"constructor": true,
"full_signature": "protected IOUtils()",
"identifier": "IOUtils",
... | {
"body": "public static void closeQuietly(Closeable c) {\n if (c == null) return;\n\n try {\n c.close();\n }\n catch (IOException e) {\n // ignore\n }\n }",
"class_method_signature": "IOUtils.closeQuietly(Closeable c)",
"constructor": false,
"full_signature": "public static void close... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_47 | {
"fields": [
{
"declarator": "hex = new Hex()",
"modifier": "private static final",
"original_string": "private static final Hex hex = new Hex();",
"type": "Hex",
"var_name": "hex"
},
{
"declarator": "name = \"c'est ne pas un name\"",
"modifier": "private static ... | {
"body": "@Test(expected=BadDataException.class)\n public void processTooFewCols() throws BadDataException {\n final RecordProcessor<HashData> proc = new HashRecordProcessor();\n proc.process(new String[] { \"foo\" });\n }",
"class_method_signature": "HashRecordProcessorTest.processTooFewCols()",
"constr... | {
"fields": [
{
"declarator": "hex = new Hex()",
"modifier": "private static final",
"original_string": "private static final Hex hex = new Hex();",
"type": "Hex",
"var_name": "hex"
}
],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/HashRecordProcessor.java",
"i... | {
"body": "public HashData process(String[] col) throws BadDataException {\n if (col.length < 8) {\n throw new BadDataException(\"too few columns\");\n }\n else if (col.length > 8) {\n throw new BadDataException(\"too many columns\");\n }\n\n long size = 0;\n try {\n size = Long.parse... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_10 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
}
],
"file": "core/src/test/java/com/lightboxtechnologies/io/IOU... | {
"body": "@Test\n public void testReadNone() throws IOException {\n final InputStream in = new ByteArrayInputStream(new byte[0]);\n final byte[] buf = new byte[1];\n final int count = IOUtils.read(in, buf);\n\n assertEquals(-1, count);\n assertArrayEquals(new byte[1], buf);\n }",
"class_method_sig... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/io/IOUtils.java",
"identifier": "IOUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "IOUtils.IOUtils()",
"constructor": true,
"full_signature": "protected IOUtils()",
"identifier": "IOUtils",
... | {
"body": "public static int read(InputStream in, byte[] buf) throws IOException {\n int num;\n int off = 0;\n while (off < buf.length &&\n (num = in.read(buf, off, buf.length-off)) != -1) {\n off += num;\n }\n\n // This will read at least one byte if there are any to be read,\n // s... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_105 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/ImmutableHexWritableTest.java",
"identifier": "ImmutableHexWritableTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void toStringTest() throws Exception {\n final Hex hex = new Hex();\n final String str = \"DEADBEEF\";\n final ImmutableHexWritable ihw =\n new ImmutableHexWritable(hex.decode(str.getBytes()));\n assertEquals(str, ihw.toString().toUpperCase());\n }",
"class_method_signat... | {
"fields": [
{
"declarator": "MyHex = new Hex()",
"modifier": "final",
"original_string": "final Hex MyHex = new Hex();",
"type": "Hex",
"var_name": "MyHex"
}
],
"file": "core/src/main/java/com/lightboxtechnologies/spectrum/ImmutableHexWritable.java",
"identifier": "Immuta... | {
"body": "@Override\n public String toString() {\n final byte[] bytes = copyBytes();\n return new String(MyHex.encode(bytes));\n }",
"class_method_signature": "ImmutableHexWritable.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_51 | {
"fields": [
{
"declarator": "hex = new Hex()",
"modifier": "private static final",
"original_string": "private static final Hex hex = new Hex();",
"type": "Hex",
"var_name": "hex"
},
{
"declarator": "name = \"c'est ne pas un name\"",
"modifier": "private static ... | {
"body": "@Test(expected=BadDataException.class)\n public void processNegativeProdCode() throws BadDataException {\n final RecordProcessor<HashData> proc = new HashRecordProcessor();\n proc.process(new String[] {\n Hex.encodeHexString(sha1), Hex.encodeHexString(md5),\n Hex.encodeHexString(crc32), na... | {
"fields": [
{
"declarator": "hex = new Hex()",
"modifier": "private static final",
"original_string": "private static final Hex hex = new Hex();",
"type": "Hex",
"var_name": "hex"
}
],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/HashRecordProcessor.java",
"i... | {
"body": "public HashData process(String[] col) throws BadDataException {\n if (col.length < 8) {\n throw new BadDataException(\"too few columns\");\n }\n else if (col.length > 8) {\n throw new BadDataException(\"too many columns\");\n }\n\n long size = 0;\n try {\n size = Long.parse... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_92 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/JSONTest.java",
"identifier": "JSONTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=JSON.DataException.class)\n public void testGetAsTypeMismatch() throws JSON.DataException {\n final Map<String,Object> json = new HashMap<String,Object>();\n final String key = \"foo\";\n json.put(key, 42);\n JSON.getAs(json, key, Map.class);\n }",
"class_method_signature": "... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/spectrum/JSON.java",
"identifier": "JSON",
"interfaces": "",
"methods": [
{
"class_method_signature": "JSON.JSON()",
"constructor": true,
"full_signature": "protected JSON()",
"identifier": "JSON",
"modifie... | {
"body": "public static <T> T getAs(Map<String,Object> json, String key, Class<T> type)\n throws DataException {\n final Object o = getNonNull(json, key);\n\n if (!type.isInstance(o)) {\n throw new DataException(\n key + \" == \" + o + \", a \... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_84 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnmarshallJson() {\n ByteArrayOutputStream colSpec = new ByteArrayOutputStream();\n colSpec.write(JSON);\n colSpec.write('{');\n colSpec.write('}');\n final byte[] c = colSpec.toByteArray();\n final Map<String,Object> m = new HashMap<String,Object>();\n assertE... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "@SuppressWarnings(\"fallthrough\")\n public static Object unmarshall(byte[] colSpec, byte[] colVal) {\n byte type = colSpec[0];\n switch (type) {\n case LONG:\n return Bytes.toLong(colVal);\n case STRING:\n return Bytes.toString(colVal);\n case DATE:\n return new ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_1 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
}
],
"file": "core/src/test/java/com/lightboxtechnologies/io/IOU... | {
"body": "@Test\n public void testCopyLargeBuffer() throws IOException {\n final byte[] buf = new byte[1024];\n\n final byte[] expected = new byte[10000];\n final long seed = System.currentTimeMillis();\n final Random rng = new Random(seed);\n rng.nextBytes(expected);\n\n final ByteArrayInputStrea... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/io/IOUtils.java",
"identifier": "IOUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "IOUtils.IOUtils()",
"constructor": true,
"full_signature": "protected IOUtils()",
"identifier": "IOUtils",
... | {
"body": "public static long copyLarge(InputStream in, OutputStream out, byte[] buffer)\n throws IOException {\n long count = 0;\n int n = 0;\n while ((n = in.read(buffer)) != -1) {\n out.write(buffer, 0, n);\n count += n;\n }\n retur... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_109 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/KeyUtilsTest.java",
"identifier": "KeyUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void makeOutKeySHA1() throws Exception {\n final Hex hex = new Hex(); \n final byte[] hash =\n hex.decode(\"64fa477898e268fd30c2bfe272e5a016f5ec31c4\".getBytes());\n final byte type = 1;\n final byte[] col = \"vassalengine.org/VASSAL 3.1.15\".getBytes();\n\n // It's neat... | {
"fields": [
{
"declarator": "MD5 = 0",
"modifier": "public static final",
"original_string": "public static final byte MD5 = 0;",
"type": "byte",
"var_name": "MD5"
},
{
"declarator": "SHA1 = 1",
"modifier": "public static final",
"original_string": "public... | {
"body": "public static byte[] makeEntryKey(byte[] hash, byte type, byte[] data) {\n /*\n Key format is:\n\n hash right-padded with zeros to 20 bytes\n byte 0 for md5, 1 for sha1\n data as bytes\n\n The reason for padding the hash and including the type byte is to\n ensure that... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_26 | {
"fields": [
{
"declarator": "code = \"YourMomsCode\"",
"modifier": "private static final",
"original_string": "private static final String code = \"YourMomsCode\";",
"type": "String",
"var_name": "code"
},
{
"declarator": "name = \"MomOS\"",
"modifier": "private... | {
"body": "@Test\n public void hashCodeSame() {\n final OSData a = new OSData(code, name, version, mfg_code);\n final OSData b = new OSData(code, name, version, mfg_code);\n assertTrue(a.hashCode() == b.hashCode());\n }",
"class_method_signature": "OSDataTest.hashCodeSame()",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final String code;",
"type": "String",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
... | {
"body": "@Override\n public int hashCode() {\n return new HashCodeBuilder().append(code)\n .append(name)\n .append(version)\n .append(mfg_code)\n .toHashCode();\n }",
"class_method_sign... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_71 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLongAsInteger() {\n assertEquals(LONG, typeVal(Integer.valueOf(7)));\n }",
"class_method_signature": "FsEntryHBaseCommonTest.testLongAsInteger()",
"constructor": false,
"full_signature": "@Test public void testLongAsInteger()",
"identifier": "testLongAsInteger",
"invo... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "public static byte typeVal(Object o) {\n if (o instanceof Long || o instanceof Integer) {\n return LONG;\n }\n else if (o instanceof String) {\n return STRING;\n }\n else if (o instanceof Date) {\n return DATE;\n }\n else if (o instanceof Map || o instanceof List) {\n ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_67 | {
"fields": [
{
"declarator": "code = \"SPFT\"",
"modifier": "private static final",
"original_string": "private static final String code = \"SPFT\";",
"type": "String",
"var_name": "code"
},
{
"declarator": "name = \"Stay Puft Marshmallow Corporation\"",
"modifie... | {
"body": "@Test\n public void hashCodeSelf() {\n final MfgData osd = new MfgData(code, name);\n assertTrue(osd.hashCode() == osd.hashCode());\n }",
"class_method_signature": "MfgDataTest.hashCodeSelf()",
"constructor": false,
"full_signature": "@Test public void hashCodeSelf()",
"identifier": "hashCo... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final String code;",
"type": "String",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
... | {
"body": "@Override\n public int hashCode() {\n return new HashCodeBuilder().append(code).append(name).toHashCode();\n }",
"class_method_signature": "MfgData.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"invocations": [
"toHashCo... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_88 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPopulate() throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n Map<byte[], byte[]> inMap = new HashMap<byte[], byte[]>();\n Map<String,Object> actualMap = new HashMap<String,Object>(),\n expectedMap = new HashMap<String,Ob... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "public static void populate(Map<byte[], byte[]> input, Map<String,Object> out, Map<String, StreamProxy> streams) {\n out.clear();\n streams.clear();\n Set<Map.Entry<byte[], byte[]>> set = input.entrySet();\n byte[] key = null;\n for (Map.Entry<byte[], byte[]> pair: set) {\n key = pair.g... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_30 | {
"fields": [
{
"declarator": "code = 99",
"modifier": "private static final",
"original_string": "private static final int code = 99;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Lern Yerself Scouse\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void equalsSelf() {\n final ProdData pd =\n new ProdData(code, name, version, os_code, mfg_code, language, app_type);\n assertTrue(pd.equals(pd));\n }",
"class_method_signature": "ProdDataTest.equalsSelf()",
"constructor": false,
"full_signature": "@Test public void equals... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final int code;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
"typ... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof ProdData)) return false;\n final ProdData d = (ProdData) o;\n return code == d.code && name.equals(d.name) &&\n version.equals(d.version) && os_code.equals(d.os_code) &&\n mfg_c... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_31 | {
"fields": [
{
"declarator": "code = 99",
"modifier": "private static final",
"original_string": "private static final int code = 99;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name = \"Lern Yerself Scouse\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void equalsSame() {\n final ProdData a =\n new ProdData(code, name, version, os_code, mfg_code, language, app_type);\n final ProdData b =\n new ProdData(code, name, version, os_code, mfg_code, language, app_type);\n\n assertTrue(a.equals(b));\n assertTrue(b.equals(a));... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final int code;",
"type": "int",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
"typ... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof ProdData)) return false;\n final ProdData d = (ProdData) o;\n return code == d.code && name.equals(d.name) &&\n version.equals(d.version) && os_code.equals(d.os_code) &&\n mfg_c... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_66 | {
"fields": [
{
"declarator": "code = \"SPFT\"",
"modifier": "private static final",
"original_string": "private static final String code = \"SPFT\";",
"type": "String",
"var_name": "code"
},
{
"declarator": "name = \"Stay Puft Marshmallow Corporation\"",
"modifie... | {
"body": "@Test\n public void notEqualsOtherDifferentCode() {\n final MfgData a = new MfgData(code, name);\n final MfgData b = new MfgData(\"FOOF\", name);\n assertFalse(a.equals(b));\n assertFalse(b.equals(a));\n }",
"class_method_signature": "MfgDataTest.notEqualsOtherDifferentCode()",
"construct... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final String code;",
"type": "String",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
... | {
"body": "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof MfgData)) return false;\n final MfgData d = (MfgData) o;\n return code.equals(d.code) && name.equals(d.name);\n }",
"class_method_signature": "MfgData.equals(Object o)",
"constructor": false,
... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_89 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/JSONTest.java",
"identifier": "JSONTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=JSON.DataException.class)\n public void testGetAsNullKey() throws JSON.DataException {\n final Map<String,Object> json = new HashMap<String,Object>();\n JSON.getAs(json, null, String.class);\n }",
"class_method_signature": "JSONTest.testGetAsNullKey()",
"constructor": false,
"f... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/spectrum/JSON.java",
"identifier": "JSON",
"interfaces": "",
"methods": [
{
"class_method_signature": "JSON.JSON()",
"constructor": true,
"full_signature": "protected JSON()",
"identifier": "JSON",
"modifie... | {
"body": "public static <T> T getAs(Map<String,Object> json, String key, Class<T> type)\n throws DataException {\n final Object o = getNonNull(json, key);\n\n if (!type.isInstance(o)) {\n throw new DataException(\n key + \" == \" + o + \", a \... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_70 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLongAsLong() {\n assertEquals(LONG, typeVal(Long.valueOf(7L)));\n }",
"class_method_signature": "FsEntryHBaseCommonTest.testLongAsLong()",
"constructor": false,
"full_signature": "@Test public void testLongAsLong()",
"identifier": "testLongAsLong",
"invocations": [
... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "public static byte typeVal(Object o) {\n if (o instanceof Long || o instanceof Integer) {\n return LONG;\n }\n else if (o instanceof String) {\n return STRING;\n }\n else if (o instanceof Date) {\n return DATE;\n }\n else if (o instanceof Map || o instanceof List) {\n ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_27 | {
"fields": [
{
"declarator": "code = \"YourMomsCode\"",
"modifier": "private static final",
"original_string": "private static final String code = \"YourMomsCode\";",
"type": "String",
"var_name": "code"
},
{
"declarator": "name = \"MomOS\"",
"modifier": "private... | {
"body": "@Test\n public void hashCodeDifferent() {\n final OSData a = new OSData(code, name, version, mfg_code);\n final OSData b = new OSData(code, name, version, \"JonsMom\");\n assertTrue(a.hashCode() != b.hashCode());\n }",
"class_method_signature": "OSDataTest.hashCodeDifferent()",
"constructor"... | {
"fields": [
{
"declarator": "code",
"modifier": "public final",
"original_string": "public final String code;",
"type": "String",
"var_name": "code"
},
{
"declarator": "name",
"modifier": "public final",
"original_string": "public final String name;",
... | {
"body": "@Override\n public int hashCode() {\n return new HashCodeBuilder().append(code)\n .append(name)\n .append(version)\n .append(mfg_code)\n .toHashCode();\n }",
"class_method_sign... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_108 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/KeyUtilsTest.java",
"identifier": "KeyUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void makeOutKeyMD5() throws Exception {\n final Hex hex = new Hex(); \n final byte[] hash =\n hex.decode(\"8a9111fe05f9815fc55c728137c5b389\".getBytes());\n final byte type = 0;\n final byte[] col = \"vassalengine.org/VASSAL 3.1.15\".getBytes();\n\n // It's neat that I h... | {
"fields": [
{
"declarator": "MD5 = 0",
"modifier": "public static final",
"original_string": "public static final byte MD5 = 0;",
"type": "byte",
"var_name": "MD5"
},
{
"declarator": "SHA1 = 1",
"modifier": "public static final",
"original_string": "public... | {
"body": "public static byte[] makeEntryKey(byte[] hash, byte type, byte[] data) {\n /*\n Key format is:\n\n hash right-padded with zeros to 20 bytes\n byte 0 for md5, 1 for sha1\n data as bytes\n\n The reason for padding the hash and including the type byte is to\n ensure that... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_0 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
}
],
"file": "core/src/test/java/com/lightboxtechnologies/io/IOU... | {
"body": "@Test\n public void testCopyBuffer() throws IOException {\n final byte[] buf = new byte[1024];\n\n final byte[] expected = new byte[10000];\n final long seed = System.currentTimeMillis();\n final Random rng = new Random(seed);\n rng.nextBytes(expected);\n\n final ByteArrayInputStream in ... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/io/IOUtils.java",
"identifier": "IOUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "IOUtils.IOUtils()",
"constructor": true,
"full_signature": "protected IOUtils()",
"identifier": "IOUtils",
... | {
"body": "public static int copy(InputStream in, OutputStream out, byte[] buffer)\n throws IOException {\n final long count = copyLarge(in, out, buffer);\n return count > Integer.MAX_VALUE ? -1 : (int) count;\n }",
"class_method_signature": "IOUtils.... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_85 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/FsEntryHBaseCommonTest.java",
"identifier": "FsEntryHBaseCommonTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnmarshallByteArray() {\n ByteArrayOutputStream colSpec = new ByteArrayOutputStream();\n colSpec.write(BYTE_ARRAY);\n colSpec.write('D');\n byte[] c = colSpec.toByteArray();\n byte[] input = new byte[] {0x01, 0x02, 0x03, 0x04, 0x05},\n expected = new byte[]... | {
"fields": [
{
"declarator": "LONG = 0",
"modifier": "public static final",
"original_string": "public static final byte LONG = 0;",
"type": "byte",
"var_name": "LONG"
},
{
"declarator": "STRING = 1",
"modifier": "public static final",
"original_string": "p... | {
"body": "@SuppressWarnings(\"fallthrough\")\n public static Object unmarshall(byte[] colSpec, byte[] colVal) {\n byte type = colSpec[0];\n switch (type) {\n case LONG:\n return Bytes.toLong(colVal);\n case STRING:\n return Bytes.toString(colVal);\n case DATE:\n return new ... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_93 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/JSONTest.java",
"identifier": "JSONTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetAsOk() throws JSON.DataException {\n final Map<String,Object> json = new HashMap<String,Object>();\n final String key = \"foo\";\n final Integer val = 42;\n json.put(key, val);\n assertEquals(val, JSON.getAs(json, key, Integer.class));\n }",
"class_method_signa... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/spectrum/JSON.java",
"identifier": "JSON",
"interfaces": "",
"methods": [
{
"class_method_signature": "JSON.JSON()",
"constructor": true,
"full_signature": "protected JSON()",
"identifier": "JSON",
"modifie... | {
"body": "public static <T> T getAs(Map<String,Object> json, String key, Class<T> type)\n throws DataException {\n final Object o = getNonNull(json, key);\n\n if (!type.isInstance(o)) {\n throw new DataException(\n key + \" == \" + o + \", a \... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_50 | {
"fields": [
{
"declarator": "hex = new Hex()",
"modifier": "private static final",
"original_string": "private static final Hex hex = new Hex();",
"type": "Hex",
"var_name": "hex"
},
{
"declarator": "name = \"c'est ne pas un name\"",
"modifier": "private static ... | {
"body": "@Test(expected=BadDataException.class)\n public void processNonnumericSize() throws BadDataException {\n final RecordProcessor<HashData> proc = new HashRecordProcessor();\n proc.process(new String[] {\n Hex.encodeHexString(sha1), Hex.encodeHexString(md5),\n Hex.encodeHexString(crc32), name... | {
"fields": [
{
"declarator": "hex = new Hex()",
"modifier": "private static final",
"original_string": "private static final Hex hex = new Hex();",
"type": "Hex",
"var_name": "hex"
}
],
"file": "core/src/main/java/com/lightboxtechnologies/nsrl/HashRecordProcessor.java",
"i... | {
"body": "public HashData process(String[] col) throws BadDataException {\n if (col.length < 8) {\n throw new BadDataException(\"too few columns\");\n }\n else if (col.length > 8) {\n throw new BadDataException(\"too many columns\");\n }\n\n long size = 0;\n try {\n size = Long.parse... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_104 | {
"fields": [],
"file": "core/src/test/java/com/lightboxtechnologies/spectrum/ExtractMapperTest.java",
"identifier": "ExtractMapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHashFolder() {\n assertEquals(\n \"aa/bb\", ExtractMapper.hashFolder(\"aabbccddeeff00112233445566778899\")\n );\n }",
"class_method_signature": "ExtractMapperTest.testHashFolder()",
"constructor": false,
"full_signature": "@Test public void testHashFolder()",
"i... | {
"fields": [
{
"declarator": "LOG =\n LogFactory.getLog(ExtractMapper.class.getName())",
"modifier": "private static final",
"original_string": "private static final Log LOG =\n LogFactory.getLog(ExtractMapper.class.getName());",
"type": "Log",
"var_name": "LOG"
},
{
... | {
"body": "public static String hashFolder(String hash) {\n final StringBuilder hashPathBuf = new StringBuilder();\n hashPathBuf.setLength(0);\n hashPathBuf.append(hash.substring(0, 2));\n hashPathBuf.append(\"/\");\n hashPathBuf.append(hash.substring(2, 4));\n return hashPathBuf.toString();\n }",
... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_11 | {
"fields": [
{
"declarator": "context = new JUnit4Mockery()",
"modifier": "protected final",
"original_string": "protected final Mockery context = new JUnit4Mockery();",
"type": "Mockery",
"var_name": "context"
}
],
"file": "core/src/test/java/com/lightboxtechnologies/io/IOU... | {
"body": "@Test\n public void testReadClosed() throws IOException {\n final InputStream in = new ClosedInputStream();\n final byte[] buf = new byte[1];\n final int count = IOUtils.read(in, buf);\n\n assertEquals(-1, count);\n assertArrayEquals(new byte[1], buf);\n }",
"class_method_signature": "IO... | {
"fields": [],
"file": "core/src/main/java/com/lightboxtechnologies/io/IOUtils.java",
"identifier": "IOUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "IOUtils.IOUtils()",
"constructor": true,
"full_signature": "protected IOUtils()",
"identifier": "IOUtils",
... | {
"body": "public static int read(InputStream in, byte[] buf) throws IOException {\n int num;\n int off = 0;\n while (off < buf.length &&\n (num = in.read(buf, off, buf.length-off)) != -1) {\n off += num;\n }\n\n // This will read at least one byte if there are any to be read,\n // s... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
1980382_46 | {
"fields": [
{
"declarator": "rows = {\n new String[] { \"foo\", \"bar,baz\", \"1\" },\n new String[] { \"xxx\", \"yyy\", \"2\" },\n new String[] { \"aaa\", \"bbb\", \"3\" }\n }",
"modifier": "private static final",
"original_string": "private static final String[][] rows =... | {
"body": "@Test\n public void parseTest() throws IOException {\n final LineTokenizer tok = new OpenCSVLineTokenizer();\n\n for (String[] row : rows) {\n assertArrayEquals(row, tok.tokenize(buildCSV(row)));\n }\n }",
"class_method_signature": "OpenCSVLineTokenizerTest.parseTest()",
"constructor": ... | {
"fields": [
{
"declarator": "parser = new CSVParser(',', '\"')",
"modifier": "private final",
"original_string": "private final CSVParser parser = new CSVParser(',', '\"');",
"type": "CSVParser",
"var_name": "parser"
}
],
"file": "core/src/main/java/com/lightboxtechnologies... | {
"body": "public String[] tokenize(String line) throws IOException {\n return parser.parseLine(line);\n }",
"class_method_signature": "OpenCSVLineTokenizer.tokenize(String line)",
"constructor": false,
"full_signature": "public String[] tokenize(String line)",
"identifier": "tokenize",
"invocations": [... | {
"created": null,
"fork": null,
"fork_count": 21,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1980382,
"size": 53689,
"stargazer_count": 36,
"stars": null,
"updates": null,
"url": "https://github.com/sleuthkit/hadoop_framework"
} |
4546424_2 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateAppTypes() {\n\t\tList<ApplicationType> appTypes = new ArrayList<ApplicationType>();\n\t\t\n\t\tApplicationType appType = new ApplicationType();\n\t\tappType.setId(\"testApptype\");\n\t\tappType.setName(\"web applications\");\n\t\tappTypes.add(appType);\n\t\t\n\t\tfor(Applica... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_APPTYPES)\n\tpublic Response updateAppTypes(List<ApplicationType> appTypes) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.updateAppTypes(List<ApplicationTyp... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_57 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testFindUsers() {\n\t\tList<User> userist = mongoOperation.getCollection(USERS_COLLECTION_NAME , User.class);\n\t\tassertNotNull(userist);\n\t}",
"class_method_signature": "AdminServiceTest.testFindUsers()",
"constructor": false,
"full_signature": "@Test public void testFindUsers... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@GET\n\t@Path (REST_API_USERS)\n\t@Produces (MediaType.APPLICATION_JSON)\n\tpublic Response findUsers() {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.findUsers()\");\n\t }\n\t\t\n\t\ttry {\n\t\t\tList<UserDAO> userList = mongoOperation.getCollection(USERDAO_COLLECT... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_41 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testCreateTechnologies() {\n\t\tList<Technology> techs = new ArrayList<Technology>();\n\t\tTechnology tech = new Technology();\n\t\ttech.setId(\"testTech\");\n\t\ttech.setName(\"Html5\");\n\t\ttech.setDescription(\"For webApp\");\n\t\ttechs.add(tech);\n\t\tmongoOperation.insertList(TEC... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@POST\n\t@Consumes (MultiPartMediaTypes.MULTIPART_MIXED)\n\t@Path (REST_API_TECHNOLOGIES)\n\tpublic Response createTechnologies(@QueryParam(\"appId\") String appTypeId, \n\t MultiPart multiPart) throws PhrescoException, IOException {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered i... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_16 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdatemodule() {\n\t\tModuleGroup module = new ModuleGroup();\n\t\tmodule.setId(\"testModule\");\n\t\tmodule.setName(\"log4j\");\n\t\tmodule.setGroupId(\"log4j\");\n\t\tmodule.setArtifactId(\"log4j\");\n\t\tmongoOperation.save(MODULES_COLLECTION_NAME, module);\n\t\tassertEquals(Res... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_MODULES + REST_API_PATH_ID)\n\tpublic Response updatemodule(@PathParam(REST_API_PATH_PARAM_ID) String id , ModuleGroup module) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_61 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testDeleteUser() {\n\t\tString id = \"testUser\";\n\t\tmongoOperation.remove(USERS_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), User.class);\n\t}",
"class_method_signature": "AdminServiceTest.testDeleteUser()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@DELETE\n\t@Path (REST_API_USERS + REST_API_PATH_ID)\n\tpublic Response deleteUser(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.deleteUser(String id)\" + id);\n\t }\n\t\t\n\t\ttry {\n\t\t\tmongoOperation.remove(USERS_C... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_36 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testFindWebServices() {\n\t\tList<WebService> webServiceList = mongoOperation.getCollection(WEBSERVICES_COLLECTION_NAME , WebService.class);\n\t\tassertNotNull(webServiceList);\n\t}",
"class_method_signature": "ComponentServiceTest.testFindWebServices()",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@GET\n\t@Path (REST_API_WEBSERVICES)\n\t@Produces (MediaType.APPLICATION_JSON)\n\tpublic Response findWebServices(@QueryParam(REST_QUERY_TECHID) String techId, @QueryParam(REST_QUERY_CUSTOMERID) String customerId) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.find... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_20 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testGetPilot() {\n\t\tString id = \"testPilot\";\n\t\tProjectInfo info = mongoOperation.findOne(PILOTS_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), ProjectInfo.class);\n\t\tassertNotNull(info);\n\t}",
"class_method_signature": "ComponentServiceTest.testG... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@GET\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_PILOTS + REST_API_PATH_ID)\n\tpublic Response getPilot(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.getPilot(String id)\" + id);\n\t }\n\t\t\n\t\ttr... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_77 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/servlets/VideoDownloaderTest.java",
"identifier": "VideoDownloaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testVideoDownloader() throws PhrescoException {\n\t\tPhrescoServerFactory.initialize();\n\t\tGson gson = new Gson();\n\t\tRepositoryManager repoMgr = PhrescoServerFactory.getRepositoryManager();\n\t\tString videoInfoJSON = repoMgr.getArtifactAsString(ServerConstants.HOMEPAGE_JSON_FILE)... | {
"fields": [
{
"declarator": "VIDEO_FOLDER = \"/webapps\"",
"modifier": "private static final",
"original_string": "private static final String VIDEO_FOLDER = \"/webapps\";",
"type": "String",
"var_name": "VIDEO_FOLDER"
},
{
"declarator": "s_logger = Logger.getLogger(V... | {
"body": "public VideoDownloader(String serverContext) {\n\t\tthis.serverContext = serverContext;\n\t}",
"class_method_signature": "VideoDownloader.VideoDownloader(String serverContext)",
"constructor": true,
"full_signature": "public VideoDownloader(String serverContext)",
"identifier": "VideoDownloader",
... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_76 | {
"fields": [
{
"declarator": "repoMgr = null",
"modifier": "",
"original_string": "RepositoryManager repoMgr = null;",
"type": "RepositoryManager",
"var_name": "repoMgr"
},
{
"declarator": "repositoryURL = null",
"modifier": "",
"original_string": "String r... | {
"body": "@Test\n\tpublic void testGetEmailExtFile() throws PhrescoException {\n\t\tInputStream eeFile=repoMgr.getArtifactAsStream(repoMgr.getEmailExtFile());\n\t\tassertNotNull(eeFile);\n\t}",
"class_method_signature": "RepositoryServiceTest.testGetEmailExtFile()",
"constructor": false,
"full_signature": "@Te... | {
"fields": [],
"file": "service/phresco-service-web/src/main/java/com/photon/phresco/service/RepositoryService.java",
"identifier": "RepositoryService",
"interfaces": "",
"methods": [
{
"class_method_signature": "RepositoryService.getCiConfigPath()",
"constructor": false,
"full_signatur... | {
"body": "@GET\n\t@Path(\"/ci/emailext\")\n\t@Produces({ MediaType.APPLICATION_OCTET_STREAM })\n\tpublic InputStream getEmailExtFile()throws Exception {\n\t\tPhrescoServerFactory.initialize();\n\t\tRepositoryManager repoMgr = PhrescoServerFactory.getRepositoryManager();\n\t\treturn repoMgr.getArtifactAsStream(repoMg... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_21 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdatePilot() {\n\t\tProjectInfo info = new ProjectInfo();\n\t\tinfo.setId(\"testPilot\");\n\t\tinfo.setName(\"shoppingcart\");\n\t\tinfo.setVersion(\"1.0\");\n\t\tinfo.setGroupId(\"com.photo.phresco\");\n\t\tinfo.setArtifactId(\"phresco-projects\");\n\t\tmongoOperation.save(PILOTS... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_PILOTS + REST_API_PATH_ID)\n\tpublic Response updatePilot(@PathParam(REST_API_PATH_PARAM_ID) String id , ProjectInfo pilot) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into Com... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_37 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateWebServices() {\n\t\tList<WebService> webServices = new ArrayList<WebService>();\n\t\tWebService webService = new WebService();\n\t\twebService.setId(\"testWS\");\n\t\twebService.setName(\"NodeJs\");\n\t\twebService.setDescription(\"For rest\");\n\t\twebServices.add(webServic... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_WEBSERVICES)\n\tpublic Response updateWebServices(List<WebService> webServices) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.updateWebServices(List<WebServ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_60 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateUser() {\n\t\tUser user = new User(\"photon\", \"from phresco\");\n\t\tuser.setId(\"testUser\");\n\t\tmongoOperation.save(USERS_COLLECTION_NAME, user);\n\t}",
"class_method_signature": "AdminServiceTest.testUpdateUser()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_USERS + REST_API_PATH_ID)\n\tpublic Response updateUser(@PathParam(REST_API_PATH_PARAM_ID) String id , User user) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_17 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testCreatePilots() {\n\t\tList<ProjectInfo> infos = new ArrayList<ProjectInfo>();\n\t\tProjectInfo info = new ProjectInfo();\n\t\tinfo.setId(\"testPilot\");\n\t\tinfo.setName(\"shoppingcart\");\n\t\tinfo.setVersion(\"1.0\");\n\t\tinfo.setGroupId(\"com.photo.phresco\");\n\t\tinfo.setArt... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@POST\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_PILOTS)\n\tpublic Response createPilots(List<ProjectInfo> projectInfos) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.createPilots(List<ProjectInfo> projectInfos)\");\n\t }\n\t\t\n\t\ttry {\n\t\... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_40 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testDeleteWebService() throws PhrescoException {\n\t\tString id = \"testWS\";\n\t\tmongoOperation.remove(WEBSERVICES_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), WebService.class);\n\t\tassertEquals(Response.status(Response.Status.OK).build().getStatus(), ... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@DELETE\n\t@Path (REST_API_WEBSERVICES + REST_API_PATH_ID)\n\tpublic Response deleteWebService(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.deleteWebService(String id)\" + id);\n\t }\n\t\t\n\t\ttry {\n\t\t\tmongoOp... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_56 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testCreateUser() {\n\t\tList<User> users = new ArrayList<User>();\n\t\tUser user = new User(\"photon\", \"from phresco\");\n\t\tuser.setId(\"testUser\");\n\t\tusers.add(user);\n\t\tmongoOperation.insertList(USERS_COLLECTION_NAME , users);\n\t}",
"class_method_signature": "AdminServic... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@POST\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_USERS)\n\tpublic Response createUser(List<User> users) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.createUser(List<User> users)\");\n\t }\n\t\t\n\t\ttry {\n\t\t\tConverter<UserDAO, User> converter... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_3 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testGetApptype() {\n\t\tString id = \"testApptype\";\n\t\tApplicationType appType = mongoOperation.findOne(APPTYPES_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), ApplicationType.class);\n\t\tassertNotNull(appType);\n\t}",
"class_method_signature": "Compon... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@GET\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_APPTYPES + REST_API_PATH_ID)\n\tpublic Response getApptype(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.getApptype(String id)\" + id);\n\t }\n\t\t\n... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_67 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateRoles() {\n\t\tList<Role> roles = new ArrayList<Role>();\n\t\tRole role = new Role(\"QA\", \"from phresco\");\n\t\trole.setId(\"testrole\");\n\t\troles.add(role);\n\t\tfor (Role roleupdate : roles) {\n\t\t\tmongoOperation.save(ROLES_COLLECTION_NAME, roleupdate);\t\n\t\t}\n\t\... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_ROLES)\n\tpublic Response updateRoles(List<Role> roles) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.updateRoles(List<Role> roles)\");\n\t }\n\t\t\n\t\ttry ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_8 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateSettings() {\n\t\tList<SettingsTemplate> settingsTe = new ArrayList<SettingsTemplate>();\n\t\tSettingsTemplate setting = new SettingsTemplate();\n\t\tsetting.setId(\"server\");\n\t\tsetting.setType(\"jboss\");\n\t\tsettingsTe.add(setting);\n\t\tfor(SettingsTemplate settings :... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_SETTINGS)\n\tpublic Response updateSettings(List<SettingsTemplate> settings) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.updateSettings(List<SettingsTempl... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_30 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testFindDatabases() {\n\t\tList<Database> databasesList = mongoOperation.getCollection(DATABASES_COLLECTION_NAME , Database.class);\n\t\tassertNotNull(databasesList);\n\t}",
"class_method_signature": "ComponentServiceTest.testFindDatabases()",
"constructor": false,
"full_signatur... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@GET\n\t@Path (REST_API_DATABASES)\n\t@Produces (MediaType.APPLICATION_JSON)\n\tpublic Response findDatabases(@QueryParam(REST_QUERY_TECHID) String techId, \n\t @QueryParam(REST_QUERY_CUSTOMERID) String customerId) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentServ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_26 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testGetServer() {\n\t\tString id = \"testServer\";\n\t\tServer server = mongoOperation.findOne(SERVERS_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), Server.class);\n\t\tassertNotNull(server);\n\t}",
"class_method_signature": "ComponentServiceTest.testGetS... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@GET\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_SERVERS + REST_API_PATH_ID)\n\tpublic Response getServer(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.getServer(String id)\" + id);\n\t }\n\n\t t... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_71 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void createGlobalURL() {\n\t\tList<GlobalURL> gurl = new ArrayList<GlobalURL>();\n\t\tGlobalURL url = new GlobalURL();\n\t\turl.setId(\"testUrl\");\n\t\turl.setUrl(\"testGlobalURL\");\n\t\tgurl.add(url);\n\t\tmongoOperation.insertList(GLOBALURL_COLLECTION_NAME, gurl);\n\t}",
"class_method... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@POST\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_GLOBALURL)\n\tpublic Response createGlobalURL(List<GlobalURL> globalURL) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.createGlobalURL(List<GlobalURL> globalURL)\");\n\t }\n\t\t\n\t\ttry {\n\t\t\tmo... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_4 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateAppType() {\n\t\tAppType appType = new AppType(\"Html5\", \"WebApplications\", null);\n\t\tappType.setId(\"testApptype\");\n\t\tmongoOperation.save(APPTYPES_COLLECTION_NAME, appType);\n\t\tassertEquals(Response.status(Response.Status.OK).entity(appType).build().getStatus(), 2... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_APPTYPES + REST_API_PATH_ID)\n\tpublic Response updateAppType(@PathParam(REST_API_PATH_PARAM_ID) String id , ApplicationType appType) throws PhrescoException {\n\t if (isDebugEnabled) {\n\t ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_51 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testFindVideos() {\n\t\tList<VideoInfo> videolist = mongoOperation.getCollection(VIDEOS_COLLECTION_NAME , VideoInfo.class);\n\t\tassertNotNull(videolist);\n\t}",
"class_method_signature": "AdminServiceTest.testFindVideos()",
"constructor": false,
"full_signature": "@Test public v... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@GET\n\t@Path (REST_API_VIDEOS)\n\t@Produces (MediaType.APPLICATION_JSON)\n\tpublic Response findVideos() {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.findVideos()\");\n\t }\n\t\t\n\t\ttry {\n\t\t\tList<VideoInfo> videoList = mongoOperation.getCollection(VIDEOS_CO... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_47 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testCreateCustomer() {\n\t\tList<Customer> customers = new ArrayList<Customer>();\n\t\tCustomer customer = new Customer(\"phresco\", \"From Phresco\");\n\t\tcustomer.setId(\"testCustomer\");\n\t\tcustomers.add(customer);\n\t\tmongoOperation.insertList(CUSTOMERS_COLLECTION_NAME , custom... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@POST\n @Consumes (MediaType.APPLICATION_JSON)\n @Path (REST_API_CUSTOMERS)\n public Response createCustomer(List<Customer> customer) {\n if (isDebugEnabled) {\n S_LOGGER.debug(\"Entered into AdminService.createCustomer(List<Customer> customer)\");\n }\n \t\n \ttry {... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_10 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateSetting() {\n\t\tSettingsTemplate setting = new SettingsTemplate(\"web-service\", null, null);\n\t\tsetting.setId(\"server\");\n\t\tmongoOperation.save(SETTINGS_COLLECTION_NAME, setting);\n\t\tassertEquals(Response.status(Response.Status.OK).entity(setting).build().getStatus(... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_SETTINGS + REST_API_PATH_ID)\n\tpublic Response updateSetting(@PathParam(REST_API_PATH_PARAM_ID) String id , SettingsTemplate settingsTemplate) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debu... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_11 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testDeleteSettingsTemplate() {\n\t\tString id = \"server\";\n\t\tmongoOperation.remove(SETTINGS_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), SettingsTemplate.class);\n\t\tassertEquals(Response.status(Response.Status.OK).build().getStatus(), 200);\n\t}",
... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@DELETE\n\t@Path (REST_API_SETTINGS + REST_API_PATH_ID)\n\tpublic Response deleteSettingsTemplate(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.deleteSettingsTemplate(String id)\" + id);\n\t }\n\t\t\n\t\ttry {\n\t\t... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_46 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testDeleteTechnology() {\n\t\tString id = \"testTech\";\n\t\tmongoOperation.remove(TECHNOLOGIES_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), Technology.class);\n\t\tassertEquals(Response.status(Response.Status.OK).build().getStatus(), 200);\n\t}",
"class... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@DELETE\n\t@Path (REST_API_TECHNOLOGIES + REST_API_PATH_ID)\n\tpublic Response deleteTechnology(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.deleteTechnology(String id)\" + id);\n\t }\n\t\t\n\t\ttry {\n\t\t\tmongoO... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_50 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testCreateVideo() {\n\t\tList<VideoInfo> videolist = new ArrayList<VideoInfo>();\n\t\tVideoInfo info = new VideoInfo(\"About phresco\", \"intro about phresoc\", null, null, null, null);\n\t\tvideolist.add(info);\n\t\tinfo.setId(\"testvideo\"); \n\t\tvideolist.indexOf(\"testvideo\");\n\... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@POST\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_VIDEOS)\n\tpublic Response createVideo(List<VideoInfo> videos) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.createVideo(List<VideoInfo> videos)\");\n\t }\n\t\t\n\t\ttry {\n\t\t\tmongoOperation.inse... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_5 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testDeleteAppType() {\n\t\tString id = \"testApptype\";\n\t\tmongoOperation.remove(APPTYPES_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), ApplicationType.class);\n\t\tassertEquals(Response.status(Response.Status.OK).build().getStatus(), 200);\n\t}",
"clas... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@DELETE\n\t@Path (REST_API_APPTYPES + REST_API_PATH_ID)\n\tpublic Response deleteAppType(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.deleteAppType(String id)\" + id);\n\t }\n\t\t\n\t\ttry {\n\t\t\tmongoOperation.r... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_70 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testDeleteRole() {\n\t\tString id = \"testrole\";\n\t\tmongoOperation.remove(ROLES_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), Role.class);\n\t}",
"class_method_signature": "AdminServiceTest.testDeleteRole()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@DELETE\n\t@Path (REST_API_ROLES + REST_API_PATH_ID)\n\tpublic Response deleteRole(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.deleteRole(String id)\" + id);\n\t }\n\t\t\n\t\ttry {\n\t\t\tmongoOperation.remove(ROLES_C... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_27 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateServer() {\n\t\tServer server = new Server();\n\t\tserver.setId(\"testServer\");\n\t\tserver.setName(\"Tomcat\");\n\t\tserver.setDescription(\"For Deploying\");\n\t\tmongoOperation.save(SERVERS_COLLECTION_NAME, server);\n\t\tassertEquals(Response.status(Response.Status.OK).en... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_SERVERS + REST_API_PATH_ID)\n\tpublic Response updateServer(@PathParam(REST_API_PATH_PARAM_ID) String id , Server server) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into Compo... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_31 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateDatabases() {\n\t\tList<Database> databses = new ArrayList<Database>();\n\t\tDatabase database = new Database();\n\t\tdatabase.setId(\"testDatabase\");\n\t\tdatabase.setName(\"mongoDB\");\n\t\tdatabase.setDescription(\"To save objects\");\n\t\tdatabses.add(database);\n\t\tfor... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_DATABASES)\n\tpublic Response updateDatabases(List<Database> databases) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.updateDatabases(List<Database> databas... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_66 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testFindRoles() {\n\t\tList<Role> rolelist = mongoOperation.getCollection(ROLES_COLLECTION_NAME , Role.class);\n\t\tassertNotNull(rolelist);\n\t}",
"class_method_signature": "AdminServiceTest.testFindRoles()",
"constructor": false,
"full_signature": "@Test public void testFindRol... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@GET\n\t@Path (REST_API_ROLES)\n\t@Produces (MediaType.APPLICATION_JSON)\n\tpublic Response findRoles() {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.findRoles()\");\n\t }\n\t\t\n\t\ttry {\n\t\t\tList<Role> roleList = mongoOperation.getCollection(ROLES_COLLECTION_N... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_9 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testGetSettingsTemplate() {\n\t\tString id = \"server\";\n\t\tSettingsTemplate setting = mongoOperation.findOne(SETTINGS_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), SettingsTemplate.class);\n\t\tassertNotNull(setting);\n\t}",
"class_method_signature": "... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@GET\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_SETTINGS + REST_API_PATH_ID)\n\tpublic Response getSettingsTemplate(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.getSettingsTemplate(String id)\" + id)... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_49 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testGetCustomer() {\n\t\tString id = \"testCustomer\";\n\t\tCustomer customer = mongoOperation.findOne(CUSTOMERS_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), Customer.class);\n\t\tassertNotNull(customer);\n\t}",
"class_method_signature": "AdminServiceTes... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@GET\n @Produces (MediaType.APPLICATION_JSON)\n @Path (REST_API_CUSTOMERS + REST_API_PATH_ID)\n public Response getCustomer(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n if (isDebugEnabled) {\n S_LOGGER.debug(\"Entered into AdminService.getCustomer(String id)\" + id);\n ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_73 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testUpdateGlobalURL() {\n\t\tList<GlobalURL> gURL = new ArrayList<GlobalURL>();\n\t\tGlobalURL url = new GlobalURL();\n\t\turl.setId(\"testUrl\");\n\t\turl.setUrl(\"testGlobalURLUpdate\");\n\t\tgURL.add(url);\n\t\tfor (GlobalURL urlupdate : gURL) {\n\t\t\tmongoOperation.save(GLOBALURL_... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@PUT\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_GLOBALURL)\n\tpublic Response updateGlobalURL(List<GlobalURL> globalURLs) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.updateGlobalURL(List<GlobalURL> globalUR... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_24 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testFindServers() {\n\t\tList<Server> serversList = mongoOperation.getCollection(SERVERS_COLLECTION_NAME , Server.class);\n\t\tassertNotNull(serversList);\n\t}",
"class_method_signature": "ComponentServiceTest.testFindServers()",
"constructor": false,
"full_signature": "@Test pub... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@GET\n\t@Path (REST_API_SERVERS)\n\t@Produces (MediaType.APPLICATION_JSON)\n\tpublic Response findServers(@QueryParam(REST_QUERY_TECHID) String techId, \n\t @QueryParam(REST_QUERY_CUSTOMERID) String customerId) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_32 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/ComponentServiceTest.java",
"identifier": "ComponentServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void testGetDatabase() {\n\t\tString id = \"testDatabase\";\n\t\tDatabase database = mongoOperation.findOne(DATABASES_COLLECTION_NAME, new Query(Criteria.where(REST_API_PATH_PARAM_ID).is(id)), Database.class);\n\t\tassertNotNull(database);\n\t}",
"class_method_signature": "ComponentServic... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(ComponentService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(ComponentService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"d... | {
"body": "@GET\n\t@Produces (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_DATABASES + REST_API_PATH_ID)\n\tpublic Response getDatabase(@PathParam(REST_API_PATH_PARAM_ID) String id) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into ComponentService.getDatabase(String id)\" + id);\n\t }\n\t\... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
4546424_65 | {
"fields": [],
"file": "service/phresco-service-web/src/test/java/com/photon/phresco/service/rest/api/AdminServiceTest.java",
"identifier": "AdminServiceTest",
"interfaces": "implements ServiceConstants",
"superclass": "extends DbService"
} | {
"body": "@Test\n\tpublic void createRoles() {\n\t\tList<Role> roles = new ArrayList<Role>();\n\t\tRole role = new Role(\"developer\", \"developer\");\n\t\troles.add(role);\n\t\trole.setId(\"testrole\");\n\t\tmongoOperation.insertList(\"roles\", roles);\n\t}",
"class_method_signature": "AdminServiceTest.createRole... | {
"fields": [
{
"declarator": "S_LOGGER= Logger.getLogger(AdminService.class)",
"modifier": "private static final",
"original_string": "private static final Logger S_LOGGER= Logger.getLogger(AdminService.class);",
"type": "Logger",
"var_name": "S_LOGGER"
},
{
"declarato... | {
"body": "@POST\n\t@Consumes (MediaType.APPLICATION_JSON)\n\t@Path (REST_API_ROLES)\n\tpublic Response createRoles(List<Role> roles) {\n\t if (isDebugEnabled) {\n\t S_LOGGER.debug(\"Entered into AdminService.createRoles(List<Role> roles)\");\n\t }\n\t\t\n\t\ttry {\n\t\t\tmongoOperation.insertList(ROLES_... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 4546424,
"size": 57831,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/photon-labs/phresco"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.